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 master 2b515b7d Lines: 2393 35248 6.8 %
Date: 2024-02-28 12:06:22 Functions: 119 2350 5.1 %

          Line data    Source code
       1             : 
       2             : /* Python wrapper functions auto-generated by pidl */
       3             : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
       4             : #include "lib/replace/system/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       12542 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34       12542 :         switch (var_size) {
      35           0 :         case 8:
      36           0 :                 return UINT64_MAX;
      37        5274 :         case 4:
      38        5274 :                 return UINT32_MAX;
      39         316 :         case 2:
      40         316 :                 return UINT16_MAX;
      41        6952 :         case 1:
      42        6952 :                 return UINT8_MAX;
      43             :         }
      44             : 
      45           0 :         return 0;
      46             : }
      47             : 
      48          39 : static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
      49             : {
      50          39 :         switch (var_size) {
      51          39 :         case 8:
      52          39 :                 return INT64_MAX;
      53           0 :         case 4:
      54           0 :                 return INT32_MAX;
      55           0 :         case 2:
      56           0 :                 return INT16_MAX;
      57           0 :         case 1:
      58           0 :                 return INT8_MAX;
      59             :         }
      60             : 
      61           0 :         return 0;
      62             : }
      63             : 
      64             : #include "librpc/gen_ndr/misc.h"
      65             : #include "librpc/gen_ndr/lsa.h"
      66             : #include "librpc/gen_ndr/samr.h"
      67             : #include "librpc/gen_ndr/security.h"
      68             : #include "librpc/gen_ndr/nbt.h"
      69             : static PyTypeObject netr_UasInfo_Type;
      70             : static PyTypeObject netr_UasLogoffInfo_Type;
      71             : static PyTypeObject netr_AcctLockStr_Type;
      72             : static PyTypeObject netr_IdentityInfo_Type;
      73             : static PyTypeObject netr_PasswordInfo_Type;
      74             : static PyTypeObject netr_ChallengeResponse_Type;
      75             : static PyTypeObject netr_NetworkInfo_Type;
      76             : static PyTypeObject netr_GenericInfo_Type;
      77             : static PyTypeObject netr_LogonLevel_Type;
      78             : static PyTypeObject netr_UserSessionKey_Type;
      79             : static PyTypeObject netr_LMSessionKey_Type;
      80             : static PyTypeObject netr_SamBaseInfo_Type;
      81             : static PyTypeObject netr_SamInfo2_Type;
      82             : static PyTypeObject netr_SidAttr_Type;
      83             : static PyTypeObject netr_SamInfo3_Type;
      84             : static PyTypeObject netr_SamInfo6_Type;
      85             : static PyTypeObject netr_PacInfo_Type;
      86             : static PyTypeObject netr_GenericInfo2_Type;
      87             : static PyTypeObject netr_Validation_Type;
      88             : static PyTypeObject netr_Credential_Type;
      89             : static PyTypeObject netlogon_server_pipe_state_Type;
      90             : static PyTypeObject netr_Authenticator_Type;
      91             : static PyTypeObject netr_DELTA_DELETE_USER_Type;
      92             : static PyTypeObject netr_USER_KEY16_Type;
      93             : static PyTypeObject netr_PasswordHistory_Type;
      94             : static PyTypeObject netr_USER_KEYS2_Type;
      95             : static PyTypeObject netr_USER_KEY_UNION_Type;
      96             : static PyTypeObject netr_USER_KEYS_Type;
      97             : static PyTypeObject netr_USER_PRIVATE_INFO_Type;
      98             : static PyTypeObject netr_DELTA_USER_Type;
      99             : static PyTypeObject netr_DELTA_DOMAIN_Type;
     100             : static PyTypeObject netr_DELTA_GROUP_Type;
     101             : static PyTypeObject netr_DELTA_RENAME_Type;
     102             : static PyTypeObject netr_DELTA_GROUP_MEMBER_Type;
     103             : static PyTypeObject netr_DELTA_ALIAS_Type;
     104             : static PyTypeObject netr_DELTA_ALIAS_MEMBER_Type;
     105             : static PyTypeObject netr_QUOTA_LIMITS_Type;
     106             : static PyTypeObject netr_DELTA_POLICY_Type;
     107             : static PyTypeObject netr_DELTA_TRUSTED_DOMAIN_Type;
     108             : static PyTypeObject netr_DELTA_ACCOUNT_Type;
     109             : static PyTypeObject netr_CIPHER_VALUE_Type;
     110             : static PyTypeObject netr_DELTA_SECRET_Type;
     111             : static PyTypeObject netr_DELTA_UNION_Type;
     112             : static PyTypeObject netr_DELTA_ID_UNION_Type;
     113             : static PyTypeObject netr_DELTA_ENUM_Type;
     114             : static PyTypeObject netr_DELTA_ENUM_ARRAY_Type;
     115             : static PyTypeObject netr_UAS_INFO_0_Type;
     116             : static PyTypeObject netr_AccountBuffer_Type;
     117             : static PyTypeObject netr_NETLOGON_INFO_1_Type;
     118             : static PyTypeObject netr_NETLOGON_INFO_2_Type;
     119             : static PyTypeObject netr_NETLOGON_INFO_3_Type;
     120             : static PyTypeObject netr_NETLOGON_INFO_4_Type;
     121             : static PyTypeObject netr_CONTROL_QUERY_INFORMATION_Type;
     122             : static PyTypeObject netr_CONTROL_DATA_INFORMATION_Type;
     123             : static PyTypeObject netr_ChangeLogObject_Type;
     124             : static PyTypeObject netr_ChangeLogEntry_Type;
     125             : static PyTypeObject netr_Blob_Type;
     126             : static PyTypeObject netr_DsRGetDCNameInfo_Type;
     127             : static PyTypeObject netr_Capabilities_Type;
     128             : static PyTypeObject netr_LsaPolicyInformation_Type;
     129             : static PyTypeObject netr_OsVersionInfoEx_Type;
     130             : static PyTypeObject netr_OsVersion_Type;
     131             : static PyTypeObject netr_OsVersionContainer_Type;
     132             : static PyTypeObject netr_WorkstationInformation_Type;
     133             : static PyTypeObject netr_WorkstationInfo_Type;
     134             : static PyTypeObject netr_trust_extension_info_Type;
     135             : static PyTypeObject netr_trust_extension_Type;
     136             : static PyTypeObject netr_trust_extension_container_Type;
     137             : static PyTypeObject netr_OneDomainInfo_Type;
     138             : static PyTypeObject netr_DomainInformation_Type;
     139             : static PyTypeObject netr_DomainInfo_Type;
     140             : static PyTypeObject NL_PASSWORD_VERSION_Type;
     141             : static PyTypeObject netr_CryptPassword_Type;
     142             : static PyTypeObject netr_SendToSamResetBadPasswordCount_Type;
     143             : static PyTypeObject netr_SendToSamMessage_Type;
     144             : static PyTypeObject netr_SendToSamBase_Type;
     145             : static PyTypeObject netr_DsRAddressToSitenamesWCtr_Type;
     146             : static PyTypeObject netr_DsRAddress_Type;
     147             : static PyTypeObject netr_DomainTrust_Type;
     148             : static PyTypeObject netr_DomainTrustList_Type;
     149             : static PyTypeObject netr_DsRAddressToSitenamesExWCtr_Type;
     150             : static PyTypeObject DcSitesCtr_Type;
     151             : static PyTypeObject netr_TrustInfo_Type;
     152             : static PyTypeObject NL_DNS_NAME_INFO_Type;
     153             : static PyTypeObject NL_DNS_NAME_INFO_ARRAY_Type;
     154             : static PyTypeObject netlogon_InterfaceType;
     155             : static PyTypeObject netr_LogonUasLogon_Type;
     156             : static PyTypeObject netr_LogonUasLogoff_Type;
     157             : static PyTypeObject netr_LogonSamLogon_Type;
     158             : static PyTypeObject netr_LogonSamLogoff_Type;
     159             : static PyTypeObject netr_ServerReqChallenge_Type;
     160             : static PyTypeObject netr_ServerAuthenticate_Type;
     161             : static PyTypeObject netr_ServerPasswordSet_Type;
     162             : static PyTypeObject netr_DatabaseDeltas_Type;
     163             : static PyTypeObject netr_DatabaseSync_Type;
     164             : static PyTypeObject netr_AccountDeltas_Type;
     165             : static PyTypeObject netr_AccountSync_Type;
     166             : static PyTypeObject netr_GetDcName_Type;
     167             : static PyTypeObject netr_LogonControl_Type;
     168             : static PyTypeObject netr_GetAnyDCName_Type;
     169             : static PyTypeObject netr_LogonControl2_Type;
     170             : static PyTypeObject netr_ServerAuthenticate2_Type;
     171             : static PyTypeObject netr_DatabaseSync2_Type;
     172             : static PyTypeObject netr_DatabaseRedo_Type;
     173             : static PyTypeObject netr_LogonControl2Ex_Type;
     174             : static PyTypeObject netr_NetrEnumerateTrustedDomains_Type;
     175             : static PyTypeObject netr_DsRGetDCName_Type;
     176             : static PyTypeObject netr_LogonGetCapabilities_Type;
     177             : static PyTypeObject netr_LogonGetTrustRid_Type;
     178             : static PyTypeObject netr_ServerAuthenticate3_Type;
     179             : static PyTypeObject netr_DsRGetDCNameEx_Type;
     180             : static PyTypeObject netr_DsRGetSiteName_Type;
     181             : static PyTypeObject netr_LogonGetDomainInfo_Type;
     182             : static PyTypeObject netr_ServerPasswordSet2_Type;
     183             : static PyTypeObject netr_ServerPasswordGet_Type;
     184             : static PyTypeObject netr_NetrLogonSendToSam_Type;
     185             : static PyTypeObject netr_DsRAddressToSitenamesW_Type;
     186             : static PyTypeObject netr_DsRGetDCNameEx2_Type;
     187             : static PyTypeObject netr_NetrEnumerateTrustedDomainsEx_Type;
     188             : static PyTypeObject netr_DsRAddressToSitenamesExW_Type;
     189             : static PyTypeObject netr_DsrGetDcSiteCoverageW_Type;
     190             : static PyTypeObject netr_LogonSamLogonEx_Type;
     191             : static PyTypeObject netr_DsrEnumerateDomainTrusts_Type;
     192             : static PyTypeObject netr_DsrDeregisterDNSHostRecords_Type;
     193             : static PyTypeObject netr_ServerTrustPasswordsGet_Type;
     194             : static PyTypeObject netr_DsRGetForestTrustInformation_Type;
     195             : static PyTypeObject netr_GetForestTrustInformation_Type;
     196             : static PyTypeObject netr_LogonSamLogonWithFlags_Type;
     197             : static PyTypeObject netr_ServerGetTrustInfo_Type;
     198             : static PyTypeObject netr_Unused47_Type;
     199             : static PyTypeObject netr_DsrUpdateReadOnlyServerDnsRecords_Type;
     200             : 
     201             : static PyTypeObject *BaseObject_Type;
     202             : static PyTypeObject *lsa_String_Type;
     203             : static PyTypeObject *samr_Password_Type;
     204             : static PyTypeObject *samr_RidWithAttributeArray_Type;
     205             : static PyTypeObject *lsa_StringLarge_Type;
     206             : static PyTypeObject *dom_sid_Type;
     207             : static PyTypeObject *samr_LogonHours_Type;
     208             : static PyTypeObject *lsa_BinaryString_Type;
     209             : static PyTypeObject *sec_desc_buf_Type;
     210             : static PyTypeObject *lsa_SidArray_Type;
     211             : static PyTypeObject *GUID_Type;
     212             : static PyTypeObject *lsa_ForestTrustInformation_Type;
     213             : static PyTypeObject *ClientConnection_Type;
     214             : static PyTypeObject *ndr_syntax_id_Type;
     215             : 
     216           0 : static PyObject *py_netr_UasInfo_get_account_name(PyObject *obj, void *closure)
     217             : {
     218           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     219           0 :         PyObject *py_account_name;
     220           0 :         if (object->account_name == NULL) {
     221           0 :                 Py_RETURN_NONE;
     222             :         }
     223           0 :         if (object->account_name == NULL) {
     224           0 :                 py_account_name = Py_None;
     225           0 :                 Py_INCREF(py_account_name);
     226             :         } else {
     227           0 :                 if (object->account_name == NULL) {
     228           0 :                         py_account_name = Py_None;
     229           0 :                         Py_INCREF(py_account_name);
     230             :                 } else {
     231           0 :                         py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
     232             :                 }
     233             :         }
     234           0 :         return py_account_name;
     235             : }
     236             : 
     237           0 : static int py_netr_UasInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
     238             : {
     239           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     240           0 :         if (value == NULL) {
     241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
     242           0 :                 return -1;
     243             :         }
     244           0 :         if (value == Py_None) {
     245           0 :                 object->account_name = NULL;
     246             :         } else {
     247           0 :                 object->account_name = NULL;
     248             :                 {
     249           0 :                         const char *test_str;
     250           0 :                         const char *talloc_str;
     251           0 :                         PyObject *unicode = NULL;
     252           0 :                         if (PyUnicode_Check(value)) {
     253           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     254           0 :                                 if (unicode == NULL) {
     255           0 :                                         return -1;
     256             :                                 }
     257           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     258           0 :                         } else if (PyBytes_Check(value)) {
     259           0 :                                 test_str = PyBytes_AS_STRING(value);
     260             :                         } else {
     261           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     262           0 :                                 return -1;
     263             :                         }
     264           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     265           0 :                         if (unicode != NULL) {
     266           0 :                                 Py_DECREF(unicode);
     267             :                         }
     268           0 :                         if (talloc_str == NULL) {
     269           0 :                                 PyErr_NoMemory();
     270           0 :                                 return -1;
     271             :                         }
     272           0 :                         object->account_name = talloc_str;
     273             :                 }
     274             :         }
     275           0 :         return 0;
     276             : }
     277             : 
     278           0 : static PyObject *py_netr_UasInfo_get_priv(PyObject *obj, void *closure)
     279             : {
     280           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     281           0 :         PyObject *py_priv;
     282           0 :         py_priv = PyLong_FromUnsignedLongLong((uint32_t)(object->priv));
     283           0 :         return py_priv;
     284             : }
     285             : 
     286           0 : static int py_netr_UasInfo_set_priv(PyObject *py_obj, PyObject *value, void *closure)
     287             : {
     288           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     289           0 :         if (value == NULL) {
     290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->priv");
     291           0 :                 return -1;
     292             :         }
     293             :         {
     294           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priv));
     295           0 :                 if (PyLong_Check(value)) {
     296           0 :                         unsigned long long test_var;
     297           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     298           0 :                         if (PyErr_Occurred() != NULL) {
     299           0 :                                 return -1;
     300             :                         }
     301           0 :                         if (test_var > uint_max) {
     302           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     303             :                                   PyLong_Type.tp_name, uint_max, test_var);
     304           0 :                                 return -1;
     305             :                         }
     306           0 :                         object->priv = test_var;
     307             :                 } else {
     308           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     309             :                           PyLong_Type.tp_name);
     310           0 :                         return -1;
     311             :                 }
     312             :         }
     313           0 :         return 0;
     314             : }
     315             : 
     316           0 : static PyObject *py_netr_UasInfo_get_auth_flags(PyObject *obj, void *closure)
     317             : {
     318           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     319           0 :         PyObject *py_auth_flags;
     320           0 :         py_auth_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->auth_flags));
     321           0 :         return py_auth_flags;
     322             : }
     323             : 
     324           0 : static int py_netr_UasInfo_set_auth_flags(PyObject *py_obj, PyObject *value, void *closure)
     325             : {
     326           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     327           0 :         if (value == NULL) {
     328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auth_flags");
     329           0 :                 return -1;
     330             :         }
     331             :         {
     332           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_flags));
     333           0 :                 if (PyLong_Check(value)) {
     334           0 :                         unsigned long long test_var;
     335           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     336           0 :                         if (PyErr_Occurred() != NULL) {
     337           0 :                                 return -1;
     338             :                         }
     339           0 :                         if (test_var > uint_max) {
     340           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     341             :                                   PyLong_Type.tp_name, uint_max, test_var);
     342           0 :                                 return -1;
     343             :                         }
     344           0 :                         object->auth_flags = test_var;
     345             :                 } else {
     346           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     347             :                           PyLong_Type.tp_name);
     348           0 :                         return -1;
     349             :                 }
     350             :         }
     351           0 :         return 0;
     352             : }
     353             : 
     354           0 : static PyObject *py_netr_UasInfo_get_logon_count(PyObject *obj, void *closure)
     355             : {
     356           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     357           0 :         PyObject *py_logon_count;
     358           0 :         py_logon_count = PyLong_FromUnsignedLongLong((uint32_t)(object->logon_count));
     359           0 :         return py_logon_count;
     360             : }
     361             : 
     362           0 : static int py_netr_UasInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
     363             : {
     364           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     365           0 :         if (value == NULL) {
     366           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_count");
     367           0 :                 return -1;
     368             :         }
     369             :         {
     370           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
     371           0 :                 if (PyLong_Check(value)) {
     372           0 :                         unsigned long long test_var;
     373           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     374           0 :                         if (PyErr_Occurred() != NULL) {
     375           0 :                                 return -1;
     376             :                         }
     377           0 :                         if (test_var > uint_max) {
     378           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     379             :                                   PyLong_Type.tp_name, uint_max, test_var);
     380           0 :                                 return -1;
     381             :                         }
     382           0 :                         object->logon_count = test_var;
     383             :                 } else {
     384           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     385             :                           PyLong_Type.tp_name);
     386           0 :                         return -1;
     387             :                 }
     388             :         }
     389           0 :         return 0;
     390             : }
     391             : 
     392           0 : static PyObject *py_netr_UasInfo_get_bad_pw_count(PyObject *obj, void *closure)
     393             : {
     394           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     395           0 :         PyObject *py_bad_pw_count;
     396           0 :         py_bad_pw_count = PyLong_FromUnsignedLongLong((uint32_t)(object->bad_pw_count));
     397           0 :         return py_bad_pw_count;
     398             : }
     399             : 
     400           0 : static int py_netr_UasInfo_set_bad_pw_count(PyObject *py_obj, PyObject *value, void *closure)
     401             : {
     402           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     403           0 :         if (value == NULL) {
     404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bad_pw_count");
     405           0 :                 return -1;
     406             :         }
     407             :         {
     408           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_pw_count));
     409           0 :                 if (PyLong_Check(value)) {
     410           0 :                         unsigned long long test_var;
     411           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     412           0 :                         if (PyErr_Occurred() != NULL) {
     413           0 :                                 return -1;
     414             :                         }
     415           0 :                         if (test_var > uint_max) {
     416           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     417             :                                   PyLong_Type.tp_name, uint_max, test_var);
     418           0 :                                 return -1;
     419             :                         }
     420           0 :                         object->bad_pw_count = test_var;
     421             :                 } else {
     422           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     423             :                           PyLong_Type.tp_name);
     424           0 :                         return -1;
     425             :                 }
     426             :         }
     427           0 :         return 0;
     428             : }
     429             : 
     430           0 : static PyObject *py_netr_UasInfo_get_last_logon(PyObject *obj, void *closure)
     431             : {
     432           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     433           0 :         PyObject *py_last_logon;
     434           0 :         py_last_logon = PyLong_FromLong(object->last_logon);
     435           0 :         return py_last_logon;
     436             : }
     437             : 
     438           0 : static int py_netr_UasInfo_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
     439             : {
     440           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     441           0 :         if (value == NULL) {
     442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_logon");
     443           0 :                 return -1;
     444             :         }
     445             :         {
     446           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logon));
     447           0 :                 const long long int_min = -int_max - 1;
     448           0 :                 if (PyLong_Check(value)) {
     449           0 :                         long long test_var;
     450           0 :                         test_var = PyLong_AsLongLong(value);
     451           0 :                         if (PyErr_Occurred() != NULL) {
     452           0 :                                 return -1;
     453             :                         }
     454           0 :                         if (test_var < int_min || test_var > int_max) {
     455           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     456             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     457           0 :                                 return -1;
     458             :                         }
     459           0 :                         object->last_logon = test_var;
     460             :                 } else {
     461           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     462             :                           PyLong_Type.tp_name);
     463           0 :                         return -1;
     464             :                 }
     465             :         }
     466           0 :         return 0;
     467             : }
     468             : 
     469           0 : static PyObject *py_netr_UasInfo_get_last_logoff(PyObject *obj, void *closure)
     470             : {
     471           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     472           0 :         PyObject *py_last_logoff;
     473           0 :         py_last_logoff = PyLong_FromLong(object->last_logoff);
     474           0 :         return py_last_logoff;
     475             : }
     476             : 
     477           0 : static int py_netr_UasInfo_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
     478             : {
     479           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     480           0 :         if (value == NULL) {
     481           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_logoff");
     482           0 :                 return -1;
     483             :         }
     484             :         {
     485           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logoff));
     486           0 :                 const long long int_min = -int_max - 1;
     487           0 :                 if (PyLong_Check(value)) {
     488           0 :                         long long test_var;
     489           0 :                         test_var = PyLong_AsLongLong(value);
     490           0 :                         if (PyErr_Occurred() != NULL) {
     491           0 :                                 return -1;
     492             :                         }
     493           0 :                         if (test_var < int_min || test_var > int_max) {
     494           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     495             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     496           0 :                                 return -1;
     497             :                         }
     498           0 :                         object->last_logoff = test_var;
     499             :                 } else {
     500           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     501             :                           PyLong_Type.tp_name);
     502           0 :                         return -1;
     503             :                 }
     504             :         }
     505           0 :         return 0;
     506             : }
     507             : 
     508           0 : static PyObject *py_netr_UasInfo_get_logoff_time(PyObject *obj, void *closure)
     509             : {
     510           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     511           0 :         PyObject *py_logoff_time;
     512           0 :         py_logoff_time = PyLong_FromLong(object->logoff_time);
     513           0 :         return py_logoff_time;
     514             : }
     515             : 
     516           0 : static int py_netr_UasInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
     517             : {
     518           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     519           0 :         if (value == NULL) {
     520           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logoff_time");
     521           0 :                 return -1;
     522             :         }
     523             :         {
     524           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->logoff_time));
     525           0 :                 const long long int_min = -int_max - 1;
     526           0 :                 if (PyLong_Check(value)) {
     527           0 :                         long long test_var;
     528           0 :                         test_var = PyLong_AsLongLong(value);
     529           0 :                         if (PyErr_Occurred() != NULL) {
     530           0 :                                 return -1;
     531             :                         }
     532           0 :                         if (test_var < int_min || test_var > int_max) {
     533           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     534             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     535           0 :                                 return -1;
     536             :                         }
     537           0 :                         object->logoff_time = test_var;
     538             :                 } else {
     539           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     540             :                           PyLong_Type.tp_name);
     541           0 :                         return -1;
     542             :                 }
     543             :         }
     544           0 :         return 0;
     545             : }
     546             : 
     547           0 : static PyObject *py_netr_UasInfo_get_kickoff_time(PyObject *obj, void *closure)
     548             : {
     549           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     550           0 :         PyObject *py_kickoff_time;
     551           0 :         py_kickoff_time = PyLong_FromLong(object->kickoff_time);
     552           0 :         return py_kickoff_time;
     553             : }
     554             : 
     555           0 : static int py_netr_UasInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
     556             : {
     557           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     558           0 :         if (value == NULL) {
     559           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->kickoff_time");
     560           0 :                 return -1;
     561             :         }
     562             :         {
     563           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->kickoff_time));
     564           0 :                 const long long int_min = -int_max - 1;
     565           0 :                 if (PyLong_Check(value)) {
     566           0 :                         long long test_var;
     567           0 :                         test_var = PyLong_AsLongLong(value);
     568           0 :                         if (PyErr_Occurred() != NULL) {
     569           0 :                                 return -1;
     570             :                         }
     571           0 :                         if (test_var < int_min || test_var > int_max) {
     572           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     573             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     574           0 :                                 return -1;
     575             :                         }
     576           0 :                         object->kickoff_time = test_var;
     577             :                 } else {
     578           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     579             :                           PyLong_Type.tp_name);
     580           0 :                         return -1;
     581             :                 }
     582             :         }
     583           0 :         return 0;
     584             : }
     585             : 
     586           0 : static PyObject *py_netr_UasInfo_get_password_age(PyObject *obj, void *closure)
     587             : {
     588           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     589           0 :         PyObject *py_password_age;
     590           0 :         py_password_age = PyLong_FromUnsignedLongLong((uint32_t)(object->password_age));
     591           0 :         return py_password_age;
     592             : }
     593             : 
     594           0 : static int py_netr_UasInfo_set_password_age(PyObject *py_obj, PyObject *value, void *closure)
     595             : {
     596           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     597           0 :         if (value == NULL) {
     598           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->password_age");
     599           0 :                 return -1;
     600             :         }
     601             :         {
     602           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_age));
     603           0 :                 if (PyLong_Check(value)) {
     604           0 :                         unsigned long long test_var;
     605           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     606           0 :                         if (PyErr_Occurred() != NULL) {
     607           0 :                                 return -1;
     608             :                         }
     609           0 :                         if (test_var > uint_max) {
     610           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     611             :                                   PyLong_Type.tp_name, uint_max, test_var);
     612           0 :                                 return -1;
     613             :                         }
     614           0 :                         object->password_age = test_var;
     615             :                 } else {
     616           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     617             :                           PyLong_Type.tp_name);
     618           0 :                         return -1;
     619             :                 }
     620             :         }
     621           0 :         return 0;
     622             : }
     623             : 
     624           0 : static PyObject *py_netr_UasInfo_get_pw_can_change(PyObject *obj, void *closure)
     625             : {
     626           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     627           0 :         PyObject *py_pw_can_change;
     628           0 :         py_pw_can_change = PyLong_FromLong(object->pw_can_change);
     629           0 :         return py_pw_can_change;
     630             : }
     631             : 
     632           0 : static int py_netr_UasInfo_set_pw_can_change(PyObject *py_obj, PyObject *value, void *closure)
     633             : {
     634           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     635           0 :         if (value == NULL) {
     636           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pw_can_change");
     637           0 :                 return -1;
     638             :         }
     639             :         {
     640           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_can_change));
     641           0 :                 const long long int_min = -int_max - 1;
     642           0 :                 if (PyLong_Check(value)) {
     643           0 :                         long long test_var;
     644           0 :                         test_var = PyLong_AsLongLong(value);
     645           0 :                         if (PyErr_Occurred() != NULL) {
     646           0 :                                 return -1;
     647             :                         }
     648           0 :                         if (test_var < int_min || test_var > int_max) {
     649           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     650             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     651           0 :                                 return -1;
     652             :                         }
     653           0 :                         object->pw_can_change = test_var;
     654             :                 } else {
     655           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     656             :                           PyLong_Type.tp_name);
     657           0 :                         return -1;
     658             :                 }
     659             :         }
     660           0 :         return 0;
     661             : }
     662             : 
     663           0 : static PyObject *py_netr_UasInfo_get_pw_must_change(PyObject *obj, void *closure)
     664             : {
     665           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     666           0 :         PyObject *py_pw_must_change;
     667           0 :         py_pw_must_change = PyLong_FromLong(object->pw_must_change);
     668           0 :         return py_pw_must_change;
     669             : }
     670             : 
     671           0 : static int py_netr_UasInfo_set_pw_must_change(PyObject *py_obj, PyObject *value, void *closure)
     672             : {
     673           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     674           0 :         if (value == NULL) {
     675           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pw_must_change");
     676           0 :                 return -1;
     677             :         }
     678             :         {
     679           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_must_change));
     680           0 :                 const long long int_min = -int_max - 1;
     681           0 :                 if (PyLong_Check(value)) {
     682           0 :                         long long test_var;
     683           0 :                         test_var = PyLong_AsLongLong(value);
     684           0 :                         if (PyErr_Occurred() != NULL) {
     685           0 :                                 return -1;
     686             :                         }
     687           0 :                         if (test_var < int_min || test_var > int_max) {
     688           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     689             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     690           0 :                                 return -1;
     691             :                         }
     692           0 :                         object->pw_must_change = test_var;
     693             :                 } else {
     694           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     695             :                           PyLong_Type.tp_name);
     696           0 :                         return -1;
     697             :                 }
     698             :         }
     699           0 :         return 0;
     700             : }
     701             : 
     702           0 : static PyObject *py_netr_UasInfo_get_computer(PyObject *obj, void *closure)
     703             : {
     704           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     705           0 :         PyObject *py_computer;
     706           0 :         if (object->computer == NULL) {
     707           0 :                 Py_RETURN_NONE;
     708             :         }
     709           0 :         if (object->computer == NULL) {
     710           0 :                 py_computer = Py_None;
     711           0 :                 Py_INCREF(py_computer);
     712             :         } else {
     713           0 :                 if (object->computer == NULL) {
     714           0 :                         py_computer = Py_None;
     715           0 :                         Py_INCREF(py_computer);
     716             :                 } else {
     717           0 :                         py_computer = PyUnicode_Decode(object->computer, strlen(object->computer), "utf-8", "ignore");
     718             :                 }
     719             :         }
     720           0 :         return py_computer;
     721             : }
     722             : 
     723           0 : static int py_netr_UasInfo_set_computer(PyObject *py_obj, PyObject *value, void *closure)
     724             : {
     725           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     726           0 :         if (value == NULL) {
     727           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->computer");
     728           0 :                 return -1;
     729             :         }
     730           0 :         if (value == Py_None) {
     731           0 :                 object->computer = NULL;
     732             :         } else {
     733           0 :                 object->computer = NULL;
     734             :                 {
     735           0 :                         const char *test_str;
     736           0 :                         const char *talloc_str;
     737           0 :                         PyObject *unicode = NULL;
     738           0 :                         if (PyUnicode_Check(value)) {
     739           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     740           0 :                                 if (unicode == NULL) {
     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 = pytalloc_get_ptr(obj);
     767           0 :         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 = pytalloc_get_ptr(py_obj);
     788           0 :         if (value == NULL) {
     789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: 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           0 :                         const char *test_str;
     798           0 :                         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 :                                         return -1;
     804             :                                 }
     805           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     806           0 :                         } else if (PyBytes_Check(value)) {
     807           0 :                                 test_str = PyBytes_AS_STRING(value);
     808             :                         } else {
     809           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     810           0 :                                 return -1;
     811             :                         }
     812           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     813           0 :                         if (unicode != NULL) {
     814           0 :                                 Py_DECREF(unicode);
     815             :                         }
     816           0 :                         if (talloc_str == NULL) {
     817           0 :                                 PyErr_NoMemory();
     818           0 :                                 return -1;
     819             :                         }
     820           0 :                         object->domain = talloc_str;
     821             :                 }
     822             :         }
     823           0 :         return 0;
     824             : }
     825             : 
     826           0 : static PyObject *py_netr_UasInfo_get_script_path(PyObject *obj, void *closure)
     827             : {
     828           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     829           0 :         PyObject *py_script_path;
     830           0 :         if (object->script_path == NULL) {
     831           0 :                 Py_RETURN_NONE;
     832             :         }
     833           0 :         if (object->script_path == NULL) {
     834           0 :                 py_script_path = Py_None;
     835           0 :                 Py_INCREF(py_script_path);
     836             :         } else {
     837           0 :                 if (object->script_path == NULL) {
     838           0 :                         py_script_path = Py_None;
     839           0 :                         Py_INCREF(py_script_path);
     840             :                 } else {
     841           0 :                         py_script_path = PyUnicode_Decode(object->script_path, strlen(object->script_path), "utf-8", "ignore");
     842             :                 }
     843             :         }
     844           0 :         return py_script_path;
     845             : }
     846             : 
     847           0 : static int py_netr_UasInfo_set_script_path(PyObject *py_obj, PyObject *value, void *closure)
     848             : {
     849           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     850           0 :         if (value == NULL) {
     851           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->script_path");
     852           0 :                 return -1;
     853             :         }
     854           0 :         if (value == Py_None) {
     855           0 :                 object->script_path = NULL;
     856             :         } else {
     857           0 :                 object->script_path = NULL;
     858             :                 {
     859           0 :                         const char *test_str;
     860           0 :                         const char *talloc_str;
     861           0 :                         PyObject *unicode = NULL;
     862           0 :                         if (PyUnicode_Check(value)) {
     863           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     864           0 :                                 if (unicode == NULL) {
     865           0 :                                         return -1;
     866             :                                 }
     867           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     868           0 :                         } else if (PyBytes_Check(value)) {
     869           0 :                                 test_str = PyBytes_AS_STRING(value);
     870             :                         } else {
     871           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     872           0 :                                 return -1;
     873             :                         }
     874           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     875           0 :                         if (unicode != NULL) {
     876           0 :                                 Py_DECREF(unicode);
     877             :                         }
     878           0 :                         if (talloc_str == NULL) {
     879           0 :                                 PyErr_NoMemory();
     880           0 :                                 return -1;
     881             :                         }
     882           0 :                         object->script_path = talloc_str;
     883             :                 }
     884             :         }
     885           0 :         return 0;
     886             : }
     887             : 
     888           0 : static PyObject *py_netr_UasInfo_get_unknown(PyObject *obj, void *closure)
     889             : {
     890           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(obj);
     891           0 :         PyObject *py_unknown;
     892           0 :         py_unknown = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown));
     893           0 :         return py_unknown;
     894             : }
     895             : 
     896           0 : static int py_netr_UasInfo_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
     897             : {
     898           0 :         struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
     899           0 :         if (value == NULL) {
     900           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown");
     901           0 :                 return -1;
     902             :         }
     903             :         {
     904           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown));
     905           0 :                 if (PyLong_Check(value)) {
     906           0 :                         unsigned long long test_var;
     907           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     908           0 :                         if (PyErr_Occurred() != NULL) {
     909           0 :                                 return -1;
     910             :                         }
     911           0 :                         if (test_var > uint_max) {
     912           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     913             :                                   PyLong_Type.tp_name, uint_max, test_var);
     914           0 :                                 return -1;
     915             :                         }
     916           0 :                         object->unknown = test_var;
     917             :                 } else {
     918           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     919             :                           PyLong_Type.tp_name);
     920           0 :                         return -1;
     921             :                 }
     922             :         }
     923           0 :         return 0;
     924             : }
     925             : 
     926             : static PyGetSetDef py_netr_UasInfo_getsetters[] = {
     927             :         {
     928             :                 .name = discard_const_p(char, "account_name"),
     929             :                 .get = py_netr_UasInfo_get_account_name,
     930             :                 .set = py_netr_UasInfo_set_account_name,
     931             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     932             :         },
     933             :         {
     934             :                 .name = discard_const_p(char, "priv"),
     935             :                 .get = py_netr_UasInfo_get_priv,
     936             :                 .set = py_netr_UasInfo_set_priv,
     937             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     938             :         },
     939             :         {
     940             :                 .name = discard_const_p(char, "auth_flags"),
     941             :                 .get = py_netr_UasInfo_get_auth_flags,
     942             :                 .set = py_netr_UasInfo_set_auth_flags,
     943             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     944             :         },
     945             :         {
     946             :                 .name = discard_const_p(char, "logon_count"),
     947             :                 .get = py_netr_UasInfo_get_logon_count,
     948             :                 .set = py_netr_UasInfo_set_logon_count,
     949             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     950             :         },
     951             :         {
     952             :                 .name = discard_const_p(char, "bad_pw_count"),
     953             :                 .get = py_netr_UasInfo_get_bad_pw_count,
     954             :                 .set = py_netr_UasInfo_set_bad_pw_count,
     955             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     956             :         },
     957             :         {
     958             :                 .name = discard_const_p(char, "last_logon"),
     959             :                 .get = py_netr_UasInfo_get_last_logon,
     960             :                 .set = py_netr_UasInfo_set_last_logon,
     961             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     962             :         },
     963             :         {
     964             :                 .name = discard_const_p(char, "last_logoff"),
     965             :                 .get = py_netr_UasInfo_get_last_logoff,
     966             :                 .set = py_netr_UasInfo_set_last_logoff,
     967             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     968             :         },
     969             :         {
     970             :                 .name = discard_const_p(char, "logoff_time"),
     971             :                 .get = py_netr_UasInfo_get_logoff_time,
     972             :                 .set = py_netr_UasInfo_set_logoff_time,
     973             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     974             :         },
     975             :         {
     976             :                 .name = discard_const_p(char, "kickoff_time"),
     977             :                 .get = py_netr_UasInfo_get_kickoff_time,
     978             :                 .set = py_netr_UasInfo_set_kickoff_time,
     979             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     980             :         },
     981             :         {
     982             :                 .name = discard_const_p(char, "password_age"),
     983             :                 .get = py_netr_UasInfo_get_password_age,
     984             :                 .set = py_netr_UasInfo_set_password_age,
     985             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     986             :         },
     987             :         {
     988             :                 .name = discard_const_p(char, "pw_can_change"),
     989             :                 .get = py_netr_UasInfo_get_pw_can_change,
     990             :                 .set = py_netr_UasInfo_set_pw_can_change,
     991             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     992             :         },
     993             :         {
     994             :                 .name = discard_const_p(char, "pw_must_change"),
     995             :                 .get = py_netr_UasInfo_get_pw_must_change,
     996             :                 .set = py_netr_UasInfo_set_pw_must_change,
     997             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     998             :         },
     999             :         {
    1000             :                 .name = discard_const_p(char, "computer"),
    1001             :                 .get = py_netr_UasInfo_get_computer,
    1002             :                 .set = py_netr_UasInfo_set_computer,
    1003             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1004             :         },
    1005             :         {
    1006             :                 .name = discard_const_p(char, "domain"),
    1007             :                 .get = py_netr_UasInfo_get_domain,
    1008             :                 .set = py_netr_UasInfo_set_domain,
    1009             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1010             :         },
    1011             :         {
    1012             :                 .name = discard_const_p(char, "script_path"),
    1013             :                 .get = py_netr_UasInfo_get_script_path,
    1014             :                 .set = py_netr_UasInfo_set_script_path,
    1015             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1016             :         },
    1017             :         {
    1018             :                 .name = discard_const_p(char, "unknown"),
    1019             :                 .get = py_netr_UasInfo_get_unknown,
    1020             :                 .set = py_netr_UasInfo_set_unknown,
    1021             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1022             :         },
    1023             :         { .name = NULL }
    1024             : };
    1025             : 
    1026           0 : static PyObject *py_netr_UasInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1027             : {
    1028           0 :         return pytalloc_new(struct netr_UasInfo, type);
    1029             : }
    1030             : 
    1031             : 
    1032             : static PyTypeObject netr_UasInfo_Type = {
    1033             :         PyVarObject_HEAD_INIT(NULL, 0)
    1034             :         .tp_name = "netlogon.netr_UasInfo",
    1035             :         .tp_getset = py_netr_UasInfo_getsetters,
    1036             :         .tp_methods = NULL,
    1037             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1038             :         .tp_new = py_netr_UasInfo_new,
    1039             : };
    1040             : 
    1041             : 
    1042           0 : static PyObject *py_netr_UasLogoffInfo_get_duration(PyObject *obj, void *closure)
    1043             : {
    1044           0 :         struct netr_UasLogoffInfo *object = pytalloc_get_ptr(obj);
    1045           0 :         PyObject *py_duration;
    1046           0 :         py_duration = PyLong_FromUnsignedLongLong((uint32_t)(object->duration));
    1047           0 :         return py_duration;
    1048             : }
    1049             : 
    1050           0 : static int py_netr_UasLogoffInfo_set_duration(PyObject *py_obj, PyObject *value, void *closure)
    1051             : {
    1052           0 :         struct netr_UasLogoffInfo *object = pytalloc_get_ptr(py_obj);
    1053           0 :         if (value == NULL) {
    1054           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->duration");
    1055           0 :                 return -1;
    1056             :         }
    1057             :         {
    1058           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->duration));
    1059           0 :                 if (PyLong_Check(value)) {
    1060           0 :                         unsigned long long test_var;
    1061           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1062           0 :                         if (PyErr_Occurred() != NULL) {
    1063           0 :                                 return -1;
    1064             :                         }
    1065           0 :                         if (test_var > uint_max) {
    1066           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1067             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1068           0 :                                 return -1;
    1069             :                         }
    1070           0 :                         object->duration = test_var;
    1071             :                 } else {
    1072           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1073             :                           PyLong_Type.tp_name);
    1074           0 :                         return -1;
    1075             :                 }
    1076             :         }
    1077           0 :         return 0;
    1078             : }
    1079             : 
    1080           0 : static PyObject *py_netr_UasLogoffInfo_get_logon_count(PyObject *obj, void *closure)
    1081             : {
    1082           0 :         struct netr_UasLogoffInfo *object = pytalloc_get_ptr(obj);
    1083           0 :         PyObject *py_logon_count;
    1084           0 :         py_logon_count = PyLong_FromLong((uint16_t)(object->logon_count));
    1085           0 :         return py_logon_count;
    1086             : }
    1087             : 
    1088           0 : static int py_netr_UasLogoffInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    1089             : {
    1090           0 :         struct netr_UasLogoffInfo *object = pytalloc_get_ptr(py_obj);
    1091           0 :         if (value == NULL) {
    1092           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_count");
    1093           0 :                 return -1;
    1094             :         }
    1095             :         {
    1096           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    1097           0 :                 if (PyLong_Check(value)) {
    1098           0 :                         unsigned long long test_var;
    1099           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1100           0 :                         if (PyErr_Occurred() != NULL) {
    1101           0 :                                 return -1;
    1102             :                         }
    1103           0 :                         if (test_var > uint_max) {
    1104           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1105             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1106           0 :                                 return -1;
    1107             :                         }
    1108           0 :                         object->logon_count = test_var;
    1109             :                 } else {
    1110           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1111             :                           PyLong_Type.tp_name);
    1112           0 :                         return -1;
    1113             :                 }
    1114             :         }
    1115           0 :         return 0;
    1116             : }
    1117             : 
    1118             : static PyGetSetDef py_netr_UasLogoffInfo_getsetters[] = {
    1119             :         {
    1120             :                 .name = discard_const_p(char, "duration"),
    1121             :                 .get = py_netr_UasLogoffInfo_get_duration,
    1122             :                 .set = py_netr_UasLogoffInfo_set_duration,
    1123             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1124             :         },
    1125             :         {
    1126             :                 .name = discard_const_p(char, "logon_count"),
    1127             :                 .get = py_netr_UasLogoffInfo_get_logon_count,
    1128             :                 .set = py_netr_UasLogoffInfo_set_logon_count,
    1129             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1130             :         },
    1131             :         { .name = NULL }
    1132             : };
    1133             : 
    1134           0 : static PyObject *py_netr_UasLogoffInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1135             : {
    1136           0 :         return pytalloc_new(struct netr_UasLogoffInfo, type);
    1137             : }
    1138             : 
    1139             : 
    1140             : static PyTypeObject netr_UasLogoffInfo_Type = {
    1141             :         PyVarObject_HEAD_INIT(NULL, 0)
    1142             :         .tp_name = "netlogon.netr_UasLogoffInfo",
    1143             :         .tp_getset = py_netr_UasLogoffInfo_getsetters,
    1144             :         .tp_methods = NULL,
    1145             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1146             :         .tp_new = py_netr_UasLogoffInfo_new,
    1147             : };
    1148             : 
    1149             : 
    1150           0 : static PyObject *py_netr_AcctLockStr_get_lockout_duration(PyObject *obj, void *closure)
    1151             : {
    1152           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(obj);
    1153           0 :         PyObject *py_lockout_duration;
    1154           0 :         py_lockout_duration = PyLong_FromLongLong(object->lockout_duration);
    1155           0 :         return py_lockout_duration;
    1156             : }
    1157             : 
    1158           0 : static int py_netr_AcctLockStr_set_lockout_duration(PyObject *py_obj, PyObject *value, void *closure)
    1159             : {
    1160           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
    1161           0 :         if (value == NULL) {
    1162           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lockout_duration");
    1163           0 :                 return -1;
    1164             :         }
    1165             :         {
    1166           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->lockout_duration));
    1167           0 :                 const long long int_min = -int_max - 1;
    1168           0 :                 if (PyLong_Check(value)) {
    1169           0 :                         long long test_var;
    1170           0 :                         test_var = PyLong_AsLongLong(value);
    1171           0 :                         if (PyErr_Occurred() != NULL) {
    1172           0 :                                 return -1;
    1173             :                         }
    1174           0 :                         if (test_var < int_min || test_var > int_max) {
    1175           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    1176             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    1177           0 :                                 return -1;
    1178             :                         }
    1179           0 :                         object->lockout_duration = test_var;
    1180             :                 } else {
    1181           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1182             :                           PyLong_Type.tp_name);
    1183           0 :                         return -1;
    1184             :                 }
    1185             :         }
    1186           0 :         return 0;
    1187             : }
    1188             : 
    1189           0 : static PyObject *py_netr_AcctLockStr_get_reset_count(PyObject *obj, void *closure)
    1190             : {
    1191           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(obj);
    1192           0 :         PyObject *py_reset_count;
    1193           0 :         py_reset_count = PyLong_FromUnsignedLongLong(object->reset_count);
    1194           0 :         return py_reset_count;
    1195             : }
    1196             : 
    1197           0 : static int py_netr_AcctLockStr_set_reset_count(PyObject *py_obj, PyObject *value, void *closure)
    1198             : {
    1199           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
    1200           0 :         if (value == NULL) {
    1201           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reset_count");
    1202           0 :                 return -1;
    1203             :         }
    1204             :         {
    1205           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reset_count));
    1206           0 :                 if (PyLong_Check(value)) {
    1207           0 :                         unsigned long long test_var;
    1208           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1209           0 :                         if (PyErr_Occurred() != NULL) {
    1210           0 :                                 return -1;
    1211             :                         }
    1212           0 :                         if (test_var > uint_max) {
    1213           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1214             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1215           0 :                                 return -1;
    1216             :                         }
    1217           0 :                         object->reset_count = test_var;
    1218             :                 } else {
    1219           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1220             :                           PyLong_Type.tp_name);
    1221           0 :                         return -1;
    1222             :                 }
    1223             :         }
    1224           0 :         return 0;
    1225             : }
    1226             : 
    1227           0 : static PyObject *py_netr_AcctLockStr_get_bad_attempt_lockout(PyObject *obj, void *closure)
    1228             : {
    1229           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(obj);
    1230           0 :         PyObject *py_bad_attempt_lockout;
    1231           0 :         py_bad_attempt_lockout = PyLong_FromUnsignedLongLong((uint32_t)(object->bad_attempt_lockout));
    1232           0 :         return py_bad_attempt_lockout;
    1233             : }
    1234             : 
    1235           0 : static int py_netr_AcctLockStr_set_bad_attempt_lockout(PyObject *py_obj, PyObject *value, void *closure)
    1236             : {
    1237           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
    1238           0 :         if (value == NULL) {
    1239           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bad_attempt_lockout");
    1240           0 :                 return -1;
    1241             :         }
    1242             :         {
    1243           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_attempt_lockout));
    1244           0 :                 if (PyLong_Check(value)) {
    1245           0 :                         unsigned long long test_var;
    1246           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1247           0 :                         if (PyErr_Occurred() != NULL) {
    1248           0 :                                 return -1;
    1249             :                         }
    1250           0 :                         if (test_var > uint_max) {
    1251           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1252             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1253           0 :                                 return -1;
    1254             :                         }
    1255           0 :                         object->bad_attempt_lockout = test_var;
    1256             :                 } else {
    1257           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1258             :                           PyLong_Type.tp_name);
    1259           0 :                         return -1;
    1260             :                 }
    1261             :         }
    1262           0 :         return 0;
    1263             : }
    1264             : 
    1265           0 : static PyObject *py_netr_AcctLockStr_get_dummy(PyObject *obj, void *closure)
    1266             : {
    1267           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(obj);
    1268           0 :         PyObject *py_dummy;
    1269           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy));
    1270           0 :         return py_dummy;
    1271             : }
    1272             : 
    1273           0 : static int py_netr_AcctLockStr_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
    1274             : {
    1275           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
    1276           0 :         if (value == NULL) {
    1277           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy");
    1278           0 :                 return -1;
    1279             :         }
    1280             :         {
    1281           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
    1282           0 :                 if (PyLong_Check(value)) {
    1283           0 :                         unsigned long long test_var;
    1284           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1285           0 :                         if (PyErr_Occurred() != NULL) {
    1286           0 :                                 return -1;
    1287             :                         }
    1288           0 :                         if (test_var > uint_max) {
    1289           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1290             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1291           0 :                                 return -1;
    1292             :                         }
    1293           0 :                         object->dummy = test_var;
    1294             :                 } else {
    1295           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1296             :                           PyLong_Type.tp_name);
    1297           0 :                         return -1;
    1298             :                 }
    1299             :         }
    1300           0 :         return 0;
    1301             : }
    1302             : 
    1303             : static PyGetSetDef py_netr_AcctLockStr_getsetters[] = {
    1304             :         {
    1305             :                 .name = discard_const_p(char, "lockout_duration"),
    1306             :                 .get = py_netr_AcctLockStr_get_lockout_duration,
    1307             :                 .set = py_netr_AcctLockStr_set_lockout_duration,
    1308             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    1309             :         },
    1310             :         {
    1311             :                 .name = discard_const_p(char, "reset_count"),
    1312             :                 .get = py_netr_AcctLockStr_get_reset_count,
    1313             :                 .set = py_netr_AcctLockStr_set_reset_count,
    1314             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    1315             :         },
    1316             :         {
    1317             :                 .name = discard_const_p(char, "bad_attempt_lockout"),
    1318             :                 .get = py_netr_AcctLockStr_get_bad_attempt_lockout,
    1319             :                 .set = py_netr_AcctLockStr_set_bad_attempt_lockout,
    1320             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1321             :         },
    1322             :         {
    1323             :                 .name = discard_const_p(char, "dummy"),
    1324             :                 .get = py_netr_AcctLockStr_get_dummy,
    1325             :                 .set = py_netr_AcctLockStr_set_dummy,
    1326             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1327             :         },
    1328             :         { .name = NULL }
    1329             : };
    1330             : 
    1331           0 : static PyObject *py_netr_AcctLockStr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1332             : {
    1333           0 :         return pytalloc_new(struct netr_AcctLockStr, type);
    1334             : }
    1335             : 
    1336           0 : static PyObject *py_netr_AcctLockStr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1337             : {
    1338           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
    1339           0 :         PyObject *ret = NULL;
    1340           0 :         DATA_BLOB blob;
    1341           0 :         enum ndr_err_code err;
    1342           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1343           0 :         if (tmp_ctx == NULL) {
    1344           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1345           0 :                 return NULL;
    1346             :         }
    1347           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_AcctLockStr);
    1348           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1349           0 :                 TALLOC_FREE(tmp_ctx);
    1350           0 :                 PyErr_SetNdrError(err);
    1351           0 :                 return NULL;
    1352             :         }
    1353             : 
    1354           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1355           0 :         TALLOC_FREE(tmp_ctx);
    1356           0 :         return ret;
    1357             : }
    1358             : 
    1359           0 : static PyObject *py_netr_AcctLockStr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1360             : {
    1361           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
    1362           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1363           0 :         Py_ssize_t blob_length = 0;
    1364           0 :         enum ndr_err_code err;
    1365           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1366           0 :         PyObject *allow_remaining_obj = NULL;
    1367           0 :         bool allow_remaining = false;
    1368             : 
    1369           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1370             :                 discard_const_p(char *, kwnames),
    1371             :                 &blob.data, &blob_length,
    1372             :                 &allow_remaining_obj)) {
    1373           0 :                 return NULL;
    1374             :         }
    1375           0 :         blob.length = blob_length;
    1376             : 
    1377           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1378           0 :                 allow_remaining = true;
    1379             :         }
    1380             : 
    1381           0 :         if (allow_remaining) {
    1382           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
    1383             :         } else {
    1384           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
    1385             :         }
    1386           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1387           0 :                 PyErr_SetNdrError(err);
    1388           0 :                 return NULL;
    1389             :         }
    1390             : 
    1391           0 :         Py_RETURN_NONE;
    1392             : }
    1393             : 
    1394           0 : static PyObject *py_netr_AcctLockStr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1395             : {
    1396           0 :         struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
    1397           0 :         PyObject *ret;
    1398           0 :         char *retstr;
    1399             : 
    1400           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_AcctLockStr, "netr_AcctLockStr", object);
    1401           0 :         ret = PyUnicode_FromString(retstr);
    1402           0 :         talloc_free(retstr);
    1403             : 
    1404           0 :         return ret;
    1405             : }
    1406             : 
    1407             : static PyMethodDef py_netr_AcctLockStr_methods[] = {
    1408             :         { "__ndr_pack__", (PyCFunction)py_netr_AcctLockStr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1409             :         { "__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" },
    1410             :         { "__ndr_print__", (PyCFunction)py_netr_AcctLockStr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1411             :         { NULL, NULL, 0, NULL }
    1412             : };
    1413             : 
    1414             : 
    1415             : static PyTypeObject netr_AcctLockStr_Type = {
    1416             :         PyVarObject_HEAD_INIT(NULL, 0)
    1417             :         .tp_name = "netlogon.netr_AcctLockStr",
    1418             :         .tp_getset = py_netr_AcctLockStr_getsetters,
    1419             :         .tp_methods = py_netr_AcctLockStr_methods,
    1420             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1421             :         .tp_new = py_netr_AcctLockStr_new,
    1422             : };
    1423             : 
    1424             : 
    1425         199 : static PyObject *py_netr_IdentityInfo_get_domain_name(PyObject *obj, void *closure)
    1426             : {
    1427         199 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
    1428           0 :         PyObject *py_domain_name;
    1429         199 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
    1430         199 :         return py_domain_name;
    1431             : }
    1432             : 
    1433           0 : static int py_netr_IdentityInfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    1434             : {
    1435           0 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
    1436           0 :         if (value == NULL) {
    1437           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_name");
    1438           0 :                 return -1;
    1439             :         }
    1440           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1441           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1442           0 :                 PyErr_NoMemory();
    1443           0 :                 return -1;
    1444             :         }
    1445           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    1446           0 :         return 0;
    1447             : }
    1448             : 
    1449           0 : static PyObject *py_netr_IdentityInfo_get_parameter_control(PyObject *obj, void *closure)
    1450             : {
    1451           0 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
    1452           0 :         PyObject *py_parameter_control;
    1453           0 :         py_parameter_control = PyLong_FromUnsignedLongLong((uint32_t)(object->parameter_control));
    1454           0 :         return py_parameter_control;
    1455             : }
    1456             : 
    1457         183 : static int py_netr_IdentityInfo_set_parameter_control(PyObject *py_obj, PyObject *value, void *closure)
    1458             : {
    1459         183 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
    1460         183 :         if (value == NULL) {
    1461           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->parameter_control");
    1462           0 :                 return -1;
    1463             :         }
    1464             :         {
    1465         183 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parameter_control));
    1466         183 :                 if (PyLong_Check(value)) {
    1467           0 :                         unsigned long long test_var;
    1468         183 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1469         183 :                         if (PyErr_Occurred() != NULL) {
    1470           0 :                                 return -1;
    1471             :                         }
    1472         183 :                         if (test_var > uint_max) {
    1473           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1474             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1475           0 :                                 return -1;
    1476             :                         }
    1477         183 :                         object->parameter_control = test_var;
    1478             :                 } else {
    1479           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1480             :                           PyLong_Type.tp_name);
    1481           0 :                         return -1;
    1482             :                 }
    1483             :         }
    1484         183 :         return 0;
    1485             : }
    1486             : 
    1487           0 : static PyObject *py_netr_IdentityInfo_get_logon_id(PyObject *obj, void *closure)
    1488             : {
    1489           0 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
    1490           0 :         PyObject *py_logon_id;
    1491           0 :         py_logon_id = PyLong_FromUnsignedLongLong(object->logon_id);
    1492           0 :         return py_logon_id;
    1493             : }
    1494             : 
    1495           0 : static int py_netr_IdentityInfo_set_logon_id(PyObject *py_obj, PyObject *value, void *closure)
    1496             : {
    1497           0 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
    1498           0 :         if (value == NULL) {
    1499           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_id");
    1500           0 :                 return -1;
    1501             :         }
    1502             :         {
    1503           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_id));
    1504           0 :                 if (PyLong_Check(value)) {
    1505           0 :                         unsigned long long test_var;
    1506           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1507           0 :                         if (PyErr_Occurred() != NULL) {
    1508           0 :                                 return -1;
    1509             :                         }
    1510           0 :                         if (test_var > uint_max) {
    1511           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1512             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1513           0 :                                 return -1;
    1514             :                         }
    1515           0 :                         object->logon_id = test_var;
    1516             :                 } else {
    1517           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1518             :                           PyLong_Type.tp_name);
    1519           0 :                         return -1;
    1520             :                 }
    1521             :         }
    1522           0 :         return 0;
    1523             : }
    1524             : 
    1525         199 : static PyObject *py_netr_IdentityInfo_get_account_name(PyObject *obj, void *closure)
    1526             : {
    1527         199 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
    1528           0 :         PyObject *py_account_name;
    1529         199 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    1530         199 :         return py_account_name;
    1531             : }
    1532             : 
    1533           0 : static int py_netr_IdentityInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    1534             : {
    1535           0 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
    1536           0 :         if (value == NULL) {
    1537           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
    1538           0 :                 return -1;
    1539             :         }
    1540           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1541           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1542           0 :                 PyErr_NoMemory();
    1543           0 :                 return -1;
    1544             :         }
    1545           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    1546           0 :         return 0;
    1547             : }
    1548             : 
    1549         199 : static PyObject *py_netr_IdentityInfo_get_workstation(PyObject *obj, void *closure)
    1550             : {
    1551         199 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
    1552           0 :         PyObject *py_workstation;
    1553         199 :         py_workstation = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstation);
    1554         199 :         return py_workstation;
    1555             : }
    1556             : 
    1557           0 : static int py_netr_IdentityInfo_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
    1558             : {
    1559           0 :         struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
    1560           0 :         if (value == NULL) {
    1561           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->workstation");
    1562           0 :                 return -1;
    1563             :         }
    1564           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1565           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1566           0 :                 PyErr_NoMemory();
    1567           0 :                 return -1;
    1568             :         }
    1569           0 :         object->workstation = *(struct lsa_String *)pytalloc_get_ptr(value);
    1570           0 :         return 0;
    1571             : }
    1572             : 
    1573             : static PyGetSetDef py_netr_IdentityInfo_getsetters[] = {
    1574             :         {
    1575             :                 .name = discard_const_p(char, "domain_name"),
    1576             :                 .get = py_netr_IdentityInfo_get_domain_name,
    1577             :                 .set = py_netr_IdentityInfo_set_domain_name,
    1578             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1579             :         },
    1580             :         {
    1581             :                 .name = discard_const_p(char, "parameter_control"),
    1582             :                 .get = py_netr_IdentityInfo_get_parameter_control,
    1583             :                 .set = py_netr_IdentityInfo_set_parameter_control,
    1584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonParameterControl")
    1585             :         },
    1586             :         {
    1587             :                 .name = discard_const_p(char, "logon_id"),
    1588             :                 .get = py_netr_IdentityInfo_get_logon_id,
    1589             :                 .set = py_netr_IdentityInfo_set_logon_id,
    1590             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    1591             :         },
    1592             :         {
    1593             :                 .name = discard_const_p(char, "account_name"),
    1594             :                 .get = py_netr_IdentityInfo_get_account_name,
    1595             :                 .set = py_netr_IdentityInfo_set_account_name,
    1596             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1597             :         },
    1598             :         {
    1599             :                 .name = discard_const_p(char, "workstation"),
    1600             :                 .get = py_netr_IdentityInfo_get_workstation,
    1601             :                 .set = py_netr_IdentityInfo_set_workstation,
    1602             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1603             :         },
    1604             :         { .name = NULL }
    1605             : };
    1606             : 
    1607         199 : static PyObject *py_netr_IdentityInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1608             : {
    1609         199 :         return pytalloc_new(struct netr_IdentityInfo, type);
    1610             : }
    1611             : 
    1612             : 
    1613             : static PyTypeObject netr_IdentityInfo_Type = {
    1614             :         PyVarObject_HEAD_INIT(NULL, 0)
    1615             :         .tp_name = "netlogon.netr_IdentityInfo",
    1616             :         .tp_getset = py_netr_IdentityInfo_getsetters,
    1617             :         .tp_methods = NULL,
    1618             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1619             :         .tp_new = py_netr_IdentityInfo_new,
    1620             : };
    1621             : 
    1622             : 
    1623           0 : static PyObject *py_netr_PasswordInfo_get_identity_info(PyObject *obj, void *closure)
    1624             : {
    1625           0 :         struct netr_PasswordInfo *object = pytalloc_get_ptr(obj);
    1626           0 :         PyObject *py_identity_info;
    1627           0 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    1628           0 :         return py_identity_info;
    1629             : }
    1630             : 
    1631          82 : static int py_netr_PasswordInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    1632             : {
    1633          82 :         struct netr_PasswordInfo *object = pytalloc_get_ptr(py_obj);
    1634          82 :         if (value == NULL) {
    1635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->identity_info");
    1636           0 :                 return -1;
    1637             :         }
    1638          82 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    1639          82 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1640           0 :                 PyErr_NoMemory();
    1641           0 :                 return -1;
    1642             :         }
    1643          82 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    1644          82 :         return 0;
    1645             : }
    1646             : 
    1647           0 : static PyObject *py_netr_PasswordInfo_get_lmpassword(PyObject *obj, void *closure)
    1648             : {
    1649           0 :         struct netr_PasswordInfo *object = pytalloc_get_ptr(obj);
    1650           0 :         PyObject *py_lmpassword;
    1651           0 :         py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    1652           0 :         return py_lmpassword;
    1653             : }
    1654             : 
    1655          82 : static int py_netr_PasswordInfo_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    1656             : {
    1657          82 :         struct netr_PasswordInfo *object = pytalloc_get_ptr(py_obj);
    1658          82 :         if (value == NULL) {
    1659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmpassword");
    1660           0 :                 return -1;
    1661             :         }
    1662          82 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    1663          82 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1664           0 :                 PyErr_NoMemory();
    1665           0 :                 return -1;
    1666             :         }
    1667          82 :         object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    1668          82 :         return 0;
    1669             : }
    1670             : 
    1671           0 : static PyObject *py_netr_PasswordInfo_get_ntpassword(PyObject *obj, void *closure)
    1672             : {
    1673           0 :         struct netr_PasswordInfo *object = pytalloc_get_ptr(obj);
    1674           0 :         PyObject *py_ntpassword;
    1675           0 :         py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    1676           0 :         return py_ntpassword;
    1677             : }
    1678             : 
    1679          82 : static int py_netr_PasswordInfo_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    1680             : {
    1681          82 :         struct netr_PasswordInfo *object = pytalloc_get_ptr(py_obj);
    1682          82 :         if (value == NULL) {
    1683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ntpassword");
    1684           0 :                 return -1;
    1685             :         }
    1686          82 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    1687          82 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1688           0 :                 PyErr_NoMemory();
    1689           0 :                 return -1;
    1690             :         }
    1691          82 :         object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    1692          82 :         return 0;
    1693             : }
    1694             : 
    1695             : static PyGetSetDef py_netr_PasswordInfo_getsetters[] = {
    1696             :         {
    1697             :                 .name = discard_const_p(char, "identity_info"),
    1698             :                 .get = py_netr_PasswordInfo_get_identity_info,
    1699             :                 .set = py_netr_PasswordInfo_set_identity_info,
    1700             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    1701             :         },
    1702             :         {
    1703             :                 .name = discard_const_p(char, "lmpassword"),
    1704             :                 .get = py_netr_PasswordInfo_get_lmpassword,
    1705             :                 .set = py_netr_PasswordInfo_set_lmpassword,
    1706             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    1707             :         },
    1708             :         {
    1709             :                 .name = discard_const_p(char, "ntpassword"),
    1710             :                 .get = py_netr_PasswordInfo_get_ntpassword,
    1711             :                 .set = py_netr_PasswordInfo_set_ntpassword,
    1712             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    1713             :         },
    1714             :         { .name = NULL }
    1715             : };
    1716             : 
    1717          82 : static PyObject *py_netr_PasswordInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1718             : {
    1719          82 :         return pytalloc_new(struct netr_PasswordInfo, type);
    1720             : }
    1721             : 
    1722             : 
    1723             : static PyTypeObject netr_PasswordInfo_Type = {
    1724             :         PyVarObject_HEAD_INIT(NULL, 0)
    1725             :         .tp_name = "netlogon.netr_PasswordInfo",
    1726             :         .tp_getset = py_netr_PasswordInfo_getsetters,
    1727             :         .tp_methods = NULL,
    1728             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1729             :         .tp_new = py_netr_PasswordInfo_new,
    1730             : };
    1731             : 
    1732             : 
    1733           0 : static PyObject *py_netr_ChallengeResponse_get_length(PyObject *obj, void *closure)
    1734             : {
    1735           0 :         struct netr_ChallengeResponse *object = pytalloc_get_ptr(obj);
    1736           0 :         PyObject *py_length;
    1737           0 :         py_length = PyLong_FromLong((uint16_t)(object->length));
    1738           0 :         return py_length;
    1739             : }
    1740             : 
    1741         117 : static int py_netr_ChallengeResponse_set_length(PyObject *py_obj, PyObject *value, void *closure)
    1742             : {
    1743         117 :         struct netr_ChallengeResponse *object = pytalloc_get_ptr(py_obj);
    1744         117 :         if (value == NULL) {
    1745           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
    1746           0 :                 return -1;
    1747             :         }
    1748             :         {
    1749         117 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    1750         117 :                 if (PyLong_Check(value)) {
    1751           0 :                         unsigned long long test_var;
    1752         117 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1753         117 :                         if (PyErr_Occurred() != NULL) {
    1754           0 :                                 return -1;
    1755             :                         }
    1756         117 :                         if (test_var > uint_max) {
    1757           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1758             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1759           0 :                                 return -1;
    1760             :                         }
    1761         117 :                         object->length = test_var;
    1762             :                 } else {
    1763           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1764             :                           PyLong_Type.tp_name);
    1765           0 :                         return -1;
    1766             :                 }
    1767             :         }
    1768         117 :         return 0;
    1769             : }
    1770             : 
    1771           0 : static PyObject *py_netr_ChallengeResponse_get_size(PyObject *obj, void *closure)
    1772             : {
    1773           0 :         struct netr_ChallengeResponse *object = pytalloc_get_ptr(obj);
    1774           0 :         PyObject *py_size;
    1775           0 :         py_size = PyLong_FromLong((uint16_t)(object->size));
    1776           0 :         return py_size;
    1777             : }
    1778             : 
    1779           0 : static int py_netr_ChallengeResponse_set_size(PyObject *py_obj, PyObject *value, void *closure)
    1780             : {
    1781           0 :         struct netr_ChallengeResponse *object = pytalloc_get_ptr(py_obj);
    1782           0 :         if (value == NULL) {
    1783           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
    1784           0 :                 return -1;
    1785             :         }
    1786             :         {
    1787           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    1788           0 :                 if (PyLong_Check(value)) {
    1789           0 :                         unsigned long long test_var;
    1790           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1791           0 :                         if (PyErr_Occurred() != NULL) {
    1792           0 :                                 return -1;
    1793             :                         }
    1794           0 :                         if (test_var > uint_max) {
    1795           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1796             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1797           0 :                                 return -1;
    1798             :                         }
    1799           0 :                         object->size = test_var;
    1800             :                 } else {
    1801           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1802             :                           PyLong_Type.tp_name);
    1803           0 :                         return -1;
    1804             :                 }
    1805             :         }
    1806           0 :         return 0;
    1807             : }
    1808             : 
    1809           0 : static PyObject *py_netr_ChallengeResponse_get_data(PyObject *obj, void *closure)
    1810             : {
    1811           0 :         struct netr_ChallengeResponse *object = pytalloc_get_ptr(obj);
    1812           0 :         PyObject *py_data;
    1813           0 :         if (object->data == NULL) {
    1814           0 :                 Py_RETURN_NONE;
    1815             :         }
    1816           0 :         if (object->data == NULL) {
    1817           0 :                 py_data = Py_None;
    1818           0 :                 Py_INCREF(py_data);
    1819             :         } else {
    1820           0 :                 py_data = PyList_New(object->length);
    1821           0 :                 if (py_data == NULL) {
    1822           0 :                         return NULL;
    1823             :                 }
    1824             :                 {
    1825             :                         int data_cntr_1;
    1826           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    1827           0 :                                 PyObject *py_data_1;
    1828           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_1]));
    1829           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    1830             :                         }
    1831             :                 }
    1832             :         }
    1833           0 :         return py_data;
    1834             : }
    1835             : 
    1836         117 : static int py_netr_ChallengeResponse_set_data(PyObject *py_obj, PyObject *value, void *closure)
    1837             : {
    1838         117 :         struct netr_ChallengeResponse *object = pytalloc_get_ptr(py_obj);
    1839         117 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    1840         117 :         if (value == NULL) {
    1841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
    1842           0 :                 return -1;
    1843             :         }
    1844         117 :         if (value == Py_None) {
    1845           0 :                 object->data = NULL;
    1846             :         } else {
    1847         117 :                 object->data = NULL;
    1848         117 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1849             :                 {
    1850           0 :                         int data_cntr_1;
    1851         117 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    1852         117 :                         if (!object->data) { return -1; }
    1853         117 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    1854        3773 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    1855        3656 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    1856           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
    1857           0 :                                         return -1;
    1858             :                                 }
    1859             :                                 {
    1860        3656 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
    1861        3656 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    1862           0 :                                                 unsigned long long test_var;
    1863        3656 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    1864        3656 :                                                 if (PyErr_Occurred() != NULL) {
    1865           0 :                                                         return -1;
    1866             :                                                 }
    1867        3656 :                                                 if (test_var > uint_max) {
    1868           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1869             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    1870           0 :                                                         return -1;
    1871             :                                                 }
    1872        3656 :                                                 (object->data)[data_cntr_1] = test_var;
    1873             :                                         } else {
    1874           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    1875             :                                                   PyLong_Type.tp_name);
    1876           0 :                                                 return -1;
    1877             :                                         }
    1878             :                                 }
    1879             :                         }
    1880             :                 }
    1881             :         }
    1882         117 :         return 0;
    1883             : }
    1884             : 
    1885             : static PyGetSetDef py_netr_ChallengeResponse_getsetters[] = {
    1886             :         {
    1887             :                 .name = discard_const_p(char, "length"),
    1888             :                 .get = py_netr_ChallengeResponse_get_length,
    1889             :                 .set = py_netr_ChallengeResponse_set_length,
    1890             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1891             :         },
    1892             :         {
    1893             :                 .name = discard_const_p(char, "size"),
    1894             :                 .get = py_netr_ChallengeResponse_get_size,
    1895             :                 .set = py_netr_ChallengeResponse_set_size,
    1896             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1897             :         },
    1898             :         {
    1899             :                 .name = discard_const_p(char, "data"),
    1900             :                 .get = py_netr_ChallengeResponse_get_data,
    1901             :                 .set = py_netr_ChallengeResponse_set_data,
    1902             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1903             :         },
    1904             :         { .name = NULL }
    1905             : };
    1906             : 
    1907         117 : static PyObject *py_netr_ChallengeResponse_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1908             : {
    1909         117 :         return pytalloc_new(struct netr_ChallengeResponse, type);
    1910             : }
    1911             : 
    1912             : 
    1913             : static PyTypeObject netr_ChallengeResponse_Type = {
    1914             :         PyVarObject_HEAD_INIT(NULL, 0)
    1915             :         .tp_name = "netlogon.netr_ChallengeResponse",
    1916             :         .tp_getset = py_netr_ChallengeResponse_getsetters,
    1917             :         .tp_methods = NULL,
    1918             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1919             :         .tp_new = py_netr_ChallengeResponse_new,
    1920             : };
    1921             : 
    1922             : 
    1923          60 : static PyObject *py_netr_NetworkInfo_get_identity_info(PyObject *obj, void *closure)
    1924             : {
    1925          60 :         struct netr_NetworkInfo *object = pytalloc_get_ptr(obj);
    1926           0 :         PyObject *py_identity_info;
    1927          60 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    1928          60 :         return py_identity_info;
    1929             : }
    1930             : 
    1931         117 : static int py_netr_NetworkInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    1932             : {
    1933         117 :         struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
    1934         117 :         if (value == NULL) {
    1935           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->identity_info");
    1936           0 :                 return -1;
    1937             :         }
    1938         117 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    1939         117 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1940           0 :                 PyErr_NoMemory();
    1941           0 :                 return -1;
    1942             :         }
    1943         117 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    1944         117 :         return 0;
    1945             : }
    1946             : 
    1947           0 : static PyObject *py_netr_NetworkInfo_get_challenge(PyObject *obj, void *closure)
    1948             : {
    1949           0 :         struct netr_NetworkInfo *object = pytalloc_get_ptr(obj);
    1950           0 :         PyObject *py_challenge;
    1951           0 :         py_challenge = PyList_New(8);
    1952           0 :         if (py_challenge == NULL) {
    1953           0 :                 return NULL;
    1954             :         }
    1955             :         {
    1956             :                 int challenge_cntr_0;
    1957           0 :                 for (challenge_cntr_0 = 0; challenge_cntr_0 < (8); challenge_cntr_0++) {
    1958           0 :                         PyObject *py_challenge_0;
    1959           0 :                         py_challenge_0 = PyLong_FromLong((uint16_t)((object->challenge)[challenge_cntr_0]));
    1960           0 :                         PyList_SetItem(py_challenge, challenge_cntr_0, py_challenge_0);
    1961             :                 }
    1962             :         }
    1963           0 :         return py_challenge;
    1964             : }
    1965             : 
    1966         117 : static int py_netr_NetworkInfo_set_challenge(PyObject *py_obj, PyObject *value, void *closure)
    1967             : {
    1968         117 :         struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
    1969         117 :         if (value == NULL) {
    1970           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->challenge");
    1971           0 :                 return -1;
    1972             :         }
    1973         117 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1974             :         {
    1975           0 :                 int challenge_cntr_0;
    1976         117 :                 if (ARRAY_SIZE(object->challenge) != PyList_GET_SIZE(value)) {
    1977           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));
    1978           0 :                         return -1;
    1979             :                 }
    1980        1053 :                 for (challenge_cntr_0 = 0; challenge_cntr_0 < PyList_GET_SIZE(value); challenge_cntr_0++) {
    1981         936 :                         if (PyList_GET_ITEM(value, challenge_cntr_0) == NULL) {
    1982           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->challenge)[challenge_cntr_0]");
    1983           0 :                                 return -1;
    1984             :                         }
    1985             :                         {
    1986         936 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->challenge)[challenge_cntr_0]));
    1987         936 :                                 if (PyLong_Check(PyList_GET_ITEM(value, challenge_cntr_0))) {
    1988           0 :                                         unsigned long long test_var;
    1989         936 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, challenge_cntr_0));
    1990         936 :                                         if (PyErr_Occurred() != NULL) {
    1991           0 :                                                 return -1;
    1992             :                                         }
    1993         936 :                                         if (test_var > uint_max) {
    1994           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1995             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    1996           0 :                                                 return -1;
    1997             :                                         }
    1998         936 :                                         (object->challenge)[challenge_cntr_0] = test_var;
    1999             :                                 } else {
    2000           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2001             :                                           PyLong_Type.tp_name);
    2002           0 :                                         return -1;
    2003             :                                 }
    2004             :                         }
    2005             :                 }
    2006             :         }
    2007         117 :         return 0;
    2008             : }
    2009             : 
    2010         234 : static PyObject *py_netr_NetworkInfo_get_nt(PyObject *obj, void *closure)
    2011             : {
    2012         234 :         struct netr_NetworkInfo *object = pytalloc_get_ptr(obj);
    2013           0 :         PyObject *py_nt;
    2014         234 :         py_nt = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->nt);
    2015         234 :         return py_nt;
    2016             : }
    2017             : 
    2018         117 : static int py_netr_NetworkInfo_set_nt(PyObject *py_obj, PyObject *value, void *closure)
    2019             : {
    2020         117 :         struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
    2021         117 :         if (value == NULL) {
    2022           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt");
    2023           0 :                 return -1;
    2024             :         }
    2025         117 :         PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
    2026         117 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2027           0 :                 PyErr_NoMemory();
    2028           0 :                 return -1;
    2029             :         }
    2030         117 :         object->nt = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
    2031         117 :         return 0;
    2032             : }
    2033             : 
    2034           0 : static PyObject *py_netr_NetworkInfo_get_lm(PyObject *obj, void *closure)
    2035             : {
    2036           0 :         struct netr_NetworkInfo *object = pytalloc_get_ptr(obj);
    2037           0 :         PyObject *py_lm;
    2038           0 :         py_lm = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->lm);
    2039           0 :         return py_lm;
    2040             : }
    2041             : 
    2042           0 : static int py_netr_NetworkInfo_set_lm(PyObject *py_obj, PyObject *value, void *closure)
    2043             : {
    2044           0 :         struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
    2045           0 :         if (value == NULL) {
    2046           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm");
    2047           0 :                 return -1;
    2048             :         }
    2049           0 :         PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
    2050           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2051           0 :                 PyErr_NoMemory();
    2052           0 :                 return -1;
    2053             :         }
    2054           0 :         object->lm = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
    2055           0 :         return 0;
    2056             : }
    2057             : 
    2058             : static PyGetSetDef py_netr_NetworkInfo_getsetters[] = {
    2059             :         {
    2060             :                 .name = discard_const_p(char, "identity_info"),
    2061             :                 .get = py_netr_NetworkInfo_get_identity_info,
    2062             :                 .set = py_netr_NetworkInfo_set_identity_info,
    2063             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    2064             :         },
    2065             :         {
    2066             :                 .name = discard_const_p(char, "challenge"),
    2067             :                 .get = py_netr_NetworkInfo_get_challenge,
    2068             :                 .set = py_netr_NetworkInfo_set_challenge,
    2069             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2070             :         },
    2071             :         {
    2072             :                 .name = discard_const_p(char, "nt"),
    2073             :                 .get = py_netr_NetworkInfo_get_nt,
    2074             :                 .set = py_netr_NetworkInfo_set_nt,
    2075             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
    2076             :         },
    2077             :         {
    2078             :                 .name = discard_const_p(char, "lm"),
    2079             :                 .get = py_netr_NetworkInfo_get_lm,
    2080             :                 .set = py_netr_NetworkInfo_set_lm,
    2081             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
    2082             :         },
    2083             :         { .name = NULL }
    2084             : };
    2085             : 
    2086         117 : static PyObject *py_netr_NetworkInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2087             : {
    2088         117 :         return pytalloc_new(struct netr_NetworkInfo, type);
    2089             : }
    2090             : 
    2091             : 
    2092             : static PyTypeObject netr_NetworkInfo_Type = {
    2093             :         PyVarObject_HEAD_INIT(NULL, 0)
    2094             :         .tp_name = "netlogon.netr_NetworkInfo",
    2095             :         .tp_getset = py_netr_NetworkInfo_getsetters,
    2096             :         .tp_methods = NULL,
    2097             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2098             :         .tp_new = py_netr_NetworkInfo_new,
    2099             : };
    2100             : 
    2101             : 
    2102           0 : static PyObject *py_netr_GenericInfo_get_identity_info(PyObject *obj, void *closure)
    2103             : {
    2104           0 :         struct netr_GenericInfo *object = pytalloc_get_ptr(obj);
    2105           0 :         PyObject *py_identity_info;
    2106           0 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    2107           0 :         return py_identity_info;
    2108             : }
    2109             : 
    2110           0 : static int py_netr_GenericInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    2111             : {
    2112           0 :         struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
    2113           0 :         if (value == NULL) {
    2114           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->identity_info");
    2115           0 :                 return -1;
    2116             :         }
    2117           0 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    2118           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2119           0 :                 PyErr_NoMemory();
    2120           0 :                 return -1;
    2121             :         }
    2122           0 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    2123           0 :         return 0;
    2124             : }
    2125             : 
    2126           0 : static PyObject *py_netr_GenericInfo_get_package_name(PyObject *obj, void *closure)
    2127             : {
    2128           0 :         struct netr_GenericInfo *object = pytalloc_get_ptr(obj);
    2129           0 :         PyObject *py_package_name;
    2130           0 :         py_package_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->package_name);
    2131           0 :         return py_package_name;
    2132             : }
    2133             : 
    2134           0 : static int py_netr_GenericInfo_set_package_name(PyObject *py_obj, PyObject *value, void *closure)
    2135             : {
    2136           0 :         struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
    2137           0 :         if (value == NULL) {
    2138           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->package_name");
    2139           0 :                 return -1;
    2140             :         }
    2141           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    2142           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2143           0 :                 PyErr_NoMemory();
    2144           0 :                 return -1;
    2145             :         }
    2146           0 :         object->package_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    2147           0 :         return 0;
    2148             : }
    2149             : 
    2150           0 : static PyObject *py_netr_GenericInfo_get_length(PyObject *obj, void *closure)
    2151             : {
    2152           0 :         struct netr_GenericInfo *object = pytalloc_get_ptr(obj);
    2153           0 :         PyObject *py_length;
    2154           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
    2155           0 :         return py_length;
    2156             : }
    2157             : 
    2158           0 : static int py_netr_GenericInfo_set_length(PyObject *py_obj, PyObject *value, void *closure)
    2159             : {
    2160           0 :         struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
    2161           0 :         if (value == NULL) {
    2162           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
    2163           0 :                 return -1;
    2164             :         }
    2165             :         {
    2166           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    2167           0 :                 if (PyLong_Check(value)) {
    2168           0 :                         unsigned long long test_var;
    2169           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2170           0 :                         if (PyErr_Occurred() != NULL) {
    2171           0 :                                 return -1;
    2172             :                         }
    2173           0 :                         if (test_var > uint_max) {
    2174           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2175             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2176           0 :                                 return -1;
    2177             :                         }
    2178           0 :                         object->length = test_var;
    2179             :                 } else {
    2180           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2181             :                           PyLong_Type.tp_name);
    2182           0 :                         return -1;
    2183             :                 }
    2184             :         }
    2185           0 :         return 0;
    2186             : }
    2187             : 
    2188           0 : static PyObject *py_netr_GenericInfo_get_data(PyObject *obj, void *closure)
    2189             : {
    2190           0 :         struct netr_GenericInfo *object = pytalloc_get_ptr(obj);
    2191           0 :         PyObject *py_data;
    2192           0 :         if (object->data == NULL) {
    2193           0 :                 Py_RETURN_NONE;
    2194             :         }
    2195           0 :         if (object->data == NULL) {
    2196           0 :                 py_data = Py_None;
    2197           0 :                 Py_INCREF(py_data);
    2198             :         } else {
    2199           0 :                 py_data = PyList_New(object->length);
    2200           0 :                 if (py_data == NULL) {
    2201           0 :                         return NULL;
    2202             :                 }
    2203             :                 {
    2204             :                         int data_cntr_1;
    2205           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    2206           0 :                                 PyObject *py_data_1;
    2207           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_1]));
    2208           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    2209             :                         }
    2210             :                 }
    2211             :         }
    2212           0 :         return py_data;
    2213             : }
    2214             : 
    2215           0 : static int py_netr_GenericInfo_set_data(PyObject *py_obj, PyObject *value, void *closure)
    2216             : {
    2217           0 :         struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
    2218           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    2219           0 :         if (value == NULL) {
    2220           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
    2221           0 :                 return -1;
    2222             :         }
    2223           0 :         if (value == Py_None) {
    2224           0 :                 object->data = NULL;
    2225             :         } else {
    2226           0 :                 object->data = NULL;
    2227           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2228             :                 {
    2229           0 :                         int data_cntr_1;
    2230           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    2231           0 :                         if (!object->data) { return -1; }
    2232           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    2233           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    2234           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    2235           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
    2236           0 :                                         return -1;
    2237             :                                 }
    2238             :                                 {
    2239           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
    2240           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    2241           0 :                                                 unsigned long long test_var;
    2242           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    2243           0 :                                                 if (PyErr_Occurred() != NULL) {
    2244           0 :                                                         return -1;
    2245             :                                                 }
    2246           0 :                                                 if (test_var > uint_max) {
    2247           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2248             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    2249           0 :                                                         return -1;
    2250             :                                                 }
    2251           0 :                                                 (object->data)[data_cntr_1] = test_var;
    2252             :                                         } else {
    2253           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    2254             :                                                   PyLong_Type.tp_name);
    2255           0 :                                                 return -1;
    2256             :                                         }
    2257             :                                 }
    2258             :                         }
    2259             :                 }
    2260             :         }
    2261           0 :         return 0;
    2262             : }
    2263             : 
    2264             : static PyGetSetDef py_netr_GenericInfo_getsetters[] = {
    2265             :         {
    2266             :                 .name = discard_const_p(char, "identity_info"),
    2267             :                 .get = py_netr_GenericInfo_get_identity_info,
    2268             :                 .set = py_netr_GenericInfo_set_identity_info,
    2269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    2270             :         },
    2271             :         {
    2272             :                 .name = discard_const_p(char, "package_name"),
    2273             :                 .get = py_netr_GenericInfo_get_package_name,
    2274             :                 .set = py_netr_GenericInfo_set_package_name,
    2275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    2276             :         },
    2277             :         {
    2278             :                 .name = discard_const_p(char, "length"),
    2279             :                 .get = py_netr_GenericInfo_get_length,
    2280             :                 .set = py_netr_GenericInfo_set_length,
    2281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2282             :         },
    2283             :         {
    2284             :                 .name = discard_const_p(char, "data"),
    2285             :                 .get = py_netr_GenericInfo_get_data,
    2286             :                 .set = py_netr_GenericInfo_set_data,
    2287             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2288             :         },
    2289             :         { .name = NULL }
    2290             : };
    2291             : 
    2292           0 : static PyObject *py_netr_GenericInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2293             : {
    2294           0 :         return pytalloc_new(struct netr_GenericInfo, type);
    2295             : }
    2296             : 
    2297             : 
    2298             : static PyTypeObject netr_GenericInfo_Type = {
    2299             :         PyVarObject_HEAD_INIT(NULL, 0)
    2300             :         .tp_name = "netlogon.netr_GenericInfo",
    2301             :         .tp_getset = py_netr_GenericInfo_getsetters,
    2302             :         .tp_methods = NULL,
    2303             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2304             :         .tp_new = py_netr_GenericInfo_new,
    2305             : };
    2306             : 
    2307           0 : static PyObject *py_import_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, union netr_LogonLevel *in)
    2308             : {
    2309           0 :         PyObject *ret;
    2310             : 
    2311           0 :         switch (level) {
    2312           0 :                 case NetlogonInteractiveInformation:
    2313           0 :                         if (in->password == NULL) {
    2314           0 :                                 ret = Py_None;
    2315           0 :                                 Py_INCREF(ret);
    2316             :                         } else {
    2317           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2318             :                         }
    2319           0 :                         return ret;
    2320             : 
    2321           0 :                 case NetlogonNetworkInformation:
    2322           0 :                         if (in->network == NULL) {
    2323           0 :                                 ret = Py_None;
    2324           0 :                                 Py_INCREF(ret);
    2325             :                         } else {
    2326           0 :                                 ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
    2327             :                         }
    2328           0 :                         return ret;
    2329             : 
    2330           0 :                 case NetlogonServiceInformation:
    2331           0 :                         if (in->password == NULL) {
    2332           0 :                                 ret = Py_None;
    2333           0 :                                 Py_INCREF(ret);
    2334             :                         } else {
    2335           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2336             :                         }
    2337           0 :                         return ret;
    2338             : 
    2339           0 :                 case NetlogonGenericInformation:
    2340           0 :                         if (in->generic == NULL) {
    2341           0 :                                 ret = Py_None;
    2342           0 :                                 Py_INCREF(ret);
    2343             :                         } else {
    2344           0 :                                 ret = pytalloc_reference_ex(&netr_GenericInfo_Type, in->generic, in->generic);
    2345             :                         }
    2346           0 :                         return ret;
    2347             : 
    2348           0 :                 case NetlogonInteractiveTransitiveInformation:
    2349           0 :                         if (in->password == NULL) {
    2350           0 :                                 ret = Py_None;
    2351           0 :                                 Py_INCREF(ret);
    2352             :                         } else {
    2353           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2354             :                         }
    2355           0 :                         return ret;
    2356             : 
    2357           0 :                 case NetlogonNetworkTransitiveInformation:
    2358           0 :                         if (in->network == NULL) {
    2359           0 :                                 ret = Py_None;
    2360           0 :                                 Py_INCREF(ret);
    2361             :                         } else {
    2362           0 :                                 ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
    2363             :                         }
    2364           0 :                         return ret;
    2365             : 
    2366           0 :                 case NetlogonServiceTransitiveInformation:
    2367           0 :                         if (in->password == NULL) {
    2368           0 :                                 ret = Py_None;
    2369           0 :                                 Py_INCREF(ret);
    2370             :                         } else {
    2371           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2372             :                         }
    2373           0 :                         return ret;
    2374             : 
    2375           0 :                 default:
    2376           0 :                         ret = Py_None;
    2377           0 :                         Py_INCREF(ret);
    2378           0 :                         return ret;
    2379             : 
    2380             :         }
    2381             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    2382             :         return NULL;
    2383             : }
    2384             : 
    2385         199 : static union netr_LogonLevel *py_export_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    2386             : {
    2387         199 :         union netr_LogonLevel *ret = talloc_zero(mem_ctx, union netr_LogonLevel);
    2388         199 :         switch (level) {
    2389          82 :                 case NetlogonInteractiveInformation:
    2390          82 :                         if (in == NULL) {
    2391           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->password");
    2392           0 :                                 talloc_free(ret); return NULL;
    2393             :                         }
    2394          82 :                         if (in == Py_None) {
    2395           0 :                                 ret->password = NULL;
    2396             :                         } else {
    2397          82 :                                 ret->password = NULL;
    2398          82 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2399          82 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2400           0 :                                         PyErr_NoMemory();
    2401           0 :                                         talloc_free(ret); return NULL;
    2402             :                                 }
    2403          82 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2404             :                         }
    2405          82 :                         break;
    2406             : 
    2407          98 :                 case NetlogonNetworkInformation:
    2408          98 :                         if (in == NULL) {
    2409           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->network");
    2410           0 :                                 talloc_free(ret); return NULL;
    2411             :                         }
    2412          98 :                         if (in == Py_None) {
    2413           0 :                                 ret->network = NULL;
    2414             :                         } else {
    2415          98 :                                 ret->network = NULL;
    2416          98 :                                 PY_CHECK_TYPE(&netr_NetworkInfo_Type, in, talloc_free(ret); return NULL;);
    2417          98 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2418           0 :                                         PyErr_NoMemory();
    2419           0 :                                         talloc_free(ret); return NULL;
    2420             :                                 }
    2421          98 :                                 ret->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
    2422             :                         }
    2423          98 :                         break;
    2424             : 
    2425           0 :                 case NetlogonServiceInformation:
    2426           0 :                         if (in == NULL) {
    2427           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->password");
    2428           0 :                                 talloc_free(ret); return NULL;
    2429             :                         }
    2430           0 :                         if (in == Py_None) {
    2431           0 :                                 ret->password = NULL;
    2432             :                         } else {
    2433           0 :                                 ret->password = NULL;
    2434           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2435           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2436           0 :                                         PyErr_NoMemory();
    2437           0 :                                         talloc_free(ret); return NULL;
    2438             :                                 }
    2439           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2440             :                         }
    2441           0 :                         break;
    2442             : 
    2443           0 :                 case NetlogonGenericInformation:
    2444           0 :                         if (in == NULL) {
    2445           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->generic");
    2446           0 :                                 talloc_free(ret); return NULL;
    2447             :                         }
    2448           0 :                         if (in == Py_None) {
    2449           0 :                                 ret->generic = NULL;
    2450             :                         } else {
    2451           0 :                                 ret->generic = NULL;
    2452           0 :                                 PY_CHECK_TYPE(&netr_GenericInfo_Type, in, talloc_free(ret); return NULL;);
    2453           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2454           0 :                                         PyErr_NoMemory();
    2455           0 :                                         talloc_free(ret); return NULL;
    2456             :                                 }
    2457           0 :                                 ret->generic = (struct netr_GenericInfo *)pytalloc_get_ptr(in);
    2458             :                         }
    2459           0 :                         break;
    2460             : 
    2461           0 :                 case NetlogonInteractiveTransitiveInformation:
    2462           0 :                         if (in == NULL) {
    2463           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->password");
    2464           0 :                                 talloc_free(ret); return NULL;
    2465             :                         }
    2466           0 :                         if (in == Py_None) {
    2467           0 :                                 ret->password = NULL;
    2468             :                         } else {
    2469           0 :                                 ret->password = NULL;
    2470           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2471           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2472           0 :                                         PyErr_NoMemory();
    2473           0 :                                         talloc_free(ret); return NULL;
    2474             :                                 }
    2475           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2476             :                         }
    2477           0 :                         break;
    2478             : 
    2479          19 :                 case NetlogonNetworkTransitiveInformation:
    2480          19 :                         if (in == NULL) {
    2481           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->network");
    2482           0 :                                 talloc_free(ret); return NULL;
    2483             :                         }
    2484          19 :                         if (in == Py_None) {
    2485           0 :                                 ret->network = NULL;
    2486             :                         } else {
    2487          19 :                                 ret->network = NULL;
    2488          19 :                                 PY_CHECK_TYPE(&netr_NetworkInfo_Type, in, talloc_free(ret); return NULL;);
    2489          19 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2490           0 :                                         PyErr_NoMemory();
    2491           0 :                                         talloc_free(ret); return NULL;
    2492             :                                 }
    2493          19 :                                 ret->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
    2494             :                         }
    2495          19 :                         break;
    2496             : 
    2497           0 :                 case NetlogonServiceTransitiveInformation:
    2498           0 :                         if (in == NULL) {
    2499           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->password");
    2500           0 :                                 talloc_free(ret); return NULL;
    2501             :                         }
    2502           0 :                         if (in == Py_None) {
    2503           0 :                                 ret->password = NULL;
    2504             :                         } else {
    2505           0 :                                 ret->password = NULL;
    2506           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2507           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2508           0 :                                         PyErr_NoMemory();
    2509           0 :                                         talloc_free(ret); return NULL;
    2510             :                                 }
    2511           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2512             :                         }
    2513           0 :                         break;
    2514             : 
    2515           0 :                 default:
    2516           0 :                         break;
    2517             : 
    2518             :         }
    2519             : 
    2520         199 :         return ret;
    2521             : }
    2522             : 
    2523           0 : static PyObject *py_netr_LogonLevel_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2524             : {
    2525           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2526           0 :         PyObject *mem_ctx_obj = NULL;
    2527           0 :         TALLOC_CTX *mem_ctx = NULL;
    2528           0 :         int level = 0;
    2529           0 :         PyObject *in_obj = NULL;
    2530           0 :         union netr_LogonLevel *in = NULL;
    2531             : 
    2532           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    2533             :                 discard_const_p(char *, kwnames),
    2534             :                 &mem_ctx_obj,
    2535             :                 &level,
    2536             :                 &in_obj)) {
    2537           0 :                 return NULL;
    2538             :         }
    2539           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2540           0 :         if (mem_ctx == NULL) {
    2541           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2542           0 :                 return NULL;
    2543             :         }
    2544           0 :         in = (union netr_LogonLevel *)pytalloc_get_ptr(in_obj);
    2545           0 :         if (in == NULL) {
    2546           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_LogonLevel!");
    2547           0 :                 return NULL;
    2548             :         }
    2549             : 
    2550           0 :         return py_import_netr_LogonLevel(mem_ctx, level, in);
    2551             : }
    2552             : 
    2553         199 : static PyObject *py_netr_LogonLevel_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2554             : {
    2555         199 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2556         199 :         PyObject *mem_ctx_obj = NULL;
    2557         199 :         TALLOC_CTX *mem_ctx = NULL;
    2558         199 :         int level = 0;
    2559         199 :         PyObject *in = NULL;
    2560         199 :         union netr_LogonLevel *out = NULL;
    2561             : 
    2562         199 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    2563             :                 discard_const_p(char *, kwnames),
    2564             :                 &mem_ctx_obj,
    2565             :                 &level,
    2566             :                 &in)) {
    2567           0 :                 return NULL;
    2568             :         }
    2569         199 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2570         199 :         if (mem_ctx == NULL) {
    2571           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2572           0 :                 return NULL;
    2573             :         }
    2574             : 
    2575         199 :         out = py_export_netr_LogonLevel(mem_ctx, level, in);
    2576         199 :         if (out == NULL) {
    2577           0 :                 return NULL;
    2578             :         }
    2579             : 
    2580         199 :         return pytalloc_GenericObject_reference(out);
    2581             : }
    2582             : 
    2583             : static PyMethodDef py_netr_LogonLevel_methods[] = {
    2584             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_import),
    2585             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2586             :                 "T.__import__(mem_ctx, level, in) => ret." },
    2587             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_export),
    2588             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2589             :                 "T.__export__(mem_ctx, level, in) => ret." },
    2590             :         { NULL, NULL, 0, NULL }
    2591             : };
    2592             : 
    2593           0 : static PyObject *py_netr_LogonLevel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2594             : {
    2595           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    2596           0 :         return NULL;
    2597             : }
    2598             : 
    2599             : 
    2600             : static PyTypeObject netr_LogonLevel_Type = {
    2601             :         PyVarObject_HEAD_INIT(NULL, 0)
    2602             :         .tp_name = "netlogon.netr_LogonLevel",
    2603             :         .tp_getset = NULL,
    2604             :         .tp_methods = py_netr_LogonLevel_methods,
    2605             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2606             :         .tp_new = py_netr_LogonLevel_new,
    2607             : };
    2608             : 
    2609             : 
    2610           0 : static PyObject *py_netr_UserSessionKey_get_key(PyObject *obj, void *closure)
    2611             : {
    2612           0 :         struct netr_UserSessionKey *object = pytalloc_get_ptr(obj);
    2613           0 :         PyObject *py_key;
    2614           0 :         py_key = PyList_New(16);
    2615           0 :         if (py_key == NULL) {
    2616           0 :                 return NULL;
    2617             :         }
    2618             :         {
    2619             :                 int key_cntr_0;
    2620           0 :                 for (key_cntr_0 = 0; key_cntr_0 < (16); key_cntr_0++) {
    2621           0 :                         PyObject *py_key_0;
    2622           0 :                         py_key_0 = PyLong_FromLong((uint16_t)((object->key)[key_cntr_0]));
    2623           0 :                         PyList_SetItem(py_key, key_cntr_0, py_key_0);
    2624             :                 }
    2625             :         }
    2626           0 :         return py_key;
    2627             : }
    2628             : 
    2629           0 : static int py_netr_UserSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
    2630             : {
    2631           0 :         struct netr_UserSessionKey *object = pytalloc_get_ptr(py_obj);
    2632           0 :         if (value == NULL) {
    2633           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->key");
    2634           0 :                 return -1;
    2635             :         }
    2636           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2637             :         {
    2638           0 :                 int key_cntr_0;
    2639           0 :                 if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
    2640           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));
    2641           0 :                         return -1;
    2642             :                 }
    2643           0 :                 for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
    2644           0 :                         if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
    2645           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->key)[key_cntr_0]");
    2646           0 :                                 return -1;
    2647             :                         }
    2648             :                         {
    2649           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->key)[key_cntr_0]));
    2650           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
    2651           0 :                                         unsigned long long test_var;
    2652           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
    2653           0 :                                         if (PyErr_Occurred() != NULL) {
    2654           0 :                                                 return -1;
    2655             :                                         }
    2656           0 :                                         if (test_var > uint_max) {
    2657           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2658             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2659           0 :                                                 return -1;
    2660             :                                         }
    2661           0 :                                         (object->key)[key_cntr_0] = test_var;
    2662             :                                 } else {
    2663           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2664             :                                           PyLong_Type.tp_name);
    2665           0 :                                         return -1;
    2666             :                                 }
    2667             :                         }
    2668             :                 }
    2669             :         }
    2670           0 :         return 0;
    2671             : }
    2672             : 
    2673             : static PyGetSetDef py_netr_UserSessionKey_getsetters[] = {
    2674             :         {
    2675             :                 .name = discard_const_p(char, "key"),
    2676             :                 .get = py_netr_UserSessionKey_get_key,
    2677             :                 .set = py_netr_UserSessionKey_set_key,
    2678             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2679             :         },
    2680             :         { .name = NULL }
    2681             : };
    2682             : 
    2683           0 : static PyObject *py_netr_UserSessionKey_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2684             : {
    2685           0 :         return pytalloc_new(struct netr_UserSessionKey, type);
    2686             : }
    2687             : 
    2688           0 : static PyObject *py_netr_UserSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2689             : {
    2690           0 :         struct netr_UserSessionKey *object = pytalloc_get_ptr(py_obj);
    2691           0 :         PyObject *ret = NULL;
    2692           0 :         DATA_BLOB blob;
    2693           0 :         enum ndr_err_code err;
    2694           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2695           0 :         if (tmp_ctx == NULL) {
    2696           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2697           0 :                 return NULL;
    2698             :         }
    2699           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_UserSessionKey);
    2700           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2701           0 :                 TALLOC_FREE(tmp_ctx);
    2702           0 :                 PyErr_SetNdrError(err);
    2703           0 :                 return NULL;
    2704             :         }
    2705             : 
    2706           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2707           0 :         TALLOC_FREE(tmp_ctx);
    2708           0 :         return ret;
    2709             : }
    2710             : 
    2711           0 : static PyObject *py_netr_UserSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2712             : {
    2713           0 :         struct netr_UserSessionKey *object = pytalloc_get_ptr(py_obj);
    2714           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2715           0 :         Py_ssize_t blob_length = 0;
    2716           0 :         enum ndr_err_code err;
    2717           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2718           0 :         PyObject *allow_remaining_obj = NULL;
    2719           0 :         bool allow_remaining = false;
    2720             : 
    2721           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2722             :                 discard_const_p(char *, kwnames),
    2723             :                 &blob.data, &blob_length,
    2724             :                 &allow_remaining_obj)) {
    2725           0 :                 return NULL;
    2726             :         }
    2727           0 :         blob.length = blob_length;
    2728             : 
    2729           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2730           0 :                 allow_remaining = true;
    2731             :         }
    2732             : 
    2733           0 :         if (allow_remaining) {
    2734           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_UserSessionKey);
    2735             :         } else {
    2736           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_UserSessionKey);
    2737             :         }
    2738           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2739           0 :                 PyErr_SetNdrError(err);
    2740           0 :                 return NULL;
    2741             :         }
    2742             : 
    2743           0 :         Py_RETURN_NONE;
    2744             : }
    2745             : 
    2746           0 : static PyObject *py_netr_UserSessionKey_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2747             : {
    2748           0 :         struct netr_UserSessionKey *object = pytalloc_get_ptr(py_obj);
    2749           0 :         PyObject *ret;
    2750           0 :         char *retstr;
    2751             : 
    2752           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_UserSessionKey, "netr_UserSessionKey", object);
    2753           0 :         ret = PyUnicode_FromString(retstr);
    2754           0 :         talloc_free(retstr);
    2755             : 
    2756           0 :         return ret;
    2757             : }
    2758             : 
    2759             : static PyMethodDef py_netr_UserSessionKey_methods[] = {
    2760             :         { "__ndr_pack__", (PyCFunction)py_netr_UserSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2761             :         { "__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" },
    2762             :         { "__ndr_print__", (PyCFunction)py_netr_UserSessionKey_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2763             :         { NULL, NULL, 0, NULL }
    2764             : };
    2765             : 
    2766             : 
    2767             : static PyTypeObject netr_UserSessionKey_Type = {
    2768             :         PyVarObject_HEAD_INIT(NULL, 0)
    2769             :         .tp_name = "netlogon.netr_UserSessionKey",
    2770             :         .tp_getset = py_netr_UserSessionKey_getsetters,
    2771             :         .tp_methods = py_netr_UserSessionKey_methods,
    2772             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2773             :         .tp_new = py_netr_UserSessionKey_new,
    2774             : };
    2775             : 
    2776             : 
    2777           0 : static PyObject *py_netr_LMSessionKey_get_key(PyObject *obj, void *closure)
    2778             : {
    2779           0 :         struct netr_LMSessionKey *object = pytalloc_get_ptr(obj);
    2780           0 :         PyObject *py_key;
    2781           0 :         py_key = PyList_New(8);
    2782           0 :         if (py_key == NULL) {
    2783           0 :                 return NULL;
    2784             :         }
    2785             :         {
    2786             :                 int key_cntr_0;
    2787           0 :                 for (key_cntr_0 = 0; key_cntr_0 < (8); key_cntr_0++) {
    2788           0 :                         PyObject *py_key_0;
    2789           0 :                         py_key_0 = PyLong_FromLong((uint16_t)((object->key)[key_cntr_0]));
    2790           0 :                         PyList_SetItem(py_key, key_cntr_0, py_key_0);
    2791             :                 }
    2792             :         }
    2793           0 :         return py_key;
    2794             : }
    2795             : 
    2796           0 : static int py_netr_LMSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
    2797             : {
    2798           0 :         struct netr_LMSessionKey *object = pytalloc_get_ptr(py_obj);
    2799           0 :         if (value == NULL) {
    2800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->key");
    2801           0 :                 return -1;
    2802             :         }
    2803           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2804             :         {
    2805           0 :                 int key_cntr_0;
    2806           0 :                 if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
    2807           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));
    2808           0 :                         return -1;
    2809             :                 }
    2810           0 :                 for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
    2811           0 :                         if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
    2812           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->key)[key_cntr_0]");
    2813           0 :                                 return -1;
    2814             :                         }
    2815             :                         {
    2816           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->key)[key_cntr_0]));
    2817           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
    2818           0 :                                         unsigned long long test_var;
    2819           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
    2820           0 :                                         if (PyErr_Occurred() != NULL) {
    2821           0 :                                                 return -1;
    2822             :                                         }
    2823           0 :                                         if (test_var > uint_max) {
    2824           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2825             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2826           0 :                                                 return -1;
    2827             :                                         }
    2828           0 :                                         (object->key)[key_cntr_0] = test_var;
    2829             :                                 } else {
    2830           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2831             :                                           PyLong_Type.tp_name);
    2832           0 :                                         return -1;
    2833             :                                 }
    2834             :                         }
    2835             :                 }
    2836             :         }
    2837           0 :         return 0;
    2838             : }
    2839             : 
    2840             : static PyGetSetDef py_netr_LMSessionKey_getsetters[] = {
    2841             :         {
    2842             :                 .name = discard_const_p(char, "key"),
    2843             :                 .get = py_netr_LMSessionKey_get_key,
    2844             :                 .set = py_netr_LMSessionKey_set_key,
    2845             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2846             :         },
    2847             :         { .name = NULL }
    2848             : };
    2849             : 
    2850           0 : static PyObject *py_netr_LMSessionKey_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2851             : {
    2852           0 :         return pytalloc_new(struct netr_LMSessionKey, type);
    2853             : }
    2854             : 
    2855           0 : static PyObject *py_netr_LMSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2856             : {
    2857           0 :         struct netr_LMSessionKey *object = pytalloc_get_ptr(py_obj);
    2858           0 :         PyObject *ret = NULL;
    2859           0 :         DATA_BLOB blob;
    2860           0 :         enum ndr_err_code err;
    2861           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2862           0 :         if (tmp_ctx == NULL) {
    2863           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2864           0 :                 return NULL;
    2865             :         }
    2866           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_LMSessionKey);
    2867           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2868           0 :                 TALLOC_FREE(tmp_ctx);
    2869           0 :                 PyErr_SetNdrError(err);
    2870           0 :                 return NULL;
    2871             :         }
    2872             : 
    2873           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2874           0 :         TALLOC_FREE(tmp_ctx);
    2875           0 :         return ret;
    2876             : }
    2877             : 
    2878           0 : static PyObject *py_netr_LMSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2879             : {
    2880           0 :         struct netr_LMSessionKey *object = pytalloc_get_ptr(py_obj);
    2881           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2882           0 :         Py_ssize_t blob_length = 0;
    2883           0 :         enum ndr_err_code err;
    2884           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2885           0 :         PyObject *allow_remaining_obj = NULL;
    2886           0 :         bool allow_remaining = false;
    2887             : 
    2888           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2889             :                 discard_const_p(char *, kwnames),
    2890             :                 &blob.data, &blob_length,
    2891             :                 &allow_remaining_obj)) {
    2892           0 :                 return NULL;
    2893             :         }
    2894           0 :         blob.length = blob_length;
    2895             : 
    2896           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2897           0 :                 allow_remaining = true;
    2898             :         }
    2899             : 
    2900           0 :         if (allow_remaining) {
    2901           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_LMSessionKey);
    2902             :         } else {
    2903           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_LMSessionKey);
    2904             :         }
    2905           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2906           0 :                 PyErr_SetNdrError(err);
    2907           0 :                 return NULL;
    2908             :         }
    2909             : 
    2910           0 :         Py_RETURN_NONE;
    2911             : }
    2912             : 
    2913           0 : static PyObject *py_netr_LMSessionKey_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2914             : {
    2915           0 :         struct netr_LMSessionKey *object = pytalloc_get_ptr(py_obj);
    2916           0 :         PyObject *ret;
    2917           0 :         char *retstr;
    2918             : 
    2919           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_LMSessionKey, "netr_LMSessionKey", object);
    2920           0 :         ret = PyUnicode_FromString(retstr);
    2921           0 :         talloc_free(retstr);
    2922             : 
    2923           0 :         return ret;
    2924             : }
    2925             : 
    2926             : static PyMethodDef py_netr_LMSessionKey_methods[] = {
    2927             :         { "__ndr_pack__", (PyCFunction)py_netr_LMSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2928             :         { "__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" },
    2929             :         { "__ndr_print__", (PyCFunction)py_netr_LMSessionKey_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2930             :         { NULL, NULL, 0, NULL }
    2931             : };
    2932             : 
    2933             : 
    2934             : static PyTypeObject netr_LMSessionKey_Type = {
    2935             :         PyVarObject_HEAD_INIT(NULL, 0)
    2936             :         .tp_name = "netlogon.netr_LMSessionKey",
    2937             :         .tp_getset = py_netr_LMSessionKey_getsetters,
    2938             :         .tp_methods = py_netr_LMSessionKey_methods,
    2939             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2940             :         .tp_new = py_netr_LMSessionKey_new,
    2941             : };
    2942             : 
    2943             : 
    2944           0 : static PyObject *py_netr_SamBaseInfo_get_logon_time(PyObject *obj, void *closure)
    2945             : {
    2946           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    2947           0 :         PyObject *py_logon_time;
    2948           0 :         py_logon_time = PyLong_FromUnsignedLongLong(object->logon_time);
    2949           0 :         return py_logon_time;
    2950             : }
    2951             : 
    2952           0 : static int py_netr_SamBaseInfo_set_logon_time(PyObject *py_obj, PyObject *value, void *closure)
    2953             : {
    2954           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    2955           0 :         if (value == NULL) {
    2956           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_time");
    2957           0 :                 return -1;
    2958             :         }
    2959             :         {
    2960           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_time));
    2961           0 :                 if (PyLong_Check(value)) {
    2962           0 :                         unsigned long long test_var;
    2963           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2964           0 :                         if (PyErr_Occurred() != NULL) {
    2965           0 :                                 return -1;
    2966             :                         }
    2967           0 :                         if (test_var > uint_max) {
    2968           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2969             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2970           0 :                                 return -1;
    2971             :                         }
    2972           0 :                         object->logon_time = test_var;
    2973             :                 } else {
    2974           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2975             :                           PyLong_Type.tp_name);
    2976           0 :                         return -1;
    2977             :                 }
    2978             :         }
    2979           0 :         return 0;
    2980             : }
    2981             : 
    2982           0 : static PyObject *py_netr_SamBaseInfo_get_logoff_time(PyObject *obj, void *closure)
    2983             : {
    2984           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    2985           0 :         PyObject *py_logoff_time;
    2986           0 :         py_logoff_time = PyLong_FromUnsignedLongLong(object->logoff_time);
    2987           0 :         return py_logoff_time;
    2988             : }
    2989             : 
    2990           0 : static int py_netr_SamBaseInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
    2991             : {
    2992           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    2993           0 :         if (value == NULL) {
    2994           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logoff_time");
    2995           0 :                 return -1;
    2996             :         }
    2997             :         {
    2998           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logoff_time));
    2999           0 :                 if (PyLong_Check(value)) {
    3000           0 :                         unsigned long long test_var;
    3001           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3002           0 :                         if (PyErr_Occurred() != NULL) {
    3003           0 :                                 return -1;
    3004             :                         }
    3005           0 :                         if (test_var > uint_max) {
    3006           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3007             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3008           0 :                                 return -1;
    3009             :                         }
    3010           0 :                         object->logoff_time = test_var;
    3011             :                 } else {
    3012           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3013             :                           PyLong_Type.tp_name);
    3014           0 :                         return -1;
    3015             :                 }
    3016             :         }
    3017           0 :         return 0;
    3018             : }
    3019             : 
    3020           0 : static PyObject *py_netr_SamBaseInfo_get_kickoff_time(PyObject *obj, void *closure)
    3021             : {
    3022           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3023           0 :         PyObject *py_kickoff_time;
    3024           0 :         py_kickoff_time = PyLong_FromUnsignedLongLong(object->kickoff_time);
    3025           0 :         return py_kickoff_time;
    3026             : }
    3027             : 
    3028           0 : static int py_netr_SamBaseInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
    3029             : {
    3030           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3031           0 :         if (value == NULL) {
    3032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->kickoff_time");
    3033           0 :                 return -1;
    3034             :         }
    3035             :         {
    3036           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->kickoff_time));
    3037           0 :                 if (PyLong_Check(value)) {
    3038           0 :                         unsigned long long test_var;
    3039           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3040           0 :                         if (PyErr_Occurred() != NULL) {
    3041           0 :                                 return -1;
    3042             :                         }
    3043           0 :                         if (test_var > uint_max) {
    3044           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3045             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3046           0 :                                 return -1;
    3047             :                         }
    3048           0 :                         object->kickoff_time = test_var;
    3049             :                 } else {
    3050           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3051             :                           PyLong_Type.tp_name);
    3052           0 :                         return -1;
    3053             :                 }
    3054             :         }
    3055           0 :         return 0;
    3056             : }
    3057             : 
    3058           0 : static PyObject *py_netr_SamBaseInfo_get_last_password_change(PyObject *obj, void *closure)
    3059             : {
    3060           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3061           0 :         PyObject *py_last_password_change;
    3062           0 :         py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
    3063           0 :         return py_last_password_change;
    3064             : }
    3065             : 
    3066           0 : static int py_netr_SamBaseInfo_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3067             : {
    3068           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3069           0 :         if (value == NULL) {
    3070           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_password_change");
    3071           0 :                 return -1;
    3072             :         }
    3073             :         {
    3074           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
    3075           0 :                 if (PyLong_Check(value)) {
    3076           0 :                         unsigned long long test_var;
    3077           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3078           0 :                         if (PyErr_Occurred() != NULL) {
    3079           0 :                                 return -1;
    3080             :                         }
    3081           0 :                         if (test_var > uint_max) {
    3082           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3083             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3084           0 :                                 return -1;
    3085             :                         }
    3086           0 :                         object->last_password_change = test_var;
    3087             :                 } else {
    3088           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3089             :                           PyLong_Type.tp_name);
    3090           0 :                         return -1;
    3091             :                 }
    3092             :         }
    3093           0 :         return 0;
    3094             : }
    3095             : 
    3096           0 : static PyObject *py_netr_SamBaseInfo_get_allow_password_change(PyObject *obj, void *closure)
    3097             : {
    3098           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3099           0 :         PyObject *py_allow_password_change;
    3100           0 :         py_allow_password_change = PyLong_FromUnsignedLongLong(object->allow_password_change);
    3101           0 :         return py_allow_password_change;
    3102             : }
    3103             : 
    3104           0 : static int py_netr_SamBaseInfo_set_allow_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3105             : {
    3106           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3107           0 :         if (value == NULL) {
    3108           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->allow_password_change");
    3109           0 :                 return -1;
    3110             :         }
    3111             :         {
    3112           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->allow_password_change));
    3113           0 :                 if (PyLong_Check(value)) {
    3114           0 :                         unsigned long long test_var;
    3115           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3116           0 :                         if (PyErr_Occurred() != NULL) {
    3117           0 :                                 return -1;
    3118             :                         }
    3119           0 :                         if (test_var > uint_max) {
    3120           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3121             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3122           0 :                                 return -1;
    3123             :                         }
    3124           0 :                         object->allow_password_change = test_var;
    3125             :                 } else {
    3126           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3127             :                           PyLong_Type.tp_name);
    3128           0 :                         return -1;
    3129             :                 }
    3130             :         }
    3131           0 :         return 0;
    3132             : }
    3133             : 
    3134           0 : static PyObject *py_netr_SamBaseInfo_get_force_password_change(PyObject *obj, void *closure)
    3135             : {
    3136           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3137           0 :         PyObject *py_force_password_change;
    3138           0 :         py_force_password_change = PyLong_FromUnsignedLongLong(object->force_password_change);
    3139           0 :         return py_force_password_change;
    3140             : }
    3141             : 
    3142           0 : static int py_netr_SamBaseInfo_set_force_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3143             : {
    3144           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3145           0 :         if (value == NULL) {
    3146           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->force_password_change");
    3147           0 :                 return -1;
    3148             :         }
    3149             :         {
    3150           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->force_password_change));
    3151           0 :                 if (PyLong_Check(value)) {
    3152           0 :                         unsigned long long test_var;
    3153           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3154           0 :                         if (PyErr_Occurred() != NULL) {
    3155           0 :                                 return -1;
    3156             :                         }
    3157           0 :                         if (test_var > uint_max) {
    3158           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3159             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3160           0 :                                 return -1;
    3161             :                         }
    3162           0 :                         object->force_password_change = test_var;
    3163             :                 } else {
    3164           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3165             :                           PyLong_Type.tp_name);
    3166           0 :                         return -1;
    3167             :                 }
    3168             :         }
    3169           0 :         return 0;
    3170             : }
    3171             : 
    3172         701 : static PyObject *py_netr_SamBaseInfo_get_account_name(PyObject *obj, void *closure)
    3173             : {
    3174         701 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3175           2 :         PyObject *py_account_name;
    3176         701 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    3177         701 :         return py_account_name;
    3178             : }
    3179             : 
    3180           0 : static int py_netr_SamBaseInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    3181             : {
    3182           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3183           0 :         if (value == NULL) {
    3184           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
    3185           0 :                 return -1;
    3186             :         }
    3187           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3188           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3189           0 :                 PyErr_NoMemory();
    3190           0 :                 return -1;
    3191             :         }
    3192           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    3193           0 :         return 0;
    3194             : }
    3195             : 
    3196           0 : static PyObject *py_netr_SamBaseInfo_get_full_name(PyObject *obj, void *closure)
    3197             : {
    3198           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3199           0 :         PyObject *py_full_name;
    3200           0 :         py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
    3201           0 :         return py_full_name;
    3202             : }
    3203             : 
    3204           0 : static int py_netr_SamBaseInfo_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
    3205             : {
    3206           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3207           0 :         if (value == NULL) {
    3208           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->full_name");
    3209           0 :                 return -1;
    3210             :         }
    3211           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3212           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3213           0 :                 PyErr_NoMemory();
    3214           0 :                 return -1;
    3215             :         }
    3216           0 :         object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    3217           0 :         return 0;
    3218             : }
    3219             : 
    3220           0 : static PyObject *py_netr_SamBaseInfo_get_logon_script(PyObject *obj, void *closure)
    3221             : {
    3222           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3223           0 :         PyObject *py_logon_script;
    3224           0 :         py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
    3225           0 :         return py_logon_script;
    3226             : }
    3227             : 
    3228           0 : static int py_netr_SamBaseInfo_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
    3229             : {
    3230           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3231           0 :         if (value == NULL) {
    3232           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_script");
    3233           0 :                 return -1;
    3234             :         }
    3235           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3236           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3237           0 :                 PyErr_NoMemory();
    3238           0 :                 return -1;
    3239             :         }
    3240           0 :         object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
    3241           0 :         return 0;
    3242             : }
    3243             : 
    3244           0 : static PyObject *py_netr_SamBaseInfo_get_profile_path(PyObject *obj, void *closure)
    3245             : {
    3246           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3247           0 :         PyObject *py_profile_path;
    3248           0 :         py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
    3249           0 :         return py_profile_path;
    3250             : }
    3251             : 
    3252           0 : static int py_netr_SamBaseInfo_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
    3253             : {
    3254           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3255           0 :         if (value == NULL) {
    3256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->profile_path");
    3257           0 :                 return -1;
    3258             :         }
    3259           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3260           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3261           0 :                 PyErr_NoMemory();
    3262           0 :                 return -1;
    3263             :         }
    3264           0 :         object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
    3265           0 :         return 0;
    3266             : }
    3267             : 
    3268           0 : static PyObject *py_netr_SamBaseInfo_get_home_directory(PyObject *obj, void *closure)
    3269             : {
    3270           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3271           0 :         PyObject *py_home_directory;
    3272           0 :         py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
    3273           0 :         return py_home_directory;
    3274             : }
    3275             : 
    3276           0 : static int py_netr_SamBaseInfo_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
    3277             : {
    3278           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3279           0 :         if (value == NULL) {
    3280           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->home_directory");
    3281           0 :                 return -1;
    3282             :         }
    3283           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3284           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3285           0 :                 PyErr_NoMemory();
    3286           0 :                 return -1;
    3287             :         }
    3288           0 :         object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
    3289           0 :         return 0;
    3290             : }
    3291             : 
    3292           0 : static PyObject *py_netr_SamBaseInfo_get_home_drive(PyObject *obj, void *closure)
    3293             : {
    3294           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3295           0 :         PyObject *py_home_drive;
    3296           0 :         py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
    3297           0 :         return py_home_drive;
    3298             : }
    3299             : 
    3300           0 : static int py_netr_SamBaseInfo_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
    3301             : {
    3302           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3303           0 :         if (value == NULL) {
    3304           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->home_drive");
    3305           0 :                 return -1;
    3306             :         }
    3307           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3308           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3309           0 :                 PyErr_NoMemory();
    3310           0 :                 return -1;
    3311             :         }
    3312           0 :         object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
    3313           0 :         return 0;
    3314             : }
    3315             : 
    3316           0 : static PyObject *py_netr_SamBaseInfo_get_logon_count(PyObject *obj, void *closure)
    3317             : {
    3318           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3319           0 :         PyObject *py_logon_count;
    3320           0 :         py_logon_count = PyLong_FromLong((uint16_t)(object->logon_count));
    3321           0 :         return py_logon_count;
    3322             : }
    3323             : 
    3324           0 : static int py_netr_SamBaseInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    3325             : {
    3326           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3327           0 :         if (value == NULL) {
    3328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_count");
    3329           0 :                 return -1;
    3330             :         }
    3331             :         {
    3332           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    3333           0 :                 if (PyLong_Check(value)) {
    3334           0 :                         unsigned long long test_var;
    3335           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3336           0 :                         if (PyErr_Occurred() != NULL) {
    3337           0 :                                 return -1;
    3338             :                         }
    3339           0 :                         if (test_var > uint_max) {
    3340           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3341             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3342           0 :                                 return -1;
    3343             :                         }
    3344           0 :                         object->logon_count = test_var;
    3345             :                 } else {
    3346           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3347             :                           PyLong_Type.tp_name);
    3348           0 :                         return -1;
    3349             :                 }
    3350             :         }
    3351           0 :         return 0;
    3352             : }
    3353             : 
    3354           0 : static PyObject *py_netr_SamBaseInfo_get_bad_password_count(PyObject *obj, void *closure)
    3355             : {
    3356           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3357           0 :         PyObject *py_bad_password_count;
    3358           0 :         py_bad_password_count = PyLong_FromLong((uint16_t)(object->bad_password_count));
    3359           0 :         return py_bad_password_count;
    3360             : }
    3361             : 
    3362           0 : static int py_netr_SamBaseInfo_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
    3363             : {
    3364           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3365           0 :         if (value == NULL) {
    3366           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bad_password_count");
    3367           0 :                 return -1;
    3368             :         }
    3369             :         {
    3370           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
    3371           0 :                 if (PyLong_Check(value)) {
    3372           0 :                         unsigned long long test_var;
    3373           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3374           0 :                         if (PyErr_Occurred() != NULL) {
    3375           0 :                                 return -1;
    3376             :                         }
    3377           0 :                         if (test_var > uint_max) {
    3378           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3379             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3380           0 :                                 return -1;
    3381             :                         }
    3382           0 :                         object->bad_password_count = test_var;
    3383             :                 } else {
    3384           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3385             :                           PyLong_Type.tp_name);
    3386           0 :                         return -1;
    3387             :                 }
    3388             :         }
    3389           0 :         return 0;
    3390             : }
    3391             : 
    3392         538 : static PyObject *py_netr_SamBaseInfo_get_rid(PyObject *obj, void *closure)
    3393             : {
    3394         538 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3395           0 :         PyObject *py_rid;
    3396         538 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->rid));
    3397         538 :         return py_rid;
    3398             : }
    3399             : 
    3400         210 : static int py_netr_SamBaseInfo_set_rid(PyObject *py_obj, PyObject *value, void *closure)
    3401             : {
    3402         210 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3403         210 :         if (value == NULL) {
    3404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rid");
    3405           0 :                 return -1;
    3406             :         }
    3407             :         {
    3408         210 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
    3409         210 :                 if (PyLong_Check(value)) {
    3410           0 :                         unsigned long long test_var;
    3411         210 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3412         210 :                         if (PyErr_Occurred() != NULL) {
    3413           0 :                                 return -1;
    3414             :                         }
    3415         210 :                         if (test_var > uint_max) {
    3416           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3417             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3418           0 :                                 return -1;
    3419             :                         }
    3420         210 :                         object->rid = test_var;
    3421             :                 } else {
    3422           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3423             :                           PyLong_Type.tp_name);
    3424           0 :                         return -1;
    3425             :                 }
    3426             :         }
    3427         210 :         return 0;
    3428             : }
    3429             : 
    3430         359 : static PyObject *py_netr_SamBaseInfo_get_primary_gid(PyObject *obj, void *closure)
    3431             : {
    3432         359 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3433           0 :         PyObject *py_primary_gid;
    3434         359 :         py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)(object->primary_gid));
    3435         359 :         return py_primary_gid;
    3436             : }
    3437             : 
    3438         443 : static int py_netr_SamBaseInfo_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
    3439             : {
    3440         443 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3441         443 :         if (value == NULL) {
    3442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->primary_gid");
    3443           0 :                 return -1;
    3444             :         }
    3445             :         {
    3446         443 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
    3447         443 :                 if (PyLong_Check(value)) {
    3448           0 :                         unsigned long long test_var;
    3449         443 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3450         443 :                         if (PyErr_Occurred() != NULL) {
    3451           0 :                                 return -1;
    3452             :                         }
    3453         443 :                         if (test_var > uint_max) {
    3454           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3455             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3456           0 :                                 return -1;
    3457             :                         }
    3458         443 :                         object->primary_gid = test_var;
    3459             :                 } else {
    3460           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3461             :                           PyLong_Type.tp_name);
    3462           0 :                         return -1;
    3463             :                 }
    3464             :         }
    3465         443 :         return 0;
    3466             : }
    3467             : 
    3468        2069 : static PyObject *py_netr_SamBaseInfo_get_groups(PyObject *obj, void *closure)
    3469             : {
    3470        2069 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3471           0 :         PyObject *py_groups;
    3472        2069 :         py_groups = pytalloc_reference_ex(samr_RidWithAttributeArray_Type, pytalloc_get_mem_ctx(obj), &object->groups);
    3473        2069 :         return py_groups;
    3474             : }
    3475             : 
    3476           0 : static int py_netr_SamBaseInfo_set_groups(PyObject *py_obj, PyObject *value, void *closure)
    3477             : {
    3478           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3479           0 :         if (value == NULL) {
    3480           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->groups");
    3481           0 :                 return -1;
    3482             :         }
    3483           0 :         PY_CHECK_TYPE(samr_RidWithAttributeArray_Type, value, return -1;);
    3484           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3485           0 :                 PyErr_NoMemory();
    3486           0 :                 return -1;
    3487             :         }
    3488           0 :         object->groups = *(struct samr_RidWithAttributeArray *)pytalloc_get_ptr(value);
    3489           0 :         return 0;
    3490             : }
    3491             : 
    3492        2714 : static PyObject *py_netr_SamBaseInfo_get_user_flags(PyObject *obj, void *closure)
    3493             : {
    3494        2714 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3495           0 :         PyObject *py_user_flags;
    3496        2714 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->user_flags));
    3497        2714 :         return py_user_flags;
    3498             : }
    3499             : 
    3500        1996 : static int py_netr_SamBaseInfo_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    3501             : {
    3502        1996 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3503        1996 :         if (value == NULL) {
    3504           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_flags");
    3505           0 :                 return -1;
    3506             :         }
    3507             :         {
    3508        1996 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    3509        1996 :                 if (PyLong_Check(value)) {
    3510           0 :                         unsigned long long test_var;
    3511        1996 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3512        1996 :                         if (PyErr_Occurred() != NULL) {
    3513           0 :                                 return -1;
    3514             :                         }
    3515        1996 :                         if (test_var > uint_max) {
    3516           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3517             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3518           0 :                                 return -1;
    3519             :                         }
    3520        1996 :                         object->user_flags = test_var;
    3521             :                 } else {
    3522           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3523             :                           PyLong_Type.tp_name);
    3524           0 :                         return -1;
    3525             :                 }
    3526             :         }
    3527        1996 :         return 0;
    3528             : }
    3529             : 
    3530           0 : static PyObject *py_netr_SamBaseInfo_get_key(PyObject *obj, void *closure)
    3531             : {
    3532           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3533           0 :         PyObject *py_key;
    3534           0 :         py_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->key);
    3535           0 :         return py_key;
    3536             : }
    3537             : 
    3538           0 : static int py_netr_SamBaseInfo_set_key(PyObject *py_obj, PyObject *value, void *closure)
    3539             : {
    3540           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3541           0 :         if (value == NULL) {
    3542           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->key");
    3543           0 :                 return -1;
    3544             :         }
    3545           0 :         PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
    3546           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3547           0 :                 PyErr_NoMemory();
    3548           0 :                 return -1;
    3549             :         }
    3550           0 :         object->key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
    3551           0 :         return 0;
    3552             : }
    3553             : 
    3554           0 : static PyObject *py_netr_SamBaseInfo_get_logon_server(PyObject *obj, void *closure)
    3555             : {
    3556           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3557           0 :         PyObject *py_logon_server;
    3558           0 :         py_logon_server = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
    3559           0 :         return py_logon_server;
    3560             : }
    3561             : 
    3562           0 : static int py_netr_SamBaseInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
    3563             : {
    3564           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3565           0 :         if (value == NULL) {
    3566           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_server");
    3567           0 :                 return -1;
    3568             :         }
    3569           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
    3570           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3571           0 :                 PyErr_NoMemory();
    3572           0 :                 return -1;
    3573             :         }
    3574           0 :         object->logon_server = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
    3575           0 :         return 0;
    3576             : }
    3577             : 
    3578           0 : static PyObject *py_netr_SamBaseInfo_get_logon_domain(PyObject *obj, void *closure)
    3579             : {
    3580           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3581           0 :         PyObject *py_logon_domain;
    3582           0 :         py_logon_domain = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
    3583           0 :         return py_logon_domain;
    3584             : }
    3585             : 
    3586           0 : static int py_netr_SamBaseInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
    3587             : {
    3588           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3589           0 :         if (value == NULL) {
    3590           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_domain");
    3591           0 :                 return -1;
    3592             :         }
    3593           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
    3594           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3595           0 :                 PyErr_NoMemory();
    3596           0 :                 return -1;
    3597             :         }
    3598           0 :         object->logon_domain = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
    3599           0 :         return 0;
    3600             : }
    3601             : 
    3602        8042 : static PyObject *py_netr_SamBaseInfo_get_domain_sid(PyObject *obj, void *closure)
    3603             : {
    3604        8042 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3605           0 :         PyObject *py_domain_sid;
    3606        8042 :         if (object->domain_sid == NULL) {
    3607           0 :                 Py_RETURN_NONE;
    3608             :         }
    3609        8042 :         if (object->domain_sid == NULL) {
    3610           0 :                 py_domain_sid = Py_None;
    3611           0 :                 Py_INCREF(py_domain_sid);
    3612             :         } else {
    3613        8042 :                 py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->domain_sid, object->domain_sid);
    3614             :         }
    3615        8042 :         return py_domain_sid;
    3616             : }
    3617             : 
    3618         499 : static int py_netr_SamBaseInfo_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
    3619             : {
    3620         499 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3621         499 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain_sid));
    3622         499 :         if (value == NULL) {
    3623           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_sid");
    3624           0 :                 return -1;
    3625             :         }
    3626         499 :         if (value == Py_None) {
    3627           0 :                 object->domain_sid = NULL;
    3628             :         } else {
    3629         499 :                 object->domain_sid = NULL;
    3630         499 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    3631         499 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3632           0 :                         PyErr_NoMemory();
    3633           0 :                         return -1;
    3634             :                 }
    3635         499 :                 object->domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
    3636             :         }
    3637         499 :         return 0;
    3638             : }
    3639             : 
    3640           0 : static PyObject *py_netr_SamBaseInfo_get_LMSessKey(PyObject *obj, void *closure)
    3641             : {
    3642           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3643           0 :         PyObject *py_LMSessKey;
    3644           0 :         py_LMSessKey = pytalloc_reference_ex(&netr_LMSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->LMSessKey);
    3645           0 :         return py_LMSessKey;
    3646             : }
    3647             : 
    3648           0 : static int py_netr_SamBaseInfo_set_LMSessKey(PyObject *py_obj, PyObject *value, void *closure)
    3649             : {
    3650           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3651           0 :         if (value == NULL) {
    3652           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->LMSessKey");
    3653           0 :                 return -1;
    3654             :         }
    3655           0 :         PY_CHECK_TYPE(&netr_LMSessionKey_Type, value, return -1;);
    3656           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3657           0 :                 PyErr_NoMemory();
    3658           0 :                 return -1;
    3659             :         }
    3660           0 :         object->LMSessKey = *(struct netr_LMSessionKey *)pytalloc_get_ptr(value);
    3661           0 :         return 0;
    3662             : }
    3663             : 
    3664           0 : static PyObject *py_netr_SamBaseInfo_get_acct_flags(PyObject *obj, void *closure)
    3665             : {
    3666           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3667           0 :         PyObject *py_acct_flags;
    3668           0 :         py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->acct_flags));
    3669           0 :         return py_acct_flags;
    3670             : }
    3671             : 
    3672           0 : static int py_netr_SamBaseInfo_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
    3673             : {
    3674           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3675           0 :         if (value == NULL) {
    3676           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->acct_flags");
    3677           0 :                 return -1;
    3678             :         }
    3679             :         {
    3680           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
    3681           0 :                 if (PyLong_Check(value)) {
    3682           0 :                         unsigned long long test_var;
    3683           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3684           0 :                         if (PyErr_Occurred() != NULL) {
    3685           0 :                                 return -1;
    3686             :                         }
    3687           0 :                         if (test_var > uint_max) {
    3688           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3689             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3690           0 :                                 return -1;
    3691             :                         }
    3692           0 :                         object->acct_flags = test_var;
    3693             :                 } else {
    3694           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3695             :                           PyLong_Type.tp_name);
    3696           0 :                         return -1;
    3697             :                 }
    3698             :         }
    3699           0 :         return 0;
    3700             : }
    3701             : 
    3702           0 : static PyObject *py_netr_SamBaseInfo_get_sub_auth_status(PyObject *obj, void *closure)
    3703             : {
    3704           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3705           0 :         PyObject *py_sub_auth_status;
    3706           0 :         py_sub_auth_status = PyLong_FromUnsignedLongLong((uint32_t)(object->sub_auth_status));
    3707           0 :         return py_sub_auth_status;
    3708             : }
    3709             : 
    3710           0 : static int py_netr_SamBaseInfo_set_sub_auth_status(PyObject *py_obj, PyObject *value, void *closure)
    3711             : {
    3712           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3713           0 :         if (value == NULL) {
    3714           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sub_auth_status");
    3715           0 :                 return -1;
    3716             :         }
    3717             :         {
    3718           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sub_auth_status));
    3719           0 :                 if (PyLong_Check(value)) {
    3720           0 :                         unsigned long long test_var;
    3721           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3722           0 :                         if (PyErr_Occurred() != NULL) {
    3723           0 :                                 return -1;
    3724             :                         }
    3725           0 :                         if (test_var > uint_max) {
    3726           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3727             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3728           0 :                                 return -1;
    3729             :                         }
    3730           0 :                         object->sub_auth_status = test_var;
    3731             :                 } else {
    3732           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3733             :                           PyLong_Type.tp_name);
    3734           0 :                         return -1;
    3735             :                 }
    3736             :         }
    3737           0 :         return 0;
    3738             : }
    3739             : 
    3740           0 : static PyObject *py_netr_SamBaseInfo_get_last_successful_logon(PyObject *obj, void *closure)
    3741             : {
    3742           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3743           0 :         PyObject *py_last_successful_logon;
    3744           0 :         py_last_successful_logon = PyLong_FromUnsignedLongLong(object->last_successful_logon);
    3745           0 :         return py_last_successful_logon;
    3746             : }
    3747             : 
    3748           0 : static int py_netr_SamBaseInfo_set_last_successful_logon(PyObject *py_obj, PyObject *value, void *closure)
    3749             : {
    3750           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3751           0 :         if (value == NULL) {
    3752           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_successful_logon");
    3753           0 :                 return -1;
    3754             :         }
    3755             :         {
    3756           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_successful_logon));
    3757           0 :                 if (PyLong_Check(value)) {
    3758           0 :                         unsigned long long test_var;
    3759           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3760           0 :                         if (PyErr_Occurred() != NULL) {
    3761           0 :                                 return -1;
    3762             :                         }
    3763           0 :                         if (test_var > uint_max) {
    3764           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3765             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3766           0 :                                 return -1;
    3767             :                         }
    3768           0 :                         object->last_successful_logon = test_var;
    3769             :                 } else {
    3770           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3771             :                           PyLong_Type.tp_name);
    3772           0 :                         return -1;
    3773             :                 }
    3774             :         }
    3775           0 :         return 0;
    3776             : }
    3777             : 
    3778           0 : static PyObject *py_netr_SamBaseInfo_get_last_failed_logon(PyObject *obj, void *closure)
    3779             : {
    3780           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3781           0 :         PyObject *py_last_failed_logon;
    3782           0 :         py_last_failed_logon = PyLong_FromUnsignedLongLong(object->last_failed_logon);
    3783           0 :         return py_last_failed_logon;
    3784             : }
    3785             : 
    3786           0 : static int py_netr_SamBaseInfo_set_last_failed_logon(PyObject *py_obj, PyObject *value, void *closure)
    3787             : {
    3788           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3789           0 :         if (value == NULL) {
    3790           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_failed_logon");
    3791           0 :                 return -1;
    3792             :         }
    3793             :         {
    3794           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_failed_logon));
    3795           0 :                 if (PyLong_Check(value)) {
    3796           0 :                         unsigned long long test_var;
    3797           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3798           0 :                         if (PyErr_Occurred() != NULL) {
    3799           0 :                                 return -1;
    3800             :                         }
    3801           0 :                         if (test_var > uint_max) {
    3802           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3803             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3804           0 :                                 return -1;
    3805             :                         }
    3806           0 :                         object->last_failed_logon = test_var;
    3807             :                 } else {
    3808           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3809             :                           PyLong_Type.tp_name);
    3810           0 :                         return -1;
    3811             :                 }
    3812             :         }
    3813           0 :         return 0;
    3814             : }
    3815             : 
    3816           0 : static PyObject *py_netr_SamBaseInfo_get_failed_logon_count(PyObject *obj, void *closure)
    3817             : {
    3818           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3819           0 :         PyObject *py_failed_logon_count;
    3820           0 :         py_failed_logon_count = PyLong_FromUnsignedLongLong((uint32_t)(object->failed_logon_count));
    3821           0 :         return py_failed_logon_count;
    3822             : }
    3823             : 
    3824           0 : static int py_netr_SamBaseInfo_set_failed_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    3825             : {
    3826           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3827           0 :         if (value == NULL) {
    3828           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->failed_logon_count");
    3829           0 :                 return -1;
    3830             :         }
    3831             :         {
    3832           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->failed_logon_count));
    3833           0 :                 if (PyLong_Check(value)) {
    3834           0 :                         unsigned long long test_var;
    3835           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3836           0 :                         if (PyErr_Occurred() != NULL) {
    3837           0 :                                 return -1;
    3838             :                         }
    3839           0 :                         if (test_var > uint_max) {
    3840           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3841             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3842           0 :                                 return -1;
    3843             :                         }
    3844           0 :                         object->failed_logon_count = test_var;
    3845             :                 } else {
    3846           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3847             :                           PyLong_Type.tp_name);
    3848           0 :                         return -1;
    3849             :                 }
    3850             :         }
    3851           0 :         return 0;
    3852             : }
    3853             : 
    3854           0 : static PyObject *py_netr_SamBaseInfo_get_reserved(PyObject *obj, void *closure)
    3855             : {
    3856           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
    3857           0 :         PyObject *py_reserved;
    3858           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
    3859           0 :         return py_reserved;
    3860             : }
    3861             : 
    3862           0 : static int py_netr_SamBaseInfo_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    3863             : {
    3864           0 :         struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
    3865           0 :         if (value == NULL) {
    3866           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved");
    3867           0 :                 return -1;
    3868             :         }
    3869             :         {
    3870           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    3871           0 :                 if (PyLong_Check(value)) {
    3872           0 :                         unsigned long long test_var;
    3873           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3874           0 :                         if (PyErr_Occurred() != NULL) {
    3875           0 :                                 return -1;
    3876             :                         }
    3877           0 :                         if (test_var > uint_max) {
    3878           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3879             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3880           0 :                                 return -1;
    3881             :                         }
    3882           0 :                         object->reserved = test_var;
    3883             :                 } else {
    3884           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3885             :                           PyLong_Type.tp_name);
    3886           0 :                         return -1;
    3887             :                 }
    3888             :         }
    3889           0 :         return 0;
    3890             : }
    3891             : 
    3892             : static PyGetSetDef py_netr_SamBaseInfo_getsetters[] = {
    3893             :         {
    3894             :                 .name = discard_const_p(char, "logon_time"),
    3895             :                 .get = py_netr_SamBaseInfo_get_logon_time,
    3896             :                 .set = py_netr_SamBaseInfo_set_logon_time,
    3897             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3898             :         },
    3899             :         {
    3900             :                 .name = discard_const_p(char, "logoff_time"),
    3901             :                 .get = py_netr_SamBaseInfo_get_logoff_time,
    3902             :                 .set = py_netr_SamBaseInfo_set_logoff_time,
    3903             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3904             :         },
    3905             :         {
    3906             :                 .name = discard_const_p(char, "kickoff_time"),
    3907             :                 .get = py_netr_SamBaseInfo_get_kickoff_time,
    3908             :                 .set = py_netr_SamBaseInfo_set_kickoff_time,
    3909             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3910             :         },
    3911             :         {
    3912             :                 .name = discard_const_p(char, "last_password_change"),
    3913             :                 .get = py_netr_SamBaseInfo_get_last_password_change,
    3914             :                 .set = py_netr_SamBaseInfo_set_last_password_change,
    3915             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3916             :         },
    3917             :         {
    3918             :                 .name = discard_const_p(char, "allow_password_change"),
    3919             :                 .get = py_netr_SamBaseInfo_get_allow_password_change,
    3920             :                 .set = py_netr_SamBaseInfo_set_allow_password_change,
    3921             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3922             :         },
    3923             :         {
    3924             :                 .name = discard_const_p(char, "force_password_change"),
    3925             :                 .get = py_netr_SamBaseInfo_get_force_password_change,
    3926             :                 .set = py_netr_SamBaseInfo_set_force_password_change,
    3927             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3928             :         },
    3929             :         {
    3930             :                 .name = discard_const_p(char, "account_name"),
    3931             :                 .get = py_netr_SamBaseInfo_get_account_name,
    3932             :                 .set = py_netr_SamBaseInfo_set_account_name,
    3933             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3934             :         },
    3935             :         {
    3936             :                 .name = discard_const_p(char, "full_name"),
    3937             :                 .get = py_netr_SamBaseInfo_get_full_name,
    3938             :                 .set = py_netr_SamBaseInfo_set_full_name,
    3939             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3940             :         },
    3941             :         {
    3942             :                 .name = discard_const_p(char, "logon_script"),
    3943             :                 .get = py_netr_SamBaseInfo_get_logon_script,
    3944             :                 .set = py_netr_SamBaseInfo_set_logon_script,
    3945             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3946             :         },
    3947             :         {
    3948             :                 .name = discard_const_p(char, "profile_path"),
    3949             :                 .get = py_netr_SamBaseInfo_get_profile_path,
    3950             :                 .set = py_netr_SamBaseInfo_set_profile_path,
    3951             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3952             :         },
    3953             :         {
    3954             :                 .name = discard_const_p(char, "home_directory"),
    3955             :                 .get = py_netr_SamBaseInfo_get_home_directory,
    3956             :                 .set = py_netr_SamBaseInfo_set_home_directory,
    3957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3958             :         },
    3959             :         {
    3960             :                 .name = discard_const_p(char, "home_drive"),
    3961             :                 .get = py_netr_SamBaseInfo_get_home_drive,
    3962             :                 .set = py_netr_SamBaseInfo_set_home_drive,
    3963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3964             :         },
    3965             :         {
    3966             :                 .name = discard_const_p(char, "logon_count"),
    3967             :                 .get = py_netr_SamBaseInfo_get_logon_count,
    3968             :                 .set = py_netr_SamBaseInfo_set_logon_count,
    3969             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3970             :         },
    3971             :         {
    3972             :                 .name = discard_const_p(char, "bad_password_count"),
    3973             :                 .get = py_netr_SamBaseInfo_get_bad_password_count,
    3974             :                 .set = py_netr_SamBaseInfo_set_bad_password_count,
    3975             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3976             :         },
    3977             :         {
    3978             :                 .name = discard_const_p(char, "rid"),
    3979             :                 .get = py_netr_SamBaseInfo_get_rid,
    3980             :                 .set = py_netr_SamBaseInfo_set_rid,
    3981             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3982             :         },
    3983             :         {
    3984             :                 .name = discard_const_p(char, "primary_gid"),
    3985             :                 .get = py_netr_SamBaseInfo_get_primary_gid,
    3986             :                 .set = py_netr_SamBaseInfo_set_primary_gid,
    3987             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3988             :         },
    3989             :         {
    3990             :                 .name = discard_const_p(char, "groups"),
    3991             :                 .get = py_netr_SamBaseInfo_get_groups,
    3992             :                 .set = py_netr_SamBaseInfo_set_groups,
    3993             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_RidWithAttributeArray")
    3994             :         },
    3995             :         {
    3996             :                 .name = discard_const_p(char, "user_flags"),
    3997             :                 .get = py_netr_SamBaseInfo_get_user_flags,
    3998             :                 .set = py_netr_SamBaseInfo_set_user_flags,
    3999             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserFlags")
    4000             :         },
    4001             :         {
    4002             :                 .name = discard_const_p(char, "key"),
    4003             :                 .get = py_netr_SamBaseInfo_get_key,
    4004             :                 .set = py_netr_SamBaseInfo_set_key,
    4005             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
    4006             :         },
    4007             :         {
    4008             :                 .name = discard_const_p(char, "logon_server"),
    4009             :                 .get = py_netr_SamBaseInfo_get_logon_server,
    4010             :                 .set = py_netr_SamBaseInfo_set_logon_server,
    4011             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
    4012             :         },
    4013             :         {
    4014             :                 .name = discard_const_p(char, "logon_domain"),
    4015             :                 .get = py_netr_SamBaseInfo_get_logon_domain,
    4016             :                 .set = py_netr_SamBaseInfo_set_logon_domain,
    4017             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
    4018             :         },
    4019             :         {
    4020             :                 .name = discard_const_p(char, "domain_sid"),
    4021             :                 .get = py_netr_SamBaseInfo_get_domain_sid,
    4022             :                 .set = py_netr_SamBaseInfo_set_domain_sid,
    4023             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
    4024             :         },
    4025             :         {
    4026             :                 .name = discard_const_p(char, "LMSessKey"),
    4027             :                 .get = py_netr_SamBaseInfo_get_LMSessKey,
    4028             :                 .set = py_netr_SamBaseInfo_set_LMSessKey,
    4029             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LMSessionKey")
    4030             :         },
    4031             :         {
    4032             :                 .name = discard_const_p(char, "acct_flags"),
    4033             :                 .get = py_netr_SamBaseInfo_get_acct_flags,
    4034             :                 .set = py_netr_SamBaseInfo_set_acct_flags,
    4035             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
    4036             :         },
    4037             :         {
    4038             :                 .name = discard_const_p(char, "sub_auth_status"),
    4039             :                 .get = py_netr_SamBaseInfo_get_sub_auth_status,
    4040             :                 .set = py_netr_SamBaseInfo_set_sub_auth_status,
    4041             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4042             :         },
    4043             :         {
    4044             :                 .name = discard_const_p(char, "last_successful_logon"),
    4045             :                 .get = py_netr_SamBaseInfo_get_last_successful_logon,
    4046             :                 .set = py_netr_SamBaseInfo_set_last_successful_logon,
    4047             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    4048             :         },
    4049             :         {
    4050             :                 .name = discard_const_p(char, "last_failed_logon"),
    4051             :                 .get = py_netr_SamBaseInfo_get_last_failed_logon,
    4052             :                 .set = py_netr_SamBaseInfo_set_last_failed_logon,
    4053             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    4054             :         },
    4055             :         {
    4056             :                 .name = discard_const_p(char, "failed_logon_count"),
    4057             :                 .get = py_netr_SamBaseInfo_get_failed_logon_count,
    4058             :                 .set = py_netr_SamBaseInfo_set_failed_logon_count,
    4059             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4060             :         },
    4061             :         {
    4062             :                 .name = discard_const_p(char, "reserved"),
    4063             :                 .get = py_netr_SamBaseInfo_get_reserved,
    4064             :                 .set = py_netr_SamBaseInfo_set_reserved,
    4065             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4066             :         },
    4067             :         { .name = NULL }
    4068             : };
    4069             : 
    4070           0 : static PyObject *py_netr_SamBaseInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4071             : {
    4072           0 :         return pytalloc_new(struct netr_SamBaseInfo, type);
    4073             : }
    4074             : 
    4075             : 
    4076             : static PyTypeObject netr_SamBaseInfo_Type = {
    4077             :         PyVarObject_HEAD_INIT(NULL, 0)
    4078             :         .tp_name = "netlogon.netr_SamBaseInfo",
    4079             :         .tp_getset = py_netr_SamBaseInfo_getsetters,
    4080             :         .tp_methods = NULL,
    4081             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4082             :         .tp_new = py_netr_SamBaseInfo_new,
    4083             : };
    4084             : 
    4085             : 
    4086           2 : static PyObject *py_netr_SamInfo2_get_base(PyObject *obj, void *closure)
    4087             : {
    4088           2 :         struct netr_SamInfo2 *object = pytalloc_get_ptr(obj);
    4089           0 :         PyObject *py_base;
    4090           2 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4091           2 :         return py_base;
    4092             : }
    4093             : 
    4094           0 : static int py_netr_SamInfo2_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4095             : {
    4096           0 :         struct netr_SamInfo2 *object = pytalloc_get_ptr(py_obj);
    4097           0 :         if (value == NULL) {
    4098           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->base");
    4099           0 :                 return -1;
    4100             :         }
    4101           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4102           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4103           0 :                 PyErr_NoMemory();
    4104           0 :                 return -1;
    4105             :         }
    4106           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4107           0 :         return 0;
    4108             : }
    4109             : 
    4110             : static PyGetSetDef py_netr_SamInfo2_getsetters[] = {
    4111             :         {
    4112             :                 .name = discard_const_p(char, "base"),
    4113             :                 .get = py_netr_SamInfo2_get_base,
    4114             :                 .set = py_netr_SamInfo2_set_base,
    4115             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4116             :         },
    4117             :         { .name = NULL }
    4118             : };
    4119             : 
    4120           0 : static PyObject *py_netr_SamInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4121             : {
    4122           0 :         return pytalloc_new(struct netr_SamInfo2, type);
    4123             : }
    4124             : 
    4125             : 
    4126             : static PyTypeObject netr_SamInfo2_Type = {
    4127             :         PyVarObject_HEAD_INIT(NULL, 0)
    4128             :         .tp_name = "netlogon.netr_SamInfo2",
    4129             :         .tp_getset = py_netr_SamInfo2_getsetters,
    4130             :         .tp_methods = NULL,
    4131             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4132             :         .tp_new = py_netr_SamInfo2_new,
    4133             : };
    4134             : 
    4135             : 
    4136         869 : static PyObject *py_netr_SidAttr_get_sid(PyObject *obj, void *closure)
    4137             : {
    4138         869 :         struct netr_SidAttr *object = pytalloc_get_ptr(obj);
    4139           0 :         PyObject *py_sid;
    4140         869 :         if (object->sid == NULL) {
    4141           0 :                 Py_RETURN_NONE;
    4142             :         }
    4143         869 :         if (object->sid == NULL) {
    4144           0 :                 py_sid = Py_None;
    4145           0 :                 Py_INCREF(py_sid);
    4146             :         } else {
    4147         869 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
    4148             :         }
    4149         869 :         return py_sid;
    4150             : }
    4151             : 
    4152         816 : static int py_netr_SidAttr_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    4153             : {
    4154         816 :         struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
    4155         816 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
    4156         816 :         if (value == NULL) {
    4157           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sid");
    4158           0 :                 return -1;
    4159             :         }
    4160         816 :         if (value == Py_None) {
    4161           0 :                 object->sid = NULL;
    4162             :         } else {
    4163         816 :                 object->sid = NULL;
    4164         816 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    4165         816 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4166           0 :                         PyErr_NoMemory();
    4167           0 :                         return -1;
    4168             :                 }
    4169         816 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
    4170             :         }
    4171         816 :         return 0;
    4172             : }
    4173             : 
    4174         790 : static PyObject *py_netr_SidAttr_get_attributes(PyObject *obj, void *closure)
    4175             : {
    4176         790 :         struct netr_SidAttr *object = pytalloc_get_ptr(obj);
    4177           0 :         PyObject *py_attributes;
    4178         790 :         py_attributes = PyLong_FromUnsignedLongLong((uint32_t)(object->attributes));
    4179         790 :         return py_attributes;
    4180             : }
    4181             : 
    4182         816 : static int py_netr_SidAttr_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
    4183             : {
    4184         816 :         struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
    4185         816 :         if (value == NULL) {
    4186           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->attributes");
    4187           0 :                 return -1;
    4188             :         }
    4189             :         {
    4190         816 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attributes));
    4191         816 :                 if (PyLong_Check(value)) {
    4192           0 :                         unsigned long long test_var;
    4193         816 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4194         816 :                         if (PyErr_Occurred() != NULL) {
    4195           0 :                                 return -1;
    4196             :                         }
    4197         816 :                         if (test_var > uint_max) {
    4198           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4199             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4200           0 :                                 return -1;
    4201             :                         }
    4202         816 :                         object->attributes = test_var;
    4203             :                 } else {
    4204           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4205             :                           PyLong_Type.tp_name);
    4206           0 :                         return -1;
    4207             :                 }
    4208             :         }
    4209         816 :         return 0;
    4210             : }
    4211             : 
    4212             : static PyGetSetDef py_netr_SidAttr_getsetters[] = {
    4213             :         {
    4214             :                 .name = discard_const_p(char, "sid"),
    4215             :                 .get = py_netr_SidAttr_get_sid,
    4216             :                 .set = py_netr_SidAttr_set_sid,
    4217             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
    4218             :         },
    4219             :         {
    4220             :                 .name = discard_const_p(char, "attributes"),
    4221             :                 .get = py_netr_SidAttr_get_attributes,
    4222             :                 .set = py_netr_SidAttr_set_attributes,
    4223             :                 .doc = discard_const_p(char, "PIDL-generated element of base type security_GroupAttrs")
    4224             :         },
    4225             :         { .name = NULL }
    4226             : };
    4227             : 
    4228         816 : static PyObject *py_netr_SidAttr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4229             : {
    4230         816 :         return pytalloc_new(struct netr_SidAttr, type);
    4231             : }
    4232             : 
    4233           0 : static PyObject *py_netr_SidAttr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4234             : {
    4235           0 :         struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
    4236           0 :         PyObject *ret = NULL;
    4237           0 :         DATA_BLOB blob;
    4238           0 :         enum ndr_err_code err;
    4239           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4240           0 :         if (tmp_ctx == NULL) {
    4241           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4242           0 :                 return NULL;
    4243             :         }
    4244           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SidAttr);
    4245           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4246           0 :                 TALLOC_FREE(tmp_ctx);
    4247           0 :                 PyErr_SetNdrError(err);
    4248           0 :                 return NULL;
    4249             :         }
    4250             : 
    4251           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4252           0 :         TALLOC_FREE(tmp_ctx);
    4253           0 :         return ret;
    4254             : }
    4255             : 
    4256           0 : static PyObject *py_netr_SidAttr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4257             : {
    4258           0 :         struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
    4259           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4260           0 :         Py_ssize_t blob_length = 0;
    4261           0 :         enum ndr_err_code err;
    4262           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4263           0 :         PyObject *allow_remaining_obj = NULL;
    4264           0 :         bool allow_remaining = false;
    4265             : 
    4266           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4267             :                 discard_const_p(char *, kwnames),
    4268             :                 &blob.data, &blob_length,
    4269             :                 &allow_remaining_obj)) {
    4270           0 :                 return NULL;
    4271             :         }
    4272           0 :         blob.length = blob_length;
    4273             : 
    4274           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4275           0 :                 allow_remaining = true;
    4276             :         }
    4277             : 
    4278           0 :         if (allow_remaining) {
    4279           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SidAttr);
    4280             :         } else {
    4281           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SidAttr);
    4282             :         }
    4283           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4284           0 :                 PyErr_SetNdrError(err);
    4285           0 :                 return NULL;
    4286             :         }
    4287             : 
    4288           0 :         Py_RETURN_NONE;
    4289             : }
    4290             : 
    4291           0 : static PyObject *py_netr_SidAttr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4292             : {
    4293           0 :         struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
    4294           0 :         PyObject *ret;
    4295           0 :         char *retstr;
    4296             : 
    4297           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SidAttr, "netr_SidAttr", object);
    4298           0 :         ret = PyUnicode_FromString(retstr);
    4299           0 :         talloc_free(retstr);
    4300             : 
    4301           0 :         return ret;
    4302             : }
    4303             : 
    4304             : static PyMethodDef py_netr_SidAttr_methods[] = {
    4305             :         { "__ndr_pack__", (PyCFunction)py_netr_SidAttr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4306             :         { "__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" },
    4307             :         { "__ndr_print__", (PyCFunction)py_netr_SidAttr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4308             :         { NULL, NULL, 0, NULL }
    4309             : };
    4310             : 
    4311             : 
    4312             : static PyTypeObject netr_SidAttr_Type = {
    4313             :         PyVarObject_HEAD_INIT(NULL, 0)
    4314             :         .tp_name = "netlogon.netr_SidAttr",
    4315             :         .tp_getset = py_netr_SidAttr_getsetters,
    4316             :         .tp_methods = py_netr_SidAttr_methods,
    4317             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4318             :         .tp_new = py_netr_SidAttr_new,
    4319             : };
    4320             : 
    4321             : 
    4322       20295 : static PyObject *py_netr_SamInfo3_get_base(PyObject *obj, void *closure)
    4323             : {
    4324       20295 :         struct netr_SamInfo3 *object = pytalloc_get_ptr(obj);
    4325           2 :         PyObject *py_base;
    4326       20295 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4327       20295 :         return py_base;
    4328             : }
    4329             : 
    4330           0 : static int py_netr_SamInfo3_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4331             : {
    4332           0 :         struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
    4333           0 :         if (value == NULL) {
    4334           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->base");
    4335           0 :                 return -1;
    4336             :         }
    4337           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4338           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4339           0 :                 PyErr_NoMemory();
    4340           0 :                 return -1;
    4341             :         }
    4342           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4343           0 :         return 0;
    4344             : }
    4345             : 
    4346           2 : static PyObject *py_netr_SamInfo3_get_sidcount(PyObject *obj, void *closure)
    4347             : {
    4348           2 :         struct netr_SamInfo3 *object = pytalloc_get_ptr(obj);
    4349           0 :         PyObject *py_sidcount;
    4350           2 :         py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)(object->sidcount));
    4351           2 :         return py_sidcount;
    4352             : }
    4353             : 
    4354         499 : static int py_netr_SamInfo3_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
    4355             : {
    4356         499 :         struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
    4357         499 :         if (value == NULL) {
    4358           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sidcount");
    4359           0 :                 return -1;
    4360             :         }
    4361             :         {
    4362         499 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
    4363         499 :                 if (PyLong_Check(value)) {
    4364           0 :                         unsigned long long test_var;
    4365         499 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4366         499 :                         if (PyErr_Occurred() != NULL) {
    4367           0 :                                 return -1;
    4368             :                         }
    4369         499 :                         if (test_var > uint_max) {
    4370           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4371             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4372           0 :                                 return -1;
    4373             :                         }
    4374         499 :                         object->sidcount = test_var;
    4375             :                 } else {
    4376           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4377             :                           PyLong_Type.tp_name);
    4378           0 :                         return -1;
    4379             :                 }
    4380             :         }
    4381         499 :         return 0;
    4382             : }
    4383             : 
    4384        1061 : static PyObject *py_netr_SamInfo3_get_sids(PyObject *obj, void *closure)
    4385             : {
    4386        1061 :         struct netr_SamInfo3 *object = pytalloc_get_ptr(obj);
    4387           0 :         PyObject *py_sids;
    4388        1061 :         if (object->sids == NULL) {
    4389           0 :                 Py_RETURN_NONE;
    4390             :         }
    4391        1061 :         if (object->sids == NULL) {
    4392           0 :                 py_sids = Py_None;
    4393           0 :                 Py_INCREF(py_sids);
    4394             :         } else {
    4395        1061 :                 py_sids = PyList_New(object->sidcount);
    4396        1061 :                 if (py_sids == NULL) {
    4397           0 :                         return NULL;
    4398             :                 }
    4399             :                 {
    4400             :                         int sids_cntr_1;
    4401        3190 :                         for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
    4402           0 :                                 PyObject *py_sids_1;
    4403        2129 :                                 py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &(object->sids)[sids_cntr_1]);
    4404        2129 :                                 PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
    4405             :                         }
    4406             :                 }
    4407             :         }
    4408        1061 :         return py_sids;
    4409             : }
    4410             : 
    4411         499 : static int py_netr_SamInfo3_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4412             : {
    4413         499 :         struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
    4414         499 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
    4415         499 :         if (value == NULL) {
    4416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sids");
    4417           0 :                 return -1;
    4418             :         }
    4419         499 :         if (value == Py_None) {
    4420          91 :                 object->sids = NULL;
    4421             :         } else {
    4422         408 :                 object->sids = NULL;
    4423         408 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4424             :                 {
    4425           0 :                         int sids_cntr_1;
    4426         408 :                         object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    4427         408 :                         if (!object->sids) { return -1; }
    4428         408 :                         talloc_set_name_const(object->sids, "ARRAY: object->sids");
    4429        1128 :                         for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
    4430         720 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
    4431           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sids)[sids_cntr_1]");
    4432           0 :                                         return -1;
    4433             :                                 }
    4434         720 :                                 PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
    4435         720 :                                 if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
    4436           0 :                                         PyErr_NoMemory();
    4437           0 :                                         return -1;
    4438             :                                 }
    4439         720 :                                 (object->sids)[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
    4440             :                         }
    4441             :                 }
    4442             :         }
    4443         499 :         return 0;
    4444             : }
    4445             : 
    4446             : static PyGetSetDef py_netr_SamInfo3_getsetters[] = {
    4447             :         {
    4448             :                 .name = discard_const_p(char, "base"),
    4449             :                 .get = py_netr_SamInfo3_get_base,
    4450             :                 .set = py_netr_SamInfo3_set_base,
    4451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4452             :         },
    4453             :         {
    4454             :                 .name = discard_const_p(char, "sidcount"),
    4455             :                 .get = py_netr_SamInfo3_get_sidcount,
    4456             :                 .set = py_netr_SamInfo3_set_sidcount,
    4457             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4458             :         },
    4459             :         {
    4460             :                 .name = discard_const_p(char, "sids"),
    4461             :                 .get = py_netr_SamInfo3_get_sids,
    4462             :                 .set = py_netr_SamInfo3_set_sids,
    4463             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
    4464             :         },
    4465             :         { .name = NULL }
    4466             : };
    4467             : 
    4468           0 : static PyObject *py_netr_SamInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4469             : {
    4470           0 :         return pytalloc_new(struct netr_SamInfo3, type);
    4471             : }
    4472             : 
    4473           0 : static PyObject *py_netr_SamInfo3_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4474             : {
    4475           0 :         struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
    4476           0 :         PyObject *ret = NULL;
    4477           0 :         DATA_BLOB blob;
    4478           0 :         enum ndr_err_code err;
    4479           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4480           0 :         if (tmp_ctx == NULL) {
    4481           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4482           0 :                 return NULL;
    4483             :         }
    4484           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SamInfo3);
    4485           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4486           0 :                 TALLOC_FREE(tmp_ctx);
    4487           0 :                 PyErr_SetNdrError(err);
    4488           0 :                 return NULL;
    4489             :         }
    4490             : 
    4491           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4492           0 :         TALLOC_FREE(tmp_ctx);
    4493           0 :         return ret;
    4494             : }
    4495             : 
    4496           0 : static PyObject *py_netr_SamInfo3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4497             : {
    4498           0 :         struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
    4499           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4500           0 :         Py_ssize_t blob_length = 0;
    4501           0 :         enum ndr_err_code err;
    4502           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4503           0 :         PyObject *allow_remaining_obj = NULL;
    4504           0 :         bool allow_remaining = false;
    4505             : 
    4506           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4507             :                 discard_const_p(char *, kwnames),
    4508             :                 &blob.data, &blob_length,
    4509             :                 &allow_remaining_obj)) {
    4510           0 :                 return NULL;
    4511             :         }
    4512           0 :         blob.length = blob_length;
    4513             : 
    4514           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4515           0 :                 allow_remaining = true;
    4516             :         }
    4517             : 
    4518           0 :         if (allow_remaining) {
    4519           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
    4520             :         } else {
    4521           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
    4522             :         }
    4523           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4524           0 :                 PyErr_SetNdrError(err);
    4525           0 :                 return NULL;
    4526             :         }
    4527             : 
    4528           0 :         Py_RETURN_NONE;
    4529             : }
    4530             : 
    4531           0 : static PyObject *py_netr_SamInfo3_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4532             : {
    4533           0 :         struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
    4534           0 :         PyObject *ret;
    4535           0 :         char *retstr;
    4536             : 
    4537           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo3, "netr_SamInfo3", object);
    4538           0 :         ret = PyUnicode_FromString(retstr);
    4539           0 :         talloc_free(retstr);
    4540             : 
    4541           0 :         return ret;
    4542             : }
    4543             : 
    4544             : static PyMethodDef py_netr_SamInfo3_methods[] = {
    4545             :         { "__ndr_pack__", (PyCFunction)py_netr_SamInfo3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4546             :         { "__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" },
    4547             :         { "__ndr_print__", (PyCFunction)py_netr_SamInfo3_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4548             :         { NULL, NULL, 0, NULL }
    4549             : };
    4550             : 
    4551             : 
    4552             : static PyTypeObject netr_SamInfo3_Type = {
    4553             :         PyVarObject_HEAD_INIT(NULL, 0)
    4554             :         .tp_name = "netlogon.netr_SamInfo3",
    4555             :         .tp_getset = py_netr_SamInfo3_getsetters,
    4556             :         .tp_methods = py_netr_SamInfo3_methods,
    4557             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4558             :         .tp_new = py_netr_SamInfo3_new,
    4559             : };
    4560             : 
    4561             : 
    4562           2 : static PyObject *py_netr_SamInfo6_get_base(PyObject *obj, void *closure)
    4563             : {
    4564           2 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
    4565           0 :         PyObject *py_base;
    4566           2 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4567           2 :         return py_base;
    4568             : }
    4569             : 
    4570           0 : static int py_netr_SamInfo6_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4571             : {
    4572           0 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
    4573           0 :         if (value == NULL) {
    4574           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->base");
    4575           0 :                 return -1;
    4576             :         }
    4577           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4578           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4579           0 :                 PyErr_NoMemory();
    4580           0 :                 return -1;
    4581             :         }
    4582           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4583           0 :         return 0;
    4584             : }
    4585             : 
    4586           2 : static PyObject *py_netr_SamInfo6_get_sidcount(PyObject *obj, void *closure)
    4587             : {
    4588           2 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
    4589           0 :         PyObject *py_sidcount;
    4590           2 :         py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)(object->sidcount));
    4591           2 :         return py_sidcount;
    4592             : }
    4593             : 
    4594           0 : static int py_netr_SamInfo6_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
    4595             : {
    4596           0 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
    4597           0 :         if (value == NULL) {
    4598           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sidcount");
    4599           0 :                 return -1;
    4600             :         }
    4601             :         {
    4602           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
    4603           0 :                 if (PyLong_Check(value)) {
    4604           0 :                         unsigned long long test_var;
    4605           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4606           0 :                         if (PyErr_Occurred() != NULL) {
    4607           0 :                                 return -1;
    4608             :                         }
    4609           0 :                         if (test_var > uint_max) {
    4610           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4611             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4612           0 :                                 return -1;
    4613             :                         }
    4614           0 :                         object->sidcount = test_var;
    4615             :                 } else {
    4616           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4617             :                           PyLong_Type.tp_name);
    4618           0 :                         return -1;
    4619             :                 }
    4620             :         }
    4621           0 :         return 0;
    4622             : }
    4623             : 
    4624           2 : static PyObject *py_netr_SamInfo6_get_sids(PyObject *obj, void *closure)
    4625             : {
    4626           2 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
    4627           0 :         PyObject *py_sids;
    4628           2 :         if (object->sids == NULL) {
    4629           0 :                 Py_RETURN_NONE;
    4630             :         }
    4631           2 :         if (object->sids == NULL) {
    4632           0 :                 py_sids = Py_None;
    4633           0 :                 Py_INCREF(py_sids);
    4634             :         } else {
    4635           2 :                 py_sids = PyList_New(object->sidcount);
    4636           2 :                 if (py_sids == NULL) {
    4637           0 :                         return NULL;
    4638             :                 }
    4639             :                 {
    4640             :                         int sids_cntr_1;
    4641           4 :                         for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
    4642           0 :                                 PyObject *py_sids_1;
    4643           2 :                                 py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &(object->sids)[sids_cntr_1]);
    4644           2 :                                 PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
    4645             :                         }
    4646             :                 }
    4647             :         }
    4648           2 :         return py_sids;
    4649             : }
    4650             : 
    4651           0 : static int py_netr_SamInfo6_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4652             : {
    4653           0 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
    4654           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
    4655           0 :         if (value == NULL) {
    4656           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sids");
    4657           0 :                 return -1;
    4658             :         }
    4659           0 :         if (value == Py_None) {
    4660           0 :                 object->sids = NULL;
    4661             :         } else {
    4662           0 :                 object->sids = NULL;
    4663           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4664             :                 {
    4665           0 :                         int sids_cntr_1;
    4666           0 :                         object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    4667           0 :                         if (!object->sids) { return -1; }
    4668           0 :                         talloc_set_name_const(object->sids, "ARRAY: object->sids");
    4669           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
    4670           0 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
    4671           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sids)[sids_cntr_1]");
    4672           0 :                                         return -1;
    4673             :                                 }
    4674           0 :                                 PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
    4675           0 :                                 if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
    4676           0 :                                         PyErr_NoMemory();
    4677           0 :                                         return -1;
    4678             :                                 }
    4679           0 :                                 (object->sids)[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
    4680             :                         }
    4681             :                 }
    4682             :         }
    4683           0 :         return 0;
    4684             : }
    4685             : 
    4686           0 : static PyObject *py_netr_SamInfo6_get_dns_domainname(PyObject *obj, void *closure)
    4687             : {
    4688           0 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
    4689           0 :         PyObject *py_dns_domainname;
    4690           0 :         py_dns_domainname = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dns_domainname);
    4691           0 :         return py_dns_domainname;
    4692             : }
    4693             : 
    4694           0 : static int py_netr_SamInfo6_set_dns_domainname(PyObject *py_obj, PyObject *value, void *closure)
    4695             : {
    4696           0 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
    4697           0 :         if (value == NULL) {
    4698           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_domainname");
    4699           0 :                 return -1;
    4700             :         }
    4701           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4702           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4703           0 :                 PyErr_NoMemory();
    4704           0 :                 return -1;
    4705             :         }
    4706           0 :         object->dns_domainname = *(struct lsa_String *)pytalloc_get_ptr(value);
    4707           0 :         return 0;
    4708             : }
    4709             : 
    4710           0 : static PyObject *py_netr_SamInfo6_get_principal_name(PyObject *obj, void *closure)
    4711             : {
    4712           0 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
    4713           0 :         PyObject *py_principal_name;
    4714           0 :         py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
    4715           0 :         return py_principal_name;
    4716             : }
    4717             : 
    4718           0 : static int py_netr_SamInfo6_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
    4719             : {
    4720           0 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
    4721           0 :         if (value == NULL) {
    4722           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->principal_name");
    4723           0 :                 return -1;
    4724             :         }
    4725           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4726           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4727           0 :                 PyErr_NoMemory();
    4728           0 :                 return -1;
    4729             :         }
    4730           0 :         object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    4731           0 :         return 0;
    4732             : }
    4733             : 
    4734           0 : static PyObject *py_netr_SamInfo6_get_unknown4(PyObject *obj, void *closure)
    4735             : {
    4736           0 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
    4737           0 :         PyObject *py_unknown4;
    4738           0 :         py_unknown4 = PyList_New(20);
    4739           0 :         if (py_unknown4 == NULL) {
    4740           0 :                 return NULL;
    4741             :         }
    4742             :         {
    4743             :                 int unknown4_cntr_0;
    4744           0 :                 for (unknown4_cntr_0 = 0; unknown4_cntr_0 < (20); unknown4_cntr_0++) {
    4745           0 :                         PyObject *py_unknown4_0;
    4746           0 :                         py_unknown4_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->unknown4)[unknown4_cntr_0]));
    4747           0 :                         PyList_SetItem(py_unknown4, unknown4_cntr_0, py_unknown4_0);
    4748             :                 }
    4749             :         }
    4750           0 :         return py_unknown4;
    4751             : }
    4752             : 
    4753           0 : static int py_netr_SamInfo6_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    4754             : {
    4755           0 :         struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
    4756           0 :         if (value == NULL) {
    4757           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
    4758           0 :                 return -1;
    4759             :         }
    4760           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4761             :         {
    4762           0 :                 int unknown4_cntr_0;
    4763           0 :                 if (ARRAY_SIZE(object->unknown4) != PyList_GET_SIZE(value)) {
    4764           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));
    4765           0 :                         return -1;
    4766             :                 }
    4767           0 :                 for (unknown4_cntr_0 = 0; unknown4_cntr_0 < PyList_GET_SIZE(value); unknown4_cntr_0++) {
    4768           0 :                         if (PyList_GET_ITEM(value, unknown4_cntr_0) == NULL) {
    4769           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->unknown4)[unknown4_cntr_0]");
    4770           0 :                                 return -1;
    4771             :                         }
    4772             :                         {
    4773           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->unknown4)[unknown4_cntr_0]));
    4774           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, unknown4_cntr_0))) {
    4775           0 :                                         unsigned long long test_var;
    4776           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, unknown4_cntr_0));
    4777           0 :                                         if (PyErr_Occurred() != NULL) {
    4778           0 :                                                 return -1;
    4779             :                                         }
    4780           0 :                                         if (test_var > uint_max) {
    4781           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4782             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    4783           0 :                                                 return -1;
    4784             :                                         }
    4785           0 :                                         (object->unknown4)[unknown4_cntr_0] = test_var;
    4786             :                                 } else {
    4787           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4788             :                                           PyLong_Type.tp_name);
    4789           0 :                                         return -1;
    4790             :                                 }
    4791             :                         }
    4792             :                 }
    4793             :         }
    4794           0 :         return 0;
    4795             : }
    4796             : 
    4797             : static PyGetSetDef py_netr_SamInfo6_getsetters[] = {
    4798             :         {
    4799             :                 .name = discard_const_p(char, "base"),
    4800             :                 .get = py_netr_SamInfo6_get_base,
    4801             :                 .set = py_netr_SamInfo6_set_base,
    4802             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4803             :         },
    4804             :         {
    4805             :                 .name = discard_const_p(char, "sidcount"),
    4806             :                 .get = py_netr_SamInfo6_get_sidcount,
    4807             :                 .set = py_netr_SamInfo6_set_sidcount,
    4808             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4809             :         },
    4810             :         {
    4811             :                 .name = discard_const_p(char, "sids"),
    4812             :                 .get = py_netr_SamInfo6_get_sids,
    4813             :                 .set = py_netr_SamInfo6_set_sids,
    4814             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
    4815             :         },
    4816             :         {
    4817             :                 .name = discard_const_p(char, "dns_domainname"),
    4818             :                 .get = py_netr_SamInfo6_get_dns_domainname,
    4819             :                 .set = py_netr_SamInfo6_set_dns_domainname,
    4820             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    4821             :         },
    4822             :         {
    4823             :                 .name = discard_const_p(char, "principal_name"),
    4824             :                 .get = py_netr_SamInfo6_get_principal_name,
    4825             :                 .set = py_netr_SamInfo6_set_principal_name,
    4826             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    4827             :         },
    4828             :         {
    4829             :                 .name = discard_const_p(char, "unknown4"),
    4830             :                 .get = py_netr_SamInfo6_get_unknown4,
    4831             :                 .set = py_netr_SamInfo6_set_unknown4,
    4832             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4833             :         },
    4834             :         { .name = NULL }
    4835             : };
    4836             : 
    4837           0 : static PyObject *py_netr_SamInfo6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4838             : {
    4839           0 :         return pytalloc_new(struct netr_SamInfo6, type);
    4840             : }
    4841             : 
    4842             : 
    4843             : static PyTypeObject netr_SamInfo6_Type = {
    4844             :         PyVarObject_HEAD_INIT(NULL, 0)
    4845             :         .tp_name = "netlogon.netr_SamInfo6",
    4846             :         .tp_getset = py_netr_SamInfo6_getsetters,
    4847             :         .tp_methods = NULL,
    4848             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4849             :         .tp_new = py_netr_SamInfo6_new,
    4850             : };
    4851             : 
    4852             : 
    4853           0 : static PyObject *py_netr_PacInfo_get_pac_size(PyObject *obj, void *closure)
    4854             : {
    4855           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    4856           0 :         PyObject *py_pac_size;
    4857           0 :         py_pac_size = PyLong_FromUnsignedLongLong((uint32_t)(object->pac_size));
    4858           0 :         return py_pac_size;
    4859             : }
    4860             : 
    4861           0 : static int py_netr_PacInfo_set_pac_size(PyObject *py_obj, PyObject *value, void *closure)
    4862             : {
    4863           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    4864           0 :         if (value == NULL) {
    4865           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pac_size");
    4866           0 :                 return -1;
    4867             :         }
    4868             :         {
    4869           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pac_size));
    4870           0 :                 if (PyLong_Check(value)) {
    4871           0 :                         unsigned long long test_var;
    4872           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4873           0 :                         if (PyErr_Occurred() != NULL) {
    4874           0 :                                 return -1;
    4875             :                         }
    4876           0 :                         if (test_var > uint_max) {
    4877           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4878             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4879           0 :                                 return -1;
    4880             :                         }
    4881           0 :                         object->pac_size = test_var;
    4882             :                 } else {
    4883           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4884             :                           PyLong_Type.tp_name);
    4885           0 :                         return -1;
    4886             :                 }
    4887             :         }
    4888           0 :         return 0;
    4889             : }
    4890             : 
    4891           0 : static PyObject *py_netr_PacInfo_get_pac(PyObject *obj, void *closure)
    4892             : {
    4893           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    4894           0 :         PyObject *py_pac;
    4895           0 :         if (object->pac == NULL) {
    4896           0 :                 Py_RETURN_NONE;
    4897             :         }
    4898           0 :         if (object->pac == NULL) {
    4899           0 :                 py_pac = Py_None;
    4900           0 :                 Py_INCREF(py_pac);
    4901             :         } else {
    4902           0 :                 py_pac = PyList_New(object->pac_size);
    4903           0 :                 if (py_pac == NULL) {
    4904           0 :                         return NULL;
    4905             :                 }
    4906             :                 {
    4907             :                         int pac_cntr_1;
    4908           0 :                         for (pac_cntr_1 = 0; pac_cntr_1 < (object->pac_size); pac_cntr_1++) {
    4909           0 :                                 PyObject *py_pac_1;
    4910           0 :                                 py_pac_1 = PyLong_FromLong((uint16_t)((object->pac)[pac_cntr_1]));
    4911           0 :                                 PyList_SetItem(py_pac, pac_cntr_1, py_pac_1);
    4912             :                         }
    4913             :                 }
    4914             :         }
    4915           0 :         return py_pac;
    4916             : }
    4917             : 
    4918           0 : static int py_netr_PacInfo_set_pac(PyObject *py_obj, PyObject *value, void *closure)
    4919             : {
    4920           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    4921           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pac));
    4922           0 :         if (value == NULL) {
    4923           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pac");
    4924           0 :                 return -1;
    4925             :         }
    4926           0 :         if (value == Py_None) {
    4927           0 :                 object->pac = NULL;
    4928             :         } else {
    4929           0 :                 object->pac = NULL;
    4930           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4931             :                 {
    4932           0 :                         int pac_cntr_1;
    4933           0 :                         object->pac = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pac, PyList_GET_SIZE(value));
    4934           0 :                         if (!object->pac) { return -1; }
    4935           0 :                         talloc_set_name_const(object->pac, "ARRAY: object->pac");
    4936           0 :                         for (pac_cntr_1 = 0; pac_cntr_1 < PyList_GET_SIZE(value); pac_cntr_1++) {
    4937           0 :                                 if (PyList_GET_ITEM(value, pac_cntr_1) == NULL) {
    4938           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->pac)[pac_cntr_1]");
    4939           0 :                                         return -1;
    4940             :                                 }
    4941             :                                 {
    4942           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->pac)[pac_cntr_1]));
    4943           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, pac_cntr_1))) {
    4944           0 :                                                 unsigned long long test_var;
    4945           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, pac_cntr_1));
    4946           0 :                                                 if (PyErr_Occurred() != NULL) {
    4947           0 :                                                         return -1;
    4948             :                                                 }
    4949           0 :                                                 if (test_var > uint_max) {
    4950           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4951             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    4952           0 :                                                         return -1;
    4953             :                                                 }
    4954           0 :                                                 (object->pac)[pac_cntr_1] = test_var;
    4955             :                                         } else {
    4956           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    4957             :                                                   PyLong_Type.tp_name);
    4958           0 :                                                 return -1;
    4959             :                                         }
    4960             :                                 }
    4961             :                         }
    4962             :                 }
    4963             :         }
    4964           0 :         return 0;
    4965             : }
    4966             : 
    4967           0 : static PyObject *py_netr_PacInfo_get_logon_domain(PyObject *obj, void *closure)
    4968             : {
    4969           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    4970           0 :         PyObject *py_logon_domain;
    4971           0 :         py_logon_domain = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
    4972           0 :         return py_logon_domain;
    4973             : }
    4974             : 
    4975           0 : static int py_netr_PacInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
    4976             : {
    4977           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    4978           0 :         if (value == NULL) {
    4979           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_domain");
    4980           0 :                 return -1;
    4981             :         }
    4982           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4983           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4984           0 :                 PyErr_NoMemory();
    4985           0 :                 return -1;
    4986             :         }
    4987           0 :         object->logon_domain = *(struct lsa_String *)pytalloc_get_ptr(value);
    4988           0 :         return 0;
    4989             : }
    4990             : 
    4991           0 : static PyObject *py_netr_PacInfo_get_logon_server(PyObject *obj, void *closure)
    4992             : {
    4993           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    4994           0 :         PyObject *py_logon_server;
    4995           0 :         py_logon_server = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
    4996           0 :         return py_logon_server;
    4997             : }
    4998             : 
    4999           0 : static int py_netr_PacInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
    5000             : {
    5001           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5002           0 :         if (value == NULL) {
    5003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_server");
    5004           0 :                 return -1;
    5005             :         }
    5006           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5007           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5008           0 :                 PyErr_NoMemory();
    5009           0 :                 return -1;
    5010             :         }
    5011           0 :         object->logon_server = *(struct lsa_String *)pytalloc_get_ptr(value);
    5012           0 :         return 0;
    5013             : }
    5014             : 
    5015           0 : static PyObject *py_netr_PacInfo_get_principal_name(PyObject *obj, void *closure)
    5016             : {
    5017           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    5018           0 :         PyObject *py_principal_name;
    5019           0 :         py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
    5020           0 :         return py_principal_name;
    5021             : }
    5022             : 
    5023           0 : static int py_netr_PacInfo_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
    5024             : {
    5025           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5026           0 :         if (value == NULL) {
    5027           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->principal_name");
    5028           0 :                 return -1;
    5029             :         }
    5030           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5031           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5032           0 :                 PyErr_NoMemory();
    5033           0 :                 return -1;
    5034             :         }
    5035           0 :         object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    5036           0 :         return 0;
    5037             : }
    5038             : 
    5039           0 : static PyObject *py_netr_PacInfo_get_auth_size(PyObject *obj, void *closure)
    5040             : {
    5041           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    5042           0 :         PyObject *py_auth_size;
    5043           0 :         py_auth_size = PyLong_FromUnsignedLongLong((uint32_t)(object->auth_size));
    5044           0 :         return py_auth_size;
    5045             : }
    5046             : 
    5047           0 : static int py_netr_PacInfo_set_auth_size(PyObject *py_obj, PyObject *value, void *closure)
    5048             : {
    5049           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5050           0 :         if (value == NULL) {
    5051           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auth_size");
    5052           0 :                 return -1;
    5053             :         }
    5054             :         {
    5055           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_size));
    5056           0 :                 if (PyLong_Check(value)) {
    5057           0 :                         unsigned long long test_var;
    5058           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5059           0 :                         if (PyErr_Occurred() != NULL) {
    5060           0 :                                 return -1;
    5061             :                         }
    5062           0 :                         if (test_var > uint_max) {
    5063           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5064             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5065           0 :                                 return -1;
    5066             :                         }
    5067           0 :                         object->auth_size = test_var;
    5068             :                 } else {
    5069           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5070             :                           PyLong_Type.tp_name);
    5071           0 :                         return -1;
    5072             :                 }
    5073             :         }
    5074           0 :         return 0;
    5075             : }
    5076             : 
    5077           0 : static PyObject *py_netr_PacInfo_get_auth(PyObject *obj, void *closure)
    5078             : {
    5079           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    5080           0 :         PyObject *py_auth;
    5081           0 :         if (object->auth == NULL) {
    5082           0 :                 Py_RETURN_NONE;
    5083             :         }
    5084           0 :         if (object->auth == NULL) {
    5085           0 :                 py_auth = Py_None;
    5086           0 :                 Py_INCREF(py_auth);
    5087             :         } else {
    5088           0 :                 py_auth = PyList_New(object->auth_size);
    5089           0 :                 if (py_auth == NULL) {
    5090           0 :                         return NULL;
    5091             :                 }
    5092             :                 {
    5093             :                         int auth_cntr_1;
    5094           0 :                         for (auth_cntr_1 = 0; auth_cntr_1 < (object->auth_size); auth_cntr_1++) {
    5095           0 :                                 PyObject *py_auth_1;
    5096           0 :                                 py_auth_1 = PyLong_FromLong((uint16_t)((object->auth)[auth_cntr_1]));
    5097           0 :                                 PyList_SetItem(py_auth, auth_cntr_1, py_auth_1);
    5098             :                         }
    5099             :                 }
    5100             :         }
    5101           0 :         return py_auth;
    5102             : }
    5103             : 
    5104           0 : static int py_netr_PacInfo_set_auth(PyObject *py_obj, PyObject *value, void *closure)
    5105             : {
    5106           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5107           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->auth));
    5108           0 :         if (value == NULL) {
    5109           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auth");
    5110           0 :                 return -1;
    5111             :         }
    5112           0 :         if (value == Py_None) {
    5113           0 :                 object->auth = NULL;
    5114             :         } else {
    5115           0 :                 object->auth = NULL;
    5116           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5117             :                 {
    5118           0 :                         int auth_cntr_1;
    5119           0 :                         object->auth = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->auth, PyList_GET_SIZE(value));
    5120           0 :                         if (!object->auth) { return -1; }
    5121           0 :                         talloc_set_name_const(object->auth, "ARRAY: object->auth");
    5122           0 :                         for (auth_cntr_1 = 0; auth_cntr_1 < PyList_GET_SIZE(value); auth_cntr_1++) {
    5123           0 :                                 if (PyList_GET_ITEM(value, auth_cntr_1) == NULL) {
    5124           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->auth)[auth_cntr_1]");
    5125           0 :                                         return -1;
    5126             :                                 }
    5127             :                                 {
    5128           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->auth)[auth_cntr_1]));
    5129           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, auth_cntr_1))) {
    5130           0 :                                                 unsigned long long test_var;
    5131           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, auth_cntr_1));
    5132           0 :                                                 if (PyErr_Occurred() != NULL) {
    5133           0 :                                                         return -1;
    5134             :                                                 }
    5135           0 :                                                 if (test_var > uint_max) {
    5136           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5137             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    5138           0 :                                                         return -1;
    5139             :                                                 }
    5140           0 :                                                 (object->auth)[auth_cntr_1] = test_var;
    5141             :                                         } else {
    5142           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    5143             :                                                   PyLong_Type.tp_name);
    5144           0 :                                                 return -1;
    5145             :                                         }
    5146             :                                 }
    5147             :                         }
    5148             :                 }
    5149             :         }
    5150           0 :         return 0;
    5151             : }
    5152             : 
    5153           0 : static PyObject *py_netr_PacInfo_get_user_session_key(PyObject *obj, void *closure)
    5154             : {
    5155           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    5156           0 :         PyObject *py_user_session_key;
    5157           0 :         py_user_session_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->user_session_key);
    5158           0 :         return py_user_session_key;
    5159             : }
    5160             : 
    5161           0 : static int py_netr_PacInfo_set_user_session_key(PyObject *py_obj, PyObject *value, void *closure)
    5162             : {
    5163           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5164           0 :         if (value == NULL) {
    5165           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_session_key");
    5166           0 :                 return -1;
    5167             :         }
    5168           0 :         PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
    5169           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5170           0 :                 PyErr_NoMemory();
    5171           0 :                 return -1;
    5172             :         }
    5173           0 :         object->user_session_key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
    5174           0 :         return 0;
    5175             : }
    5176             : 
    5177           0 : static PyObject *py_netr_PacInfo_get_expansionroom(PyObject *obj, void *closure)
    5178             : {
    5179           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    5180           0 :         PyObject *py_expansionroom;
    5181           0 :         py_expansionroom = PyList_New(10);
    5182           0 :         if (py_expansionroom == NULL) {
    5183           0 :                 return NULL;
    5184             :         }
    5185             :         {
    5186             :                 int expansionroom_cntr_0;
    5187           0 :                 for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < (10); expansionroom_cntr_0++) {
    5188           0 :                         PyObject *py_expansionroom_0;
    5189           0 :                         py_expansionroom_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->expansionroom)[expansionroom_cntr_0]));
    5190           0 :                         PyList_SetItem(py_expansionroom, expansionroom_cntr_0, py_expansionroom_0);
    5191             :                 }
    5192             :         }
    5193           0 :         return py_expansionroom;
    5194             : }
    5195             : 
    5196           0 : static int py_netr_PacInfo_set_expansionroom(PyObject *py_obj, PyObject *value, void *closure)
    5197             : {
    5198           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5199           0 :         if (value == NULL) {
    5200           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->expansionroom");
    5201           0 :                 return -1;
    5202             :         }
    5203           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5204             :         {
    5205           0 :                 int expansionroom_cntr_0;
    5206           0 :                 if (ARRAY_SIZE(object->expansionroom) != PyList_GET_SIZE(value)) {
    5207           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));
    5208           0 :                         return -1;
    5209             :                 }
    5210           0 :                 for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < PyList_GET_SIZE(value); expansionroom_cntr_0++) {
    5211           0 :                         if (PyList_GET_ITEM(value, expansionroom_cntr_0) == NULL) {
    5212           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->expansionroom)[expansionroom_cntr_0]");
    5213           0 :                                 return -1;
    5214             :                         }
    5215             :                         {
    5216           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->expansionroom)[expansionroom_cntr_0]));
    5217           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, expansionroom_cntr_0))) {
    5218           0 :                                         unsigned long long test_var;
    5219           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, expansionroom_cntr_0));
    5220           0 :                                         if (PyErr_Occurred() != NULL) {
    5221           0 :                                                 return -1;
    5222             :                                         }
    5223           0 :                                         if (test_var > uint_max) {
    5224           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5225             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5226           0 :                                                 return -1;
    5227             :                                         }
    5228           0 :                                         (object->expansionroom)[expansionroom_cntr_0] = test_var;
    5229             :                                 } else {
    5230           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5231             :                                           PyLong_Type.tp_name);
    5232           0 :                                         return -1;
    5233             :                                 }
    5234             :                         }
    5235             :                 }
    5236             :         }
    5237           0 :         return 0;
    5238             : }
    5239             : 
    5240           0 : static PyObject *py_netr_PacInfo_get_unknown1(PyObject *obj, void *closure)
    5241             : {
    5242           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    5243           0 :         PyObject *py_unknown1;
    5244           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
    5245           0 :         return py_unknown1;
    5246             : }
    5247             : 
    5248           0 : static int py_netr_PacInfo_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    5249             : {
    5250           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5251           0 :         if (value == NULL) {
    5252           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
    5253           0 :                 return -1;
    5254             :         }
    5255           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5256           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5257           0 :                 PyErr_NoMemory();
    5258           0 :                 return -1;
    5259             :         }
    5260           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5261           0 :         return 0;
    5262             : }
    5263             : 
    5264           0 : static PyObject *py_netr_PacInfo_get_unknown2(PyObject *obj, void *closure)
    5265             : {
    5266           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    5267           0 :         PyObject *py_unknown2;
    5268           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    5269           0 :         return py_unknown2;
    5270             : }
    5271             : 
    5272           0 : static int py_netr_PacInfo_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    5273             : {
    5274           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5275           0 :         if (value == NULL) {
    5276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
    5277           0 :                 return -1;
    5278             :         }
    5279           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5280           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5281           0 :                 PyErr_NoMemory();
    5282           0 :                 return -1;
    5283             :         }
    5284           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5285           0 :         return 0;
    5286             : }
    5287             : 
    5288           0 : static PyObject *py_netr_PacInfo_get_unknown3(PyObject *obj, void *closure)
    5289             : {
    5290           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    5291           0 :         PyObject *py_unknown3;
    5292           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    5293           0 :         return py_unknown3;
    5294             : }
    5295             : 
    5296           0 : static int py_netr_PacInfo_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    5297             : {
    5298           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5299           0 :         if (value == NULL) {
    5300           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
    5301           0 :                 return -1;
    5302             :         }
    5303           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5304           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5305           0 :                 PyErr_NoMemory();
    5306           0 :                 return -1;
    5307             :         }
    5308           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5309           0 :         return 0;
    5310             : }
    5311             : 
    5312           0 : static PyObject *py_netr_PacInfo_get_unknown4(PyObject *obj, void *closure)
    5313             : {
    5314           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(obj);
    5315           0 :         PyObject *py_unknown4;
    5316           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    5317           0 :         return py_unknown4;
    5318             : }
    5319             : 
    5320           0 : static int py_netr_PacInfo_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    5321             : {
    5322           0 :         struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
    5323           0 :         if (value == NULL) {
    5324           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
    5325           0 :                 return -1;
    5326             :         }
    5327           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5328           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5329           0 :                 PyErr_NoMemory();
    5330           0 :                 return -1;
    5331             :         }
    5332           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5333           0 :         return 0;
    5334             : }
    5335             : 
    5336             : static PyGetSetDef py_netr_PacInfo_getsetters[] = {
    5337             :         {
    5338             :                 .name = discard_const_p(char, "pac_size"),
    5339             :                 .get = py_netr_PacInfo_get_pac_size,
    5340             :                 .set = py_netr_PacInfo_set_pac_size,
    5341             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5342             :         },
    5343             :         {
    5344             :                 .name = discard_const_p(char, "pac"),
    5345             :                 .get = py_netr_PacInfo_get_pac,
    5346             :                 .set = py_netr_PacInfo_set_pac,
    5347             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5348             :         },
    5349             :         {
    5350             :                 .name = discard_const_p(char, "logon_domain"),
    5351             :                 .get = py_netr_PacInfo_get_logon_domain,
    5352             :                 .set = py_netr_PacInfo_set_logon_domain,
    5353             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5354             :         },
    5355             :         {
    5356             :                 .name = discard_const_p(char, "logon_server"),
    5357             :                 .get = py_netr_PacInfo_get_logon_server,
    5358             :                 .set = py_netr_PacInfo_set_logon_server,
    5359             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5360             :         },
    5361             :         {
    5362             :                 .name = discard_const_p(char, "principal_name"),
    5363             :                 .get = py_netr_PacInfo_get_principal_name,
    5364             :                 .set = py_netr_PacInfo_set_principal_name,
    5365             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5366             :         },
    5367             :         {
    5368             :                 .name = discard_const_p(char, "auth_size"),
    5369             :                 .get = py_netr_PacInfo_get_auth_size,
    5370             :                 .set = py_netr_PacInfo_set_auth_size,
    5371             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5372             :         },
    5373             :         {
    5374             :                 .name = discard_const_p(char, "auth"),
    5375             :                 .get = py_netr_PacInfo_get_auth,
    5376             :                 .set = py_netr_PacInfo_set_auth,
    5377             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5378             :         },
    5379             :         {
    5380             :                 .name = discard_const_p(char, "user_session_key"),
    5381             :                 .get = py_netr_PacInfo_get_user_session_key,
    5382             :                 .set = py_netr_PacInfo_set_user_session_key,
    5383             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
    5384             :         },
    5385             :         {
    5386             :                 .name = discard_const_p(char, "expansionroom"),
    5387             :                 .get = py_netr_PacInfo_get_expansionroom,
    5388             :                 .set = py_netr_PacInfo_set_expansionroom,
    5389             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5390             :         },
    5391             :         {
    5392             :                 .name = discard_const_p(char, "unknown1"),
    5393             :                 .get = py_netr_PacInfo_get_unknown1,
    5394             :                 .set = py_netr_PacInfo_set_unknown1,
    5395             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5396             :         },
    5397             :         {
    5398             :                 .name = discard_const_p(char, "unknown2"),
    5399             :                 .get = py_netr_PacInfo_get_unknown2,
    5400             :                 .set = py_netr_PacInfo_set_unknown2,
    5401             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5402             :         },
    5403             :         {
    5404             :                 .name = discard_const_p(char, "unknown3"),
    5405             :                 .get = py_netr_PacInfo_get_unknown3,
    5406             :                 .set = py_netr_PacInfo_set_unknown3,
    5407             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5408             :         },
    5409             :         {
    5410             :                 .name = discard_const_p(char, "unknown4"),
    5411             :                 .get = py_netr_PacInfo_get_unknown4,
    5412             :                 .set = py_netr_PacInfo_set_unknown4,
    5413             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5414             :         },
    5415             :         { .name = NULL }
    5416             : };
    5417             : 
    5418           0 : static PyObject *py_netr_PacInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5419             : {
    5420           0 :         return pytalloc_new(struct netr_PacInfo, type);
    5421             : }
    5422             : 
    5423             : 
    5424             : static PyTypeObject netr_PacInfo_Type = {
    5425             :         PyVarObject_HEAD_INIT(NULL, 0)
    5426             :         .tp_name = "netlogon.netr_PacInfo",
    5427             :         .tp_getset = py_netr_PacInfo_getsetters,
    5428             :         .tp_methods = NULL,
    5429             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5430             :         .tp_new = py_netr_PacInfo_new,
    5431             : };
    5432             : 
    5433             : 
    5434           0 : static PyObject *py_netr_GenericInfo2_get_length(PyObject *obj, void *closure)
    5435             : {
    5436           0 :         struct netr_GenericInfo2 *object = pytalloc_get_ptr(obj);
    5437           0 :         PyObject *py_length;
    5438           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
    5439           0 :         return py_length;
    5440             : }
    5441             : 
    5442           0 : static int py_netr_GenericInfo2_set_length(PyObject *py_obj, PyObject *value, void *closure)
    5443             : {
    5444           0 :         struct netr_GenericInfo2 *object = pytalloc_get_ptr(py_obj);
    5445           0 :         if (value == NULL) {
    5446           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
    5447           0 :                 return -1;
    5448             :         }
    5449             :         {
    5450           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    5451           0 :                 if (PyLong_Check(value)) {
    5452           0 :                         unsigned long long test_var;
    5453           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5454           0 :                         if (PyErr_Occurred() != NULL) {
    5455           0 :                                 return -1;
    5456             :                         }
    5457           0 :                         if (test_var > uint_max) {
    5458           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5459             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5460           0 :                                 return -1;
    5461             :                         }
    5462           0 :                         object->length = test_var;
    5463             :                 } else {
    5464           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5465             :                           PyLong_Type.tp_name);
    5466           0 :                         return -1;
    5467             :                 }
    5468             :         }
    5469           0 :         return 0;
    5470             : }
    5471             : 
    5472           0 : static PyObject *py_netr_GenericInfo2_get_data(PyObject *obj, void *closure)
    5473             : {
    5474           0 :         struct netr_GenericInfo2 *object = pytalloc_get_ptr(obj);
    5475           0 :         PyObject *py_data;
    5476           0 :         if (object->data == NULL) {
    5477           0 :                 Py_RETURN_NONE;
    5478             :         }
    5479           0 :         if (object->data == NULL) {
    5480           0 :                 py_data = Py_None;
    5481           0 :                 Py_INCREF(py_data);
    5482             :         } else {
    5483           0 :                 py_data = PyList_New(object->length);
    5484           0 :                 if (py_data == NULL) {
    5485           0 :                         return NULL;
    5486             :                 }
    5487             :                 {
    5488             :                         int data_cntr_1;
    5489           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    5490           0 :                                 PyObject *py_data_1;
    5491           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_1]));
    5492           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    5493             :                         }
    5494             :                 }
    5495             :         }
    5496           0 :         return py_data;
    5497             : }
    5498             : 
    5499           0 : static int py_netr_GenericInfo2_set_data(PyObject *py_obj, PyObject *value, void *closure)
    5500             : {
    5501           0 :         struct netr_GenericInfo2 *object = pytalloc_get_ptr(py_obj);
    5502           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    5503           0 :         if (value == NULL) {
    5504           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
    5505           0 :                 return -1;
    5506             :         }
    5507           0 :         if (value == Py_None) {
    5508           0 :                 object->data = NULL;
    5509             :         } else {
    5510           0 :                 object->data = NULL;
    5511           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5512             :                 {
    5513           0 :                         int data_cntr_1;
    5514           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    5515           0 :                         if (!object->data) { return -1; }
    5516           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    5517           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    5518           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    5519           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
    5520           0 :                                         return -1;
    5521             :                                 }
    5522             :                                 {
    5523           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
    5524           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    5525           0 :                                                 unsigned long long test_var;
    5526           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    5527           0 :                                                 if (PyErr_Occurred() != NULL) {
    5528           0 :                                                         return -1;
    5529             :                                                 }
    5530           0 :                                                 if (test_var > uint_max) {
    5531           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5532             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    5533           0 :                                                         return -1;
    5534             :                                                 }
    5535           0 :                                                 (object->data)[data_cntr_1] = test_var;
    5536             :                                         } else {
    5537           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    5538             :                                                   PyLong_Type.tp_name);
    5539           0 :                                                 return -1;
    5540             :                                         }
    5541             :                                 }
    5542             :                         }
    5543             :                 }
    5544             :         }
    5545           0 :         return 0;
    5546             : }
    5547             : 
    5548             : static PyGetSetDef py_netr_GenericInfo2_getsetters[] = {
    5549             :         {
    5550             :                 .name = discard_const_p(char, "length"),
    5551             :                 .get = py_netr_GenericInfo2_get_length,
    5552             :                 .set = py_netr_GenericInfo2_set_length,
    5553             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5554             :         },
    5555             :         {
    5556             :                 .name = discard_const_p(char, "data"),
    5557             :                 .get = py_netr_GenericInfo2_get_data,
    5558             :                 .set = py_netr_GenericInfo2_set_data,
    5559             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5560             :         },
    5561             :         { .name = NULL }
    5562             : };
    5563             : 
    5564           0 : static PyObject *py_netr_GenericInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5565             : {
    5566           0 :         return pytalloc_new(struct netr_GenericInfo2, type);
    5567             : }
    5568             : 
    5569             : 
    5570             : static PyTypeObject netr_GenericInfo2_Type = {
    5571             :         PyVarObject_HEAD_INIT(NULL, 0)
    5572             :         .tp_name = "netlogon.netr_GenericInfo2",
    5573             :         .tp_getset = py_netr_GenericInfo2_getsetters,
    5574             :         .tp_methods = NULL,
    5575             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5576             :         .tp_new = py_netr_GenericInfo2_new,
    5577             : };
    5578             : 
    5579         199 : static PyObject *py_import_netr_Validation(TALLOC_CTX *mem_ctx, int level, union netr_Validation *in)
    5580             : {
    5581           0 :         PyObject *ret;
    5582             : 
    5583         199 :         switch (level) {
    5584           2 :                 case NetlogonValidationSamInfo:
    5585           2 :                         if (in->sam2 == NULL) {
    5586           0 :                                 ret = Py_None;
    5587           0 :                                 Py_INCREF(ret);
    5588             :                         } else {
    5589           2 :                                 ret = pytalloc_reference_ex(&netr_SamInfo2_Type, in->sam2, in->sam2);
    5590             :                         }
    5591           2 :                         return ret;
    5592             : 
    5593         176 :                 case NetlogonValidationSamInfo2:
    5594         176 :                         if (in->sam3 == NULL) {
    5595          92 :                                 ret = Py_None;
    5596          46 :                                 Py_INCREF(ret);
    5597             :                         } else {
    5598          84 :                                 ret = pytalloc_reference_ex(&netr_SamInfo3_Type, in->sam3, in->sam3);
    5599             :                         }
    5600         176 :                         return ret;
    5601             : 
    5602           0 :                 case 4:
    5603           0 :                         if (in->pac == NULL) {
    5604           0 :                                 ret = Py_None;
    5605           0 :                                 Py_INCREF(ret);
    5606             :                         } else {
    5607           0 :                                 ret = pytalloc_reference_ex(&netr_PacInfo_Type, in->pac, in->pac);
    5608             :                         }
    5609           0 :                         return ret;
    5610             : 
    5611           0 :                 case NetlogonValidationGenericInfo2:
    5612           0 :                         if (in->generic == NULL) {
    5613           0 :                                 ret = Py_None;
    5614           0 :                                 Py_INCREF(ret);
    5615             :                         } else {
    5616           0 :                                 ret = pytalloc_reference_ex(&netr_GenericInfo2_Type, in->generic, in->generic);
    5617             :                         }
    5618           0 :                         return ret;
    5619             : 
    5620          21 :                 case NetlogonValidationSamInfo4:
    5621          21 :                         if (in->sam6 == NULL) {
    5622           3 :                                 ret = Py_None;
    5623           3 :                                 Py_INCREF(ret);
    5624             :                         } else {
    5625          18 :                                 ret = pytalloc_reference_ex(&netr_SamInfo6_Type, in->sam6, in->sam6);
    5626             :                         }
    5627          21 :                         return ret;
    5628             : 
    5629           0 :                 default:
    5630           0 :                         ret = Py_None;
    5631           0 :                         Py_INCREF(ret);
    5632           0 :                         return ret;
    5633             : 
    5634             :         }
    5635             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    5636             :         return NULL;
    5637             : }
    5638             : 
    5639           0 : static union netr_Validation *py_export_netr_Validation(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    5640             : {
    5641           0 :         union netr_Validation *ret = talloc_zero(mem_ctx, union netr_Validation);
    5642           0 :         switch (level) {
    5643           0 :                 case NetlogonValidationSamInfo:
    5644           0 :                         if (in == NULL) {
    5645           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sam2");
    5646           0 :                                 talloc_free(ret); return NULL;
    5647             :                         }
    5648           0 :                         if (in == Py_None) {
    5649           0 :                                 ret->sam2 = NULL;
    5650             :                         } else {
    5651           0 :                                 ret->sam2 = NULL;
    5652           0 :                                 PY_CHECK_TYPE(&netr_SamInfo2_Type, in, talloc_free(ret); return NULL;);
    5653           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5654           0 :                                         PyErr_NoMemory();
    5655           0 :                                         talloc_free(ret); return NULL;
    5656             :                                 }
    5657           0 :                                 ret->sam2 = (struct netr_SamInfo2 *)pytalloc_get_ptr(in);
    5658             :                         }
    5659           0 :                         break;
    5660             : 
    5661           0 :                 case NetlogonValidationSamInfo2:
    5662           0 :                         if (in == NULL) {
    5663           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sam3");
    5664           0 :                                 talloc_free(ret); return NULL;
    5665             :                         }
    5666           0 :                         if (in == Py_None) {
    5667           0 :                                 ret->sam3 = NULL;
    5668             :                         } else {
    5669           0 :                                 ret->sam3 = NULL;
    5670           0 :                                 PY_CHECK_TYPE(&netr_SamInfo3_Type, in, talloc_free(ret); return NULL;);
    5671           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5672           0 :                                         PyErr_NoMemory();
    5673           0 :                                         talloc_free(ret); return NULL;
    5674             :                                 }
    5675           0 :                                 ret->sam3 = (struct netr_SamInfo3 *)pytalloc_get_ptr(in);
    5676             :                         }
    5677           0 :                         break;
    5678             : 
    5679           0 :                 case 4:
    5680           0 :                         if (in == NULL) {
    5681           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->pac");
    5682           0 :                                 talloc_free(ret); return NULL;
    5683             :                         }
    5684           0 :                         if (in == Py_None) {
    5685           0 :                                 ret->pac = NULL;
    5686             :                         } else {
    5687           0 :                                 ret->pac = NULL;
    5688           0 :                                 PY_CHECK_TYPE(&netr_PacInfo_Type, in, talloc_free(ret); return NULL;);
    5689           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5690           0 :                                         PyErr_NoMemory();
    5691           0 :                                         talloc_free(ret); return NULL;
    5692             :                                 }
    5693           0 :                                 ret->pac = (struct netr_PacInfo *)pytalloc_get_ptr(in);
    5694             :                         }
    5695           0 :                         break;
    5696             : 
    5697           0 :                 case NetlogonValidationGenericInfo2:
    5698           0 :                         if (in == NULL) {
    5699           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->generic");
    5700           0 :                                 talloc_free(ret); return NULL;
    5701             :                         }
    5702           0 :                         if (in == Py_None) {
    5703           0 :                                 ret->generic = NULL;
    5704             :                         } else {
    5705           0 :                                 ret->generic = NULL;
    5706           0 :                                 PY_CHECK_TYPE(&netr_GenericInfo2_Type, in, talloc_free(ret); return NULL;);
    5707           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5708           0 :                                         PyErr_NoMemory();
    5709           0 :                                         talloc_free(ret); return NULL;
    5710             :                                 }
    5711           0 :                                 ret->generic = (struct netr_GenericInfo2 *)pytalloc_get_ptr(in);
    5712             :                         }
    5713           0 :                         break;
    5714             : 
    5715           0 :                 case NetlogonValidationSamInfo4:
    5716           0 :                         if (in == NULL) {
    5717           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sam6");
    5718           0 :                                 talloc_free(ret); return NULL;
    5719             :                         }
    5720           0 :                         if (in == Py_None) {
    5721           0 :                                 ret->sam6 = NULL;
    5722             :                         } else {
    5723           0 :                                 ret->sam6 = NULL;
    5724           0 :                                 PY_CHECK_TYPE(&netr_SamInfo6_Type, in, talloc_free(ret); return NULL;);
    5725           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5726           0 :                                         PyErr_NoMemory();
    5727           0 :                                         talloc_free(ret); return NULL;
    5728             :                                 }
    5729           0 :                                 ret->sam6 = (struct netr_SamInfo6 *)pytalloc_get_ptr(in);
    5730             :                         }
    5731           0 :                         break;
    5732             : 
    5733           0 :                 default:
    5734           0 :                         break;
    5735             : 
    5736             :         }
    5737             : 
    5738           0 :         return ret;
    5739             : }
    5740             : 
    5741         199 : static PyObject *py_netr_Validation_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5742             : {
    5743         199 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5744         199 :         PyObject *mem_ctx_obj = NULL;
    5745         199 :         TALLOC_CTX *mem_ctx = NULL;
    5746         199 :         int level = 0;
    5747         199 :         PyObject *in_obj = NULL;
    5748         199 :         union netr_Validation *in = NULL;
    5749             : 
    5750         199 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    5751             :                 discard_const_p(char *, kwnames),
    5752             :                 &mem_ctx_obj,
    5753             :                 &level,
    5754             :                 &in_obj)) {
    5755           0 :                 return NULL;
    5756             :         }
    5757         199 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5758         199 :         if (mem_ctx == NULL) {
    5759           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5760           0 :                 return NULL;
    5761             :         }
    5762         199 :         in = (union netr_Validation *)pytalloc_get_ptr(in_obj);
    5763         199 :         if (in == NULL) {
    5764           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_Validation!");
    5765           0 :                 return NULL;
    5766             :         }
    5767             : 
    5768         199 :         return py_import_netr_Validation(mem_ctx, level, in);
    5769             : }
    5770             : 
    5771           0 : static PyObject *py_netr_Validation_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5772             : {
    5773           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5774           0 :         PyObject *mem_ctx_obj = NULL;
    5775           0 :         TALLOC_CTX *mem_ctx = NULL;
    5776           0 :         int level = 0;
    5777           0 :         PyObject *in = NULL;
    5778           0 :         union netr_Validation *out = NULL;
    5779             : 
    5780           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    5781             :                 discard_const_p(char *, kwnames),
    5782             :                 &mem_ctx_obj,
    5783             :                 &level,
    5784             :                 &in)) {
    5785           0 :                 return NULL;
    5786             :         }
    5787           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5788           0 :         if (mem_ctx == NULL) {
    5789           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5790           0 :                 return NULL;
    5791             :         }
    5792             : 
    5793           0 :         out = py_export_netr_Validation(mem_ctx, level, in);
    5794           0 :         if (out == NULL) {
    5795           0 :                 return NULL;
    5796             :         }
    5797             : 
    5798           0 :         return pytalloc_GenericObject_reference(out);
    5799             : }
    5800             : 
    5801             : static PyMethodDef py_netr_Validation_methods[] = {
    5802             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_import),
    5803             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5804             :                 "T.__import__(mem_ctx, level, in) => ret." },
    5805             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_export),
    5806             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5807             :                 "T.__export__(mem_ctx, level, in) => ret." },
    5808             :         { NULL, NULL, 0, NULL }
    5809             : };
    5810             : 
    5811           0 : static PyObject *py_netr_Validation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5812             : {
    5813           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    5814           0 :         return NULL;
    5815             : }
    5816             : 
    5817             : 
    5818             : static PyTypeObject netr_Validation_Type = {
    5819             :         PyVarObject_HEAD_INIT(NULL, 0)
    5820             :         .tp_name = "netlogon.netr_Validation",
    5821             :         .tp_getset = NULL,
    5822             :         .tp_methods = py_netr_Validation_methods,
    5823             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5824             :         .tp_new = py_netr_Validation_new,
    5825             : };
    5826             : 
    5827             : 
    5828           0 : static PyObject *py_netr_Credential_get_data(PyObject *obj, void *closure)
    5829             : {
    5830           0 :         struct netr_Credential *object = pytalloc_get_ptr(obj);
    5831           0 :         PyObject *py_data;
    5832           0 :         py_data = PyList_New(8);
    5833           0 :         if (py_data == NULL) {
    5834           0 :                 return NULL;
    5835             :         }
    5836             :         {
    5837             :                 int data_cntr_0;
    5838           0 :                 for (data_cntr_0 = 0; data_cntr_0 < (8); data_cntr_0++) {
    5839           0 :                         PyObject *py_data_0;
    5840           0 :                         py_data_0 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_0]));
    5841           0 :                         PyList_SetItem(py_data, data_cntr_0, py_data_0);
    5842             :                 }
    5843             :         }
    5844           0 :         return py_data;
    5845             : }
    5846             : 
    5847          39 : static int py_netr_Credential_set_data(PyObject *py_obj, PyObject *value, void *closure)
    5848             : {
    5849          39 :         struct netr_Credential *object = pytalloc_get_ptr(py_obj);
    5850          39 :         if (value == NULL) {
    5851           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
    5852           0 :                 return -1;
    5853             :         }
    5854          39 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5855             :         {
    5856           0 :                 int data_cntr_0;
    5857          39 :                 if (ARRAY_SIZE(object->data) != PyList_GET_SIZE(value)) {
    5858           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));
    5859           0 :                         return -1;
    5860             :                 }
    5861         351 :                 for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
    5862         312 :                         if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
    5863           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_0]");
    5864           0 :                                 return -1;
    5865             :                         }
    5866             :                         {
    5867         312 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_0]));
    5868         312 :                                 if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
    5869           0 :                                         unsigned long long test_var;
    5870         312 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
    5871         312 :                                         if (PyErr_Occurred() != NULL) {
    5872           0 :                                                 return -1;
    5873             :                                         }
    5874         312 :                                         if (test_var > uint_max) {
    5875           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5876             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5877           0 :                                                 return -1;
    5878             :                                         }
    5879         312 :                                         (object->data)[data_cntr_0] = test_var;
    5880             :                                 } else {
    5881           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5882             :                                           PyLong_Type.tp_name);
    5883           0 :                                         return -1;
    5884             :                                 }
    5885             :                         }
    5886             :                 }
    5887             :         }
    5888          39 :         return 0;
    5889             : }
    5890             : 
    5891             : static PyGetSetDef py_netr_Credential_getsetters[] = {
    5892             :         {
    5893             :                 .name = discard_const_p(char, "data"),
    5894             :                 .get = py_netr_Credential_get_data,
    5895             :                 .set = py_netr_Credential_set_data,
    5896             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5897             :         },
    5898             :         { .name = NULL }
    5899             : };
    5900             : 
    5901           4 : static PyObject *py_netr_Credential_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5902             : {
    5903           4 :         return pytalloc_new(struct netr_Credential, type);
    5904             : }
    5905             : 
    5906           0 : static PyObject *py_netr_Credential_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5907             : {
    5908           0 :         struct netr_Credential *object = pytalloc_get_ptr(py_obj);
    5909           0 :         PyObject *ret = NULL;
    5910           0 :         DATA_BLOB blob;
    5911           0 :         enum ndr_err_code err;
    5912           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5913           0 :         if (tmp_ctx == NULL) {
    5914           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5915           0 :                 return NULL;
    5916             :         }
    5917           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Credential);
    5918           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5919           0 :                 TALLOC_FREE(tmp_ctx);
    5920           0 :                 PyErr_SetNdrError(err);
    5921           0 :                 return NULL;
    5922             :         }
    5923             : 
    5924           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5925           0 :         TALLOC_FREE(tmp_ctx);
    5926           0 :         return ret;
    5927             : }
    5928             : 
    5929           0 : static PyObject *py_netr_Credential_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5930             : {
    5931           0 :         struct netr_Credential *object = pytalloc_get_ptr(py_obj);
    5932           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5933           0 :         Py_ssize_t blob_length = 0;
    5934           0 :         enum ndr_err_code err;
    5935           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5936           0 :         PyObject *allow_remaining_obj = NULL;
    5937           0 :         bool allow_remaining = false;
    5938             : 
    5939           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5940             :                 discard_const_p(char *, kwnames),
    5941             :                 &blob.data, &blob_length,
    5942             :                 &allow_remaining_obj)) {
    5943           0 :                 return NULL;
    5944             :         }
    5945           0 :         blob.length = blob_length;
    5946             : 
    5947           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5948           0 :                 allow_remaining = true;
    5949             :         }
    5950             : 
    5951           0 :         if (allow_remaining) {
    5952           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Credential);
    5953             :         } else {
    5954           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Credential);
    5955             :         }
    5956           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5957           0 :                 PyErr_SetNdrError(err);
    5958           0 :                 return NULL;
    5959             :         }
    5960             : 
    5961           0 :         Py_RETURN_NONE;
    5962             : }
    5963             : 
    5964           0 : static PyObject *py_netr_Credential_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5965             : {
    5966           0 :         struct netr_Credential *object = pytalloc_get_ptr(py_obj);
    5967           0 :         PyObject *ret;
    5968           0 :         char *retstr;
    5969             : 
    5970           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Credential, "netr_Credential", object);
    5971           0 :         ret = PyUnicode_FromString(retstr);
    5972           0 :         talloc_free(retstr);
    5973             : 
    5974           0 :         return ret;
    5975             : }
    5976             : 
    5977             : static PyMethodDef py_netr_Credential_methods[] = {
    5978             :         { "__ndr_pack__", (PyCFunction)py_netr_Credential_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5979             :         { "__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" },
    5980             :         { "__ndr_print__", (PyCFunction)py_netr_Credential_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5981             :         { NULL, NULL, 0, NULL }
    5982             : };
    5983             : 
    5984             : 
    5985             : static PyTypeObject netr_Credential_Type = {
    5986             :         PyVarObject_HEAD_INIT(NULL, 0)
    5987             :         .tp_name = "netlogon.netr_Credential",
    5988             :         .tp_getset = py_netr_Credential_getsetters,
    5989             :         .tp_methods = py_netr_Credential_methods,
    5990             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5991             :         .tp_new = py_netr_Credential_new,
    5992             : };
    5993             : 
    5994             : 
    5995           0 : static PyObject *py_netlogon_server_pipe_state_get_client_challenge(PyObject *obj, void *closure)
    5996             : {
    5997           0 :         struct netlogon_server_pipe_state *object = pytalloc_get_ptr(obj);
    5998           0 :         PyObject *py_client_challenge;
    5999           0 :         py_client_challenge = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->client_challenge);
    6000           0 :         return py_client_challenge;
    6001             : }
    6002             : 
    6003           0 : static int py_netlogon_server_pipe_state_set_client_challenge(PyObject *py_obj, PyObject *value, void *closure)
    6004             : {
    6005           0 :         struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
    6006           0 :         if (value == NULL) {
    6007           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client_challenge");
    6008           0 :                 return -1;
    6009             :         }
    6010           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
    6011           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6012           0 :                 PyErr_NoMemory();
    6013           0 :                 return -1;
    6014             :         }
    6015           0 :         object->client_challenge = *(struct netr_Credential *)pytalloc_get_ptr(value);
    6016           0 :         return 0;
    6017             : }
    6018             : 
    6019           0 : static PyObject *py_netlogon_server_pipe_state_get_server_challenge(PyObject *obj, void *closure)
    6020             : {
    6021           0 :         struct netlogon_server_pipe_state *object = pytalloc_get_ptr(obj);
    6022           0 :         PyObject *py_server_challenge;
    6023           0 :         py_server_challenge = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->server_challenge);
    6024           0 :         return py_server_challenge;
    6025             : }
    6026             : 
    6027           0 : static int py_netlogon_server_pipe_state_set_server_challenge(PyObject *py_obj, PyObject *value, void *closure)
    6028             : {
    6029           0 :         struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
    6030           0 :         if (value == NULL) {
    6031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->server_challenge");
    6032           0 :                 return -1;
    6033             :         }
    6034           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
    6035           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6036           0 :                 PyErr_NoMemory();
    6037           0 :                 return -1;
    6038             :         }
    6039           0 :         object->server_challenge = *(struct netr_Credential *)pytalloc_get_ptr(value);
    6040           0 :         return 0;
    6041             : }
    6042             : 
    6043             : static PyGetSetDef py_netlogon_server_pipe_state_getsetters[] = {
    6044             :         {
    6045             :                 .name = discard_const_p(char, "client_challenge"),
    6046             :                 .get = py_netlogon_server_pipe_state_get_client_challenge,
    6047             :                 .set = py_netlogon_server_pipe_state_set_client_challenge,
    6048             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
    6049             :         },
    6050             :         {
    6051             :                 .name = discard_const_p(char, "server_challenge"),
    6052             :                 .get = py_netlogon_server_pipe_state_get_server_challenge,
    6053             :                 .set = py_netlogon_server_pipe_state_set_server_challenge,
    6054             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
    6055             :         },
    6056             :         { .name = NULL }
    6057             : };
    6058             : 
    6059           0 : static PyObject *py_netlogon_server_pipe_state_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6060             : {
    6061           0 :         return pytalloc_new(struct netlogon_server_pipe_state, type);
    6062             : }
    6063             : 
    6064           0 : static PyObject *py_netlogon_server_pipe_state_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6065             : {
    6066           0 :         struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
    6067           0 :         PyObject *ret = NULL;
    6068           0 :         DATA_BLOB blob;
    6069           0 :         enum ndr_err_code err;
    6070           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6071           0 :         if (tmp_ctx == NULL) {
    6072           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6073           0 :                 return NULL;
    6074             :         }
    6075           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netlogon_server_pipe_state);
    6076           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6077           0 :                 TALLOC_FREE(tmp_ctx);
    6078           0 :                 PyErr_SetNdrError(err);
    6079           0 :                 return NULL;
    6080             :         }
    6081             : 
    6082           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6083           0 :         TALLOC_FREE(tmp_ctx);
    6084           0 :         return ret;
    6085             : }
    6086             : 
    6087           0 : static PyObject *py_netlogon_server_pipe_state_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6088             : {
    6089           0 :         struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
    6090           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6091           0 :         Py_ssize_t blob_length = 0;
    6092           0 :         enum ndr_err_code err;
    6093           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6094           0 :         PyObject *allow_remaining_obj = NULL;
    6095           0 :         bool allow_remaining = false;
    6096             : 
    6097           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6098             :                 discard_const_p(char *, kwnames),
    6099             :                 &blob.data, &blob_length,
    6100             :                 &allow_remaining_obj)) {
    6101           0 :                 return NULL;
    6102             :         }
    6103           0 :         blob.length = blob_length;
    6104             : 
    6105           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6106           0 :                 allow_remaining = true;
    6107             :         }
    6108             : 
    6109           0 :         if (allow_remaining) {
    6110           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netlogon_server_pipe_state);
    6111             :         } else {
    6112           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netlogon_server_pipe_state);
    6113             :         }
    6114           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6115           0 :                 PyErr_SetNdrError(err);
    6116           0 :                 return NULL;
    6117             :         }
    6118             : 
    6119           0 :         Py_RETURN_NONE;
    6120             : }
    6121             : 
    6122           0 : static PyObject *py_netlogon_server_pipe_state_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6123             : {
    6124           0 :         struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
    6125           0 :         PyObject *ret;
    6126           0 :         char *retstr;
    6127             : 
    6128           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netlogon_server_pipe_state, "netlogon_server_pipe_state", object);
    6129           0 :         ret = PyUnicode_FromString(retstr);
    6130           0 :         talloc_free(retstr);
    6131             : 
    6132           0 :         return ret;
    6133             : }
    6134             : 
    6135             : static PyMethodDef py_netlogon_server_pipe_state_methods[] = {
    6136             :         { "__ndr_pack__", (PyCFunction)py_netlogon_server_pipe_state_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6137             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netlogon_server_pipe_state_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6138             :         { "__ndr_print__", (PyCFunction)py_netlogon_server_pipe_state_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6139             :         { NULL, NULL, 0, NULL }
    6140             : };
    6141             : 
    6142             : 
    6143             : static PyTypeObject netlogon_server_pipe_state_Type = {
    6144             :         PyVarObject_HEAD_INIT(NULL, 0)
    6145             :         .tp_name = "netlogon.server_pipe_state",
    6146             :         .tp_getset = py_netlogon_server_pipe_state_getsetters,
    6147             :         .tp_methods = py_netlogon_server_pipe_state_methods,
    6148             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6149             :         .tp_new = py_netlogon_server_pipe_state_new,
    6150             : };
    6151             : 
    6152             : 
    6153          39 : static PyObject *py_netr_Authenticator_get_cred(PyObject *obj, void *closure)
    6154             : {
    6155          39 :         struct netr_Authenticator *object = pytalloc_get_ptr(obj);
    6156           0 :         PyObject *py_cred;
    6157          39 :         py_cred = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->cred);
    6158          39 :         return py_cred;
    6159             : }
    6160             : 
    6161           0 : static int py_netr_Authenticator_set_cred(PyObject *py_obj, PyObject *value, void *closure)
    6162             : {
    6163           0 :         struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
    6164           0 :         if (value == NULL) {
    6165           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->cred");
    6166           0 :                 return -1;
    6167             :         }
    6168           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
    6169           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6170           0 :                 PyErr_NoMemory();
    6171           0 :                 return -1;
    6172             :         }
    6173           0 :         object->cred = *(struct netr_Credential *)pytalloc_get_ptr(value);
    6174           0 :         return 0;
    6175             : }
    6176             : 
    6177           0 : static PyObject *py_netr_Authenticator_get_timestamp(PyObject *obj, void *closure)
    6178             : {
    6179           0 :         struct netr_Authenticator *object = pytalloc_get_ptr(obj);
    6180           0 :         PyObject *py_timestamp;
    6181           0 :         py_timestamp = PyLong_FromLong(object->timestamp);
    6182           0 :         return py_timestamp;
    6183             : }
    6184             : 
    6185          39 : static int py_netr_Authenticator_set_timestamp(PyObject *py_obj, PyObject *value, void *closure)
    6186             : {
    6187          39 :         struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
    6188          39 :         if (value == NULL) {
    6189           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timestamp");
    6190           0 :                 return -1;
    6191             :         }
    6192             :         {
    6193          39 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->timestamp));
    6194          39 :                 const long long int_min = -int_max - 1;
    6195          39 :                 if (PyLong_Check(value)) {
    6196           0 :                         long long test_var;
    6197          39 :                         test_var = PyLong_AsLongLong(value);
    6198          39 :                         if (PyErr_Occurred() != NULL) {
    6199           0 :                                 return -1;
    6200             :                         }
    6201          39 :                         if (test_var < int_min || test_var > int_max) {
    6202           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    6203             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    6204           0 :                                 return -1;
    6205             :                         }
    6206          39 :                         object->timestamp = test_var;
    6207             :                 } else {
    6208           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6209             :                           PyLong_Type.tp_name);
    6210           0 :                         return -1;
    6211             :                 }
    6212             :         }
    6213          39 :         return 0;
    6214             : }
    6215             : 
    6216             : static PyGetSetDef py_netr_Authenticator_getsetters[] = {
    6217             :         {
    6218             :                 .name = discard_const_p(char, "cred"),
    6219             :                 .get = py_netr_Authenticator_get_cred,
    6220             :                 .set = py_netr_Authenticator_set_cred,
    6221             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
    6222             :         },
    6223             :         {
    6224             :                 .name = discard_const_p(char, "timestamp"),
    6225             :                 .get = py_netr_Authenticator_get_timestamp,
    6226             :                 .set = py_netr_Authenticator_set_timestamp,
    6227             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
    6228             :         },
    6229             :         { .name = NULL }
    6230             : };
    6231             : 
    6232          78 : static PyObject *py_netr_Authenticator_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6233             : {
    6234          78 :         return pytalloc_new(struct netr_Authenticator, type);
    6235             : }
    6236             : 
    6237           0 : static PyObject *py_netr_Authenticator_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6238             : {
    6239           0 :         struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
    6240           0 :         PyObject *ret = NULL;
    6241           0 :         DATA_BLOB blob;
    6242           0 :         enum ndr_err_code err;
    6243           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6244           0 :         if (tmp_ctx == NULL) {
    6245           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6246           0 :                 return NULL;
    6247             :         }
    6248           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Authenticator);
    6249           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6250           0 :                 TALLOC_FREE(tmp_ctx);
    6251           0 :                 PyErr_SetNdrError(err);
    6252           0 :                 return NULL;
    6253             :         }
    6254             : 
    6255           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6256           0 :         TALLOC_FREE(tmp_ctx);
    6257           0 :         return ret;
    6258             : }
    6259             : 
    6260           0 : static PyObject *py_netr_Authenticator_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6261             : {
    6262           0 :         struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
    6263           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6264           0 :         Py_ssize_t blob_length = 0;
    6265           0 :         enum ndr_err_code err;
    6266           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6267           0 :         PyObject *allow_remaining_obj = NULL;
    6268           0 :         bool allow_remaining = false;
    6269             : 
    6270           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6271             :                 discard_const_p(char *, kwnames),
    6272             :                 &blob.data, &blob_length,
    6273             :                 &allow_remaining_obj)) {
    6274           0 :                 return NULL;
    6275             :         }
    6276           0 :         blob.length = blob_length;
    6277             : 
    6278           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6279           0 :                 allow_remaining = true;
    6280             :         }
    6281             : 
    6282           0 :         if (allow_remaining) {
    6283           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Authenticator);
    6284             :         } else {
    6285           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Authenticator);
    6286             :         }
    6287           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6288           0 :                 PyErr_SetNdrError(err);
    6289           0 :                 return NULL;
    6290             :         }
    6291             : 
    6292           0 :         Py_RETURN_NONE;
    6293             : }
    6294             : 
    6295           0 : static PyObject *py_netr_Authenticator_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6296             : {
    6297           0 :         struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
    6298           0 :         PyObject *ret;
    6299           0 :         char *retstr;
    6300             : 
    6301           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Authenticator, "netr_Authenticator", object);
    6302           0 :         ret = PyUnicode_FromString(retstr);
    6303           0 :         talloc_free(retstr);
    6304             : 
    6305           0 :         return ret;
    6306             : }
    6307             : 
    6308             : static PyMethodDef py_netr_Authenticator_methods[] = {
    6309             :         { "__ndr_pack__", (PyCFunction)py_netr_Authenticator_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6310             :         { "__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" },
    6311             :         { "__ndr_print__", (PyCFunction)py_netr_Authenticator_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6312             :         { NULL, NULL, 0, NULL }
    6313             : };
    6314             : 
    6315             : 
    6316             : static PyTypeObject netr_Authenticator_Type = {
    6317             :         PyVarObject_HEAD_INIT(NULL, 0)
    6318             :         .tp_name = "netlogon.netr_Authenticator",
    6319             :         .tp_getset = py_netr_Authenticator_getsetters,
    6320             :         .tp_methods = py_netr_Authenticator_methods,
    6321             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6322             :         .tp_new = py_netr_Authenticator_new,
    6323             : };
    6324             : 
    6325             : 
    6326           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_account_name(PyObject *obj, void *closure)
    6327             : {
    6328           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
    6329           0 :         PyObject *py_account_name;
    6330           0 :         if (object->account_name == NULL) {
    6331           0 :                 Py_RETURN_NONE;
    6332             :         }
    6333           0 :         if (object->account_name == NULL) {
    6334           0 :                 py_account_name = Py_None;
    6335           0 :                 Py_INCREF(py_account_name);
    6336             :         } else {
    6337           0 :                 if (object->account_name == NULL) {
    6338           0 :                         py_account_name = Py_None;
    6339           0 :                         Py_INCREF(py_account_name);
    6340             :                 } else {
    6341           0 :                         py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
    6342             :                 }
    6343             :         }
    6344           0 :         return py_account_name;
    6345             : }
    6346             : 
    6347           0 : static int py_netr_DELTA_DELETE_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    6348             : {
    6349           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
    6350           0 :         if (value == NULL) {
    6351           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
    6352           0 :                 return -1;
    6353             :         }
    6354           0 :         if (value == Py_None) {
    6355           0 :                 object->account_name = NULL;
    6356             :         } else {
    6357           0 :                 object->account_name = NULL;
    6358             :                 {
    6359           0 :                         const char *test_str;
    6360           0 :                         const char *talloc_str;
    6361           0 :                         PyObject *unicode = NULL;
    6362           0 :                         if (PyUnicode_Check(value)) {
    6363           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6364           0 :                                 if (unicode == NULL) {
    6365           0 :                                         return -1;
    6366             :                                 }
    6367           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6368           0 :                         } else if (PyBytes_Check(value)) {
    6369           0 :                                 test_str = PyBytes_AS_STRING(value);
    6370             :                         } else {
    6371           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6372           0 :                                 return -1;
    6373             :                         }
    6374           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6375           0 :                         if (unicode != NULL) {
    6376           0 :                                 Py_DECREF(unicode);
    6377             :                         }
    6378           0 :                         if (talloc_str == NULL) {
    6379           0 :                                 PyErr_NoMemory();
    6380           0 :                                 return -1;
    6381             :                         }
    6382           0 :                         object->account_name = talloc_str;
    6383             :                 }
    6384             :         }
    6385           0 :         return 0;
    6386             : }
    6387             : 
    6388           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown1(PyObject *obj, void *closure)
    6389             : {
    6390           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
    6391           0 :         PyObject *py_unknown1;
    6392           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
    6393           0 :         return py_unknown1;
    6394             : }
    6395             : 
    6396           0 : static int py_netr_DELTA_DELETE_USER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    6397             : {
    6398           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
    6399           0 :         if (value == NULL) {
    6400           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
    6401           0 :                 return -1;
    6402             :         }
    6403           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6404           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6405           0 :                 PyErr_NoMemory();
    6406           0 :                 return -1;
    6407             :         }
    6408           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6409           0 :         return 0;
    6410             : }
    6411             : 
    6412           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown2(PyObject *obj, void *closure)
    6413             : {
    6414           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
    6415           0 :         PyObject *py_unknown2;
    6416           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    6417           0 :         return py_unknown2;
    6418             : }
    6419             : 
    6420           0 : static int py_netr_DELTA_DELETE_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    6421             : {
    6422           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
    6423           0 :         if (value == NULL) {
    6424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
    6425           0 :                 return -1;
    6426             :         }
    6427           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6428           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6429           0 :                 PyErr_NoMemory();
    6430           0 :                 return -1;
    6431             :         }
    6432           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6433           0 :         return 0;
    6434             : }
    6435             : 
    6436           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown3(PyObject *obj, void *closure)
    6437             : {
    6438           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
    6439           0 :         PyObject *py_unknown3;
    6440           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    6441           0 :         return py_unknown3;
    6442             : }
    6443             : 
    6444           0 : static int py_netr_DELTA_DELETE_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    6445             : {
    6446           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
    6447           0 :         if (value == NULL) {
    6448           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
    6449           0 :                 return -1;
    6450             :         }
    6451           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6452           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6453           0 :                 PyErr_NoMemory();
    6454           0 :                 return -1;
    6455             :         }
    6456           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6457           0 :         return 0;
    6458             : }
    6459             : 
    6460           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown4(PyObject *obj, void *closure)
    6461             : {
    6462           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
    6463           0 :         PyObject *py_unknown4;
    6464           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    6465           0 :         return py_unknown4;
    6466             : }
    6467             : 
    6468           0 : static int py_netr_DELTA_DELETE_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    6469             : {
    6470           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
    6471           0 :         if (value == NULL) {
    6472           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
    6473           0 :                 return -1;
    6474             :         }
    6475           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6476           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6477           0 :                 PyErr_NoMemory();
    6478           0 :                 return -1;
    6479             :         }
    6480           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6481           0 :         return 0;
    6482             : }
    6483             : 
    6484           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown5(PyObject *obj, void *closure)
    6485             : {
    6486           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
    6487           0 :         PyObject *py_unknown5;
    6488           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
    6489           0 :         return py_unknown5;
    6490             : }
    6491             : 
    6492           0 : static int py_netr_DELTA_DELETE_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
    6493             : {
    6494           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
    6495           0 :         if (value == NULL) {
    6496           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
    6497           0 :                 return -1;
    6498             :         }
    6499             :         {
    6500           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
    6501           0 :                 if (PyLong_Check(value)) {
    6502           0 :                         unsigned long long test_var;
    6503           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6504           0 :                         if (PyErr_Occurred() != NULL) {
    6505           0 :                                 return -1;
    6506             :                         }
    6507           0 :                         if (test_var > uint_max) {
    6508           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6509             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6510           0 :                                 return -1;
    6511             :                         }
    6512           0 :                         object->unknown5 = test_var;
    6513             :                 } else {
    6514           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6515             :                           PyLong_Type.tp_name);
    6516           0 :                         return -1;
    6517             :                 }
    6518             :         }
    6519           0 :         return 0;
    6520             : }
    6521             : 
    6522           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown6(PyObject *obj, void *closure)
    6523             : {
    6524           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
    6525           0 :         PyObject *py_unknown6;
    6526           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
    6527           0 :         return py_unknown6;
    6528             : }
    6529             : 
    6530           0 : static int py_netr_DELTA_DELETE_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    6531             : {
    6532           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
    6533           0 :         if (value == NULL) {
    6534           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
    6535           0 :                 return -1;
    6536             :         }
    6537             :         {
    6538           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    6539           0 :                 if (PyLong_Check(value)) {
    6540           0 :                         unsigned long long test_var;
    6541           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6542           0 :                         if (PyErr_Occurred() != NULL) {
    6543           0 :                                 return -1;
    6544             :                         }
    6545           0 :                         if (test_var > uint_max) {
    6546           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6547             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6548           0 :                                 return -1;
    6549             :                         }
    6550           0 :                         object->unknown6 = test_var;
    6551             :                 } else {
    6552           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6553             :                           PyLong_Type.tp_name);
    6554           0 :                         return -1;
    6555             :                 }
    6556             :         }
    6557           0 :         return 0;
    6558             : }
    6559             : 
    6560           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown7(PyObject *obj, void *closure)
    6561             : {
    6562           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
    6563           0 :         PyObject *py_unknown7;
    6564           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
    6565           0 :         return py_unknown7;
    6566             : }
    6567             : 
    6568           0 : static int py_netr_DELTA_DELETE_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    6569             : {
    6570           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
    6571           0 :         if (value == NULL) {
    6572           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
    6573           0 :                 return -1;
    6574             :         }
    6575             :         {
    6576           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    6577           0 :                 if (PyLong_Check(value)) {
    6578           0 :                         unsigned long long test_var;
    6579           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6580           0 :                         if (PyErr_Occurred() != NULL) {
    6581           0 :                                 return -1;
    6582             :                         }
    6583           0 :                         if (test_var > uint_max) {
    6584           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6585             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6586           0 :                                 return -1;
    6587             :                         }
    6588           0 :                         object->unknown7 = test_var;
    6589             :                 } else {
    6590           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6591             :                           PyLong_Type.tp_name);
    6592           0 :                         return -1;
    6593             :                 }
    6594             :         }
    6595           0 :         return 0;
    6596             : }
    6597             : 
    6598           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown8(PyObject *obj, void *closure)
    6599             : {
    6600           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
    6601           0 :         PyObject *py_unknown8;
    6602           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
    6603           0 :         return py_unknown8;
    6604             : }
    6605             : 
    6606           0 : static int py_netr_DELTA_DELETE_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    6607             : {
    6608           0 :         struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
    6609           0 :         if (value == NULL) {
    6610           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
    6611           0 :                 return -1;
    6612             :         }
    6613             :         {
    6614           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    6615           0 :                 if (PyLong_Check(value)) {
    6616           0 :                         unsigned long long test_var;
    6617           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6618           0 :                         if (PyErr_Occurred() != NULL) {
    6619           0 :                                 return -1;
    6620             :                         }
    6621           0 :                         if (test_var > uint_max) {
    6622           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6623             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6624           0 :                                 return -1;
    6625             :                         }
    6626           0 :                         object->unknown8 = test_var;
    6627             :                 } else {
    6628           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6629             :                           PyLong_Type.tp_name);
    6630           0 :                         return -1;
    6631             :                 }
    6632             :         }
    6633           0 :         return 0;
    6634             : }
    6635             : 
    6636             : static PyGetSetDef py_netr_DELTA_DELETE_USER_getsetters[] = {
    6637             :         {
    6638             :                 .name = discard_const_p(char, "account_name"),
    6639             :                 .get = py_netr_DELTA_DELETE_USER_get_account_name,
    6640             :                 .set = py_netr_DELTA_DELETE_USER_set_account_name,
    6641             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6642             :         },
    6643             :         {
    6644             :                 .name = discard_const_p(char, "unknown1"),
    6645             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown1,
    6646             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown1,
    6647             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6648             :         },
    6649             :         {
    6650             :                 .name = discard_const_p(char, "unknown2"),
    6651             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown2,
    6652             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown2,
    6653             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6654             :         },
    6655             :         {
    6656             :                 .name = discard_const_p(char, "unknown3"),
    6657             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown3,
    6658             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown3,
    6659             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6660             :         },
    6661             :         {
    6662             :                 .name = discard_const_p(char, "unknown4"),
    6663             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown4,
    6664             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown4,
    6665             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6666             :         },
    6667             :         {
    6668             :                 .name = discard_const_p(char, "unknown5"),
    6669             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown5,
    6670             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown5,
    6671             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6672             :         },
    6673             :         {
    6674             :                 .name = discard_const_p(char, "unknown6"),
    6675             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown6,
    6676             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown6,
    6677             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6678             :         },
    6679             :         {
    6680             :                 .name = discard_const_p(char, "unknown7"),
    6681             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown7,
    6682             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown7,
    6683             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6684             :         },
    6685             :         {
    6686             :                 .name = discard_const_p(char, "unknown8"),
    6687             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown8,
    6688             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown8,
    6689             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6690             :         },
    6691             :         { .name = NULL }
    6692             : };
    6693             : 
    6694           0 : static PyObject *py_netr_DELTA_DELETE_USER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6695             : {
    6696           0 :         return pytalloc_new(struct netr_DELTA_DELETE_USER, type);
    6697             : }
    6698             : 
    6699             : 
    6700             : static PyTypeObject netr_DELTA_DELETE_USER_Type = {
    6701             :         PyVarObject_HEAD_INIT(NULL, 0)
    6702             :         .tp_name = "netlogon.netr_DELTA_DELETE_USER",
    6703             :         .tp_getset = py_netr_DELTA_DELETE_USER_getsetters,
    6704             :         .tp_methods = NULL,
    6705             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6706             :         .tp_new = py_netr_DELTA_DELETE_USER_new,
    6707             : };
    6708             : 
    6709             : 
    6710           0 : static PyObject *py_netr_USER_KEY16_get_length(PyObject *obj, void *closure)
    6711             : {
    6712           0 :         struct netr_USER_KEY16 *object = pytalloc_get_ptr(obj);
    6713           0 :         PyObject *py_length;
    6714           0 :         py_length = PyLong_FromLong((uint16_t)(object->length));
    6715           0 :         return py_length;
    6716             : }
    6717             : 
    6718           0 : static int py_netr_USER_KEY16_set_length(PyObject *py_obj, PyObject *value, void *closure)
    6719             : {
    6720           0 :         struct netr_USER_KEY16 *object = pytalloc_get_ptr(py_obj);
    6721           0 :         if (value == NULL) {
    6722           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
    6723           0 :                 return -1;
    6724             :         }
    6725             :         {
    6726           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    6727           0 :                 if (PyLong_Check(value)) {
    6728           0 :                         unsigned long long test_var;
    6729           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6730           0 :                         if (PyErr_Occurred() != NULL) {
    6731           0 :                                 return -1;
    6732             :                         }
    6733           0 :                         if (test_var > uint_max) {
    6734           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6735             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6736           0 :                                 return -1;
    6737             :                         }
    6738           0 :                         object->length = test_var;
    6739             :                 } else {
    6740           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6741             :                           PyLong_Type.tp_name);
    6742           0 :                         return -1;
    6743             :                 }
    6744             :         }
    6745           0 :         return 0;
    6746             : }
    6747             : 
    6748           0 : static PyObject *py_netr_USER_KEY16_get_size(PyObject *obj, void *closure)
    6749             : {
    6750           0 :         struct netr_USER_KEY16 *object = pytalloc_get_ptr(obj);
    6751           0 :         PyObject *py_size;
    6752           0 :         py_size = PyLong_FromLong((uint16_t)(object->size));
    6753           0 :         return py_size;
    6754             : }
    6755             : 
    6756           0 : static int py_netr_USER_KEY16_set_size(PyObject *py_obj, PyObject *value, void *closure)
    6757             : {
    6758           0 :         struct netr_USER_KEY16 *object = pytalloc_get_ptr(py_obj);
    6759           0 :         if (value == NULL) {
    6760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
    6761           0 :                 return -1;
    6762             :         }
    6763             :         {
    6764           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    6765           0 :                 if (PyLong_Check(value)) {
    6766           0 :                         unsigned long long test_var;
    6767           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6768           0 :                         if (PyErr_Occurred() != NULL) {
    6769           0 :                                 return -1;
    6770             :                         }
    6771           0 :                         if (test_var > uint_max) {
    6772           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6773             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6774           0 :                                 return -1;
    6775             :                         }
    6776           0 :                         object->size = test_var;
    6777             :                 } else {
    6778           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6779             :                           PyLong_Type.tp_name);
    6780           0 :                         return -1;
    6781             :                 }
    6782             :         }
    6783           0 :         return 0;
    6784             : }
    6785             : 
    6786           0 : static PyObject *py_netr_USER_KEY16_get_flags(PyObject *obj, void *closure)
    6787             : {
    6788           0 :         struct netr_USER_KEY16 *object = pytalloc_get_ptr(obj);
    6789           0 :         PyObject *py_flags;
    6790           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
    6791           0 :         return py_flags;
    6792             : }
    6793             : 
    6794           0 : static int py_netr_USER_KEY16_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    6795             : {
    6796           0 :         struct netr_USER_KEY16 *object = pytalloc_get_ptr(py_obj);
    6797           0 :         if (value == NULL) {
    6798           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
    6799           0 :                 return -1;
    6800             :         }
    6801             :         {
    6802           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    6803           0 :                 if (PyLong_Check(value)) {
    6804           0 :                         unsigned long long test_var;
    6805           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6806           0 :                         if (PyErr_Occurred() != NULL) {
    6807           0 :                                 return -1;
    6808             :                         }
    6809           0 :                         if (test_var > uint_max) {
    6810           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6811             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6812           0 :                                 return -1;
    6813             :                         }
    6814           0 :                         object->flags = test_var;
    6815             :                 } else {
    6816           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6817             :                           PyLong_Type.tp_name);
    6818           0 :                         return -1;
    6819             :                 }
    6820             :         }
    6821           0 :         return 0;
    6822             : }
    6823             : 
    6824           0 : static PyObject *py_netr_USER_KEY16_get_pwd(PyObject *obj, void *closure)
    6825             : {
    6826           0 :         struct netr_USER_KEY16 *object = pytalloc_get_ptr(obj);
    6827           0 :         PyObject *py_pwd;
    6828           0 :         py_pwd = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->pwd);
    6829           0 :         return py_pwd;
    6830             : }
    6831             : 
    6832           0 : static int py_netr_USER_KEY16_set_pwd(PyObject *py_obj, PyObject *value, void *closure)
    6833             : {
    6834           0 :         struct netr_USER_KEY16 *object = pytalloc_get_ptr(py_obj);
    6835           0 :         if (value == NULL) {
    6836           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pwd");
    6837           0 :                 return -1;
    6838             :         }
    6839           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    6840           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6841           0 :                 PyErr_NoMemory();
    6842           0 :                 return -1;
    6843             :         }
    6844           0 :         object->pwd = *(struct samr_Password *)pytalloc_get_ptr(value);
    6845           0 :         return 0;
    6846             : }
    6847             : 
    6848             : static PyGetSetDef py_netr_USER_KEY16_getsetters[] = {
    6849             :         {
    6850             :                 .name = discard_const_p(char, "length"),
    6851             :                 .get = py_netr_USER_KEY16_get_length,
    6852             :                 .set = py_netr_USER_KEY16_set_length,
    6853             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6854             :         },
    6855             :         {
    6856             :                 .name = discard_const_p(char, "size"),
    6857             :                 .get = py_netr_USER_KEY16_get_size,
    6858             :                 .set = py_netr_USER_KEY16_set_size,
    6859             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6860             :         },
    6861             :         {
    6862             :                 .name = discard_const_p(char, "flags"),
    6863             :                 .get = py_netr_USER_KEY16_get_flags,
    6864             :                 .set = py_netr_USER_KEY16_set_flags,
    6865             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6866             :         },
    6867             :         {
    6868             :                 .name = discard_const_p(char, "pwd"),
    6869             :                 .get = py_netr_USER_KEY16_get_pwd,
    6870             :                 .set = py_netr_USER_KEY16_set_pwd,
    6871             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    6872             :         },
    6873             :         { .name = NULL }
    6874             : };
    6875             : 
    6876           0 : static PyObject *py_netr_USER_KEY16_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6877             : {
    6878           0 :         return pytalloc_new(struct netr_USER_KEY16, type);
    6879             : }
    6880             : 
    6881             : 
    6882             : static PyTypeObject netr_USER_KEY16_Type = {
    6883             :         PyVarObject_HEAD_INIT(NULL, 0)
    6884             :         .tp_name = "netlogon.netr_USER_KEY16",
    6885             :         .tp_getset = py_netr_USER_KEY16_getsetters,
    6886             :         .tp_methods = NULL,
    6887             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6888             :         .tp_new = py_netr_USER_KEY16_new,
    6889             : };
    6890             : 
    6891             : 
    6892           0 : static PyObject *py_netr_PasswordHistory_get_nt_length(PyObject *obj, void *closure)
    6893             : {
    6894           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
    6895           0 :         PyObject *py_nt_length;
    6896           0 :         py_nt_length = PyLong_FromLong((uint16_t)(object->nt_length));
    6897           0 :         return py_nt_length;
    6898             : }
    6899             : 
    6900           0 : static int py_netr_PasswordHistory_set_nt_length(PyObject *py_obj, PyObject *value, void *closure)
    6901             : {
    6902           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
    6903           0 :         if (value == NULL) {
    6904           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_length");
    6905           0 :                 return -1;
    6906             :         }
    6907             :         {
    6908           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_length));
    6909           0 :                 if (PyLong_Check(value)) {
    6910           0 :                         unsigned long long test_var;
    6911           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6912           0 :                         if (PyErr_Occurred() != NULL) {
    6913           0 :                                 return -1;
    6914             :                         }
    6915           0 :                         if (test_var > uint_max) {
    6916           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6917             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6918           0 :                                 return -1;
    6919             :                         }
    6920           0 :                         object->nt_length = test_var;
    6921             :                 } else {
    6922           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6923             :                           PyLong_Type.tp_name);
    6924           0 :                         return -1;
    6925             :                 }
    6926             :         }
    6927           0 :         return 0;
    6928             : }
    6929             : 
    6930           0 : static PyObject *py_netr_PasswordHistory_get_nt_size(PyObject *obj, void *closure)
    6931             : {
    6932           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
    6933           0 :         PyObject *py_nt_size;
    6934           0 :         py_nt_size = PyLong_FromLong((uint16_t)(object->nt_size));
    6935           0 :         return py_nt_size;
    6936             : }
    6937             : 
    6938           0 : static int py_netr_PasswordHistory_set_nt_size(PyObject *py_obj, PyObject *value, void *closure)
    6939             : {
    6940           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
    6941           0 :         if (value == NULL) {
    6942           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_size");
    6943           0 :                 return -1;
    6944             :         }
    6945             :         {
    6946           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_size));
    6947           0 :                 if (PyLong_Check(value)) {
    6948           0 :                         unsigned long long test_var;
    6949           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6950           0 :                         if (PyErr_Occurred() != NULL) {
    6951           0 :                                 return -1;
    6952             :                         }
    6953           0 :                         if (test_var > uint_max) {
    6954           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6955             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6956           0 :                                 return -1;
    6957             :                         }
    6958           0 :                         object->nt_size = test_var;
    6959             :                 } else {
    6960           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6961             :                           PyLong_Type.tp_name);
    6962           0 :                         return -1;
    6963             :                 }
    6964             :         }
    6965           0 :         return 0;
    6966             : }
    6967             : 
    6968           0 : static PyObject *py_netr_PasswordHistory_get_nt_flags(PyObject *obj, void *closure)
    6969             : {
    6970           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
    6971           0 :         PyObject *py_nt_flags;
    6972           0 :         py_nt_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->nt_flags));
    6973           0 :         return py_nt_flags;
    6974             : }
    6975             : 
    6976           0 : static int py_netr_PasswordHistory_set_nt_flags(PyObject *py_obj, PyObject *value, void *closure)
    6977             : {
    6978           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
    6979           0 :         if (value == NULL) {
    6980           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_flags");
    6981           0 :                 return -1;
    6982             :         }
    6983             :         {
    6984           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_flags));
    6985           0 :                 if (PyLong_Check(value)) {
    6986           0 :                         unsigned long long test_var;
    6987           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6988           0 :                         if (PyErr_Occurred() != NULL) {
    6989           0 :                                 return -1;
    6990             :                         }
    6991           0 :                         if (test_var > uint_max) {
    6992           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6993             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6994           0 :                                 return -1;
    6995             :                         }
    6996           0 :                         object->nt_flags = test_var;
    6997             :                 } else {
    6998           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6999             :                           PyLong_Type.tp_name);
    7000           0 :                         return -1;
    7001             :                 }
    7002             :         }
    7003           0 :         return 0;
    7004             : }
    7005             : 
    7006           0 : static PyObject *py_netr_PasswordHistory_get_lm_length(PyObject *obj, void *closure)
    7007             : {
    7008           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
    7009           0 :         PyObject *py_lm_length;
    7010           0 :         py_lm_length = PyLong_FromLong((uint16_t)(object->lm_length));
    7011           0 :         return py_lm_length;
    7012             : }
    7013             : 
    7014           0 : static int py_netr_PasswordHistory_set_lm_length(PyObject *py_obj, PyObject *value, void *closure)
    7015             : {
    7016           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
    7017           0 :         if (value == NULL) {
    7018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_length");
    7019           0 :                 return -1;
    7020             :         }
    7021             :         {
    7022           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_length));
    7023           0 :                 if (PyLong_Check(value)) {
    7024           0 :                         unsigned long long test_var;
    7025           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7026           0 :                         if (PyErr_Occurred() != NULL) {
    7027           0 :                                 return -1;
    7028             :                         }
    7029           0 :                         if (test_var > uint_max) {
    7030           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7031             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7032           0 :                                 return -1;
    7033             :                         }
    7034           0 :                         object->lm_length = test_var;
    7035             :                 } else {
    7036           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7037             :                           PyLong_Type.tp_name);
    7038           0 :                         return -1;
    7039             :                 }
    7040             :         }
    7041           0 :         return 0;
    7042             : }
    7043             : 
    7044           0 : static PyObject *py_netr_PasswordHistory_get_lm_size(PyObject *obj, void *closure)
    7045             : {
    7046           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
    7047           0 :         PyObject *py_lm_size;
    7048           0 :         py_lm_size = PyLong_FromLong((uint16_t)(object->lm_size));
    7049           0 :         return py_lm_size;
    7050             : }
    7051             : 
    7052           0 : static int py_netr_PasswordHistory_set_lm_size(PyObject *py_obj, PyObject *value, void *closure)
    7053             : {
    7054           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
    7055           0 :         if (value == NULL) {
    7056           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_size");
    7057           0 :                 return -1;
    7058             :         }
    7059             :         {
    7060           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_size));
    7061           0 :                 if (PyLong_Check(value)) {
    7062           0 :                         unsigned long long test_var;
    7063           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7064           0 :                         if (PyErr_Occurred() != NULL) {
    7065           0 :                                 return -1;
    7066             :                         }
    7067           0 :                         if (test_var > uint_max) {
    7068           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7069             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7070           0 :                                 return -1;
    7071             :                         }
    7072           0 :                         object->lm_size = test_var;
    7073             :                 } else {
    7074           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7075             :                           PyLong_Type.tp_name);
    7076           0 :                         return -1;
    7077             :                 }
    7078             :         }
    7079           0 :         return 0;
    7080             : }
    7081             : 
    7082           0 : static PyObject *py_netr_PasswordHistory_get_lm_flags(PyObject *obj, void *closure)
    7083             : {
    7084           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
    7085           0 :         PyObject *py_lm_flags;
    7086           0 :         py_lm_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->lm_flags));
    7087           0 :         return py_lm_flags;
    7088             : }
    7089             : 
    7090           0 : static int py_netr_PasswordHistory_set_lm_flags(PyObject *py_obj, PyObject *value, void *closure)
    7091             : {
    7092           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
    7093           0 :         if (value == NULL) {
    7094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_flags");
    7095           0 :                 return -1;
    7096             :         }
    7097             :         {
    7098           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_flags));
    7099           0 :                 if (PyLong_Check(value)) {
    7100           0 :                         unsigned long long test_var;
    7101           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7102           0 :                         if (PyErr_Occurred() != NULL) {
    7103           0 :                                 return -1;
    7104             :                         }
    7105           0 :                         if (test_var > uint_max) {
    7106           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7107             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7108           0 :                                 return -1;
    7109             :                         }
    7110           0 :                         object->lm_flags = test_var;
    7111             :                 } else {
    7112           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7113             :                           PyLong_Type.tp_name);
    7114           0 :                         return -1;
    7115             :                 }
    7116             :         }
    7117           0 :         return 0;
    7118             : }
    7119             : 
    7120           0 : static PyObject *py_netr_PasswordHistory_get_nt_history(PyObject *obj, void *closure)
    7121             : {
    7122           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
    7123           0 :         PyObject *py_nt_history;
    7124           0 :         py_nt_history = PyList_New(object->nt_length);
    7125           0 :         if (py_nt_history == NULL) {
    7126           0 :                 return NULL;
    7127             :         }
    7128             :         {
    7129             :                 int nt_history_cntr_0;
    7130           0 :                 for (nt_history_cntr_0 = 0; nt_history_cntr_0 < (object->nt_length); nt_history_cntr_0++) {
    7131           0 :                         PyObject *py_nt_history_0;
    7132           0 :                         py_nt_history_0 = PyLong_FromLong((uint16_t)((object->nt_history)[nt_history_cntr_0]));
    7133           0 :                         PyList_SetItem(py_nt_history, nt_history_cntr_0, py_nt_history_0);
    7134             :                 }
    7135             :         }
    7136           0 :         return py_nt_history;
    7137             : }
    7138             : 
    7139           0 : static int py_netr_PasswordHistory_set_nt_history(PyObject *py_obj, PyObject *value, void *closure)
    7140             : {
    7141           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
    7142           0 :         if (value == NULL) {
    7143           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_history");
    7144           0 :                 return -1;
    7145             :         }
    7146           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7147             :         {
    7148           0 :                 int nt_history_cntr_0;
    7149           0 :                 object->nt_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->nt_history, PyList_GET_SIZE(value));
    7150           0 :                 if (!object->nt_history) { return -1; }
    7151           0 :                 talloc_set_name_const(object->nt_history, "ARRAY: object->nt_history");
    7152           0 :                 for (nt_history_cntr_0 = 0; nt_history_cntr_0 < PyList_GET_SIZE(value); nt_history_cntr_0++) {
    7153           0 :                         if (PyList_GET_ITEM(value, nt_history_cntr_0) == NULL) {
    7154           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->nt_history)[nt_history_cntr_0]");
    7155           0 :                                 return -1;
    7156             :                         }
    7157             :                         {
    7158           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->nt_history)[nt_history_cntr_0]));
    7159           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, nt_history_cntr_0))) {
    7160           0 :                                         unsigned long long test_var;
    7161           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, nt_history_cntr_0));
    7162           0 :                                         if (PyErr_Occurred() != NULL) {
    7163           0 :                                                 return -1;
    7164             :                                         }
    7165           0 :                                         if (test_var > uint_max) {
    7166           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7167             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    7168           0 :                                                 return -1;
    7169             :                                         }
    7170           0 :                                         (object->nt_history)[nt_history_cntr_0] = test_var;
    7171             :                                 } else {
    7172           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7173             :                                           PyLong_Type.tp_name);
    7174           0 :                                         return -1;
    7175             :                                 }
    7176             :                         }
    7177             :                 }
    7178             :         }
    7179           0 :         return 0;
    7180             : }
    7181             : 
    7182           0 : static PyObject *py_netr_PasswordHistory_get_lm_history(PyObject *obj, void *closure)
    7183             : {
    7184           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
    7185           0 :         PyObject *py_lm_history;
    7186           0 :         py_lm_history = PyList_New(object->lm_length);
    7187           0 :         if (py_lm_history == NULL) {
    7188           0 :                 return NULL;
    7189             :         }
    7190             :         {
    7191             :                 int lm_history_cntr_0;
    7192           0 :                 for (lm_history_cntr_0 = 0; lm_history_cntr_0 < (object->lm_length); lm_history_cntr_0++) {
    7193           0 :                         PyObject *py_lm_history_0;
    7194           0 :                         py_lm_history_0 = PyLong_FromLong((uint16_t)((object->lm_history)[lm_history_cntr_0]));
    7195           0 :                         PyList_SetItem(py_lm_history, lm_history_cntr_0, py_lm_history_0);
    7196             :                 }
    7197             :         }
    7198           0 :         return py_lm_history;
    7199             : }
    7200             : 
    7201           0 : static int py_netr_PasswordHistory_set_lm_history(PyObject *py_obj, PyObject *value, void *closure)
    7202             : {
    7203           0 :         struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
    7204           0 :         if (value == NULL) {
    7205           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_history");
    7206           0 :                 return -1;
    7207             :         }
    7208           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7209             :         {
    7210           0 :                 int lm_history_cntr_0;
    7211           0 :                 object->lm_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->lm_history, PyList_GET_SIZE(value));
    7212           0 :                 if (!object->lm_history) { return -1; }
    7213           0 :                 talloc_set_name_const(object->lm_history, "ARRAY: object->lm_history");
    7214           0 :                 for (lm_history_cntr_0 = 0; lm_history_cntr_0 < PyList_GET_SIZE(value); lm_history_cntr_0++) {
    7215           0 :                         if (PyList_GET_ITEM(value, lm_history_cntr_0) == NULL) {
    7216           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->lm_history)[lm_history_cntr_0]");
    7217           0 :                                 return -1;
    7218             :                         }
    7219             :                         {
    7220           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->lm_history)[lm_history_cntr_0]));
    7221           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, lm_history_cntr_0))) {
    7222           0 :                                         unsigned long long test_var;
    7223           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, lm_history_cntr_0));
    7224           0 :                                         if (PyErr_Occurred() != NULL) {
    7225           0 :                                                 return -1;
    7226             :                                         }
    7227           0 :                                         if (test_var > uint_max) {
    7228           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7229             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    7230           0 :                                                 return -1;
    7231             :                                         }
    7232           0 :                                         (object->lm_history)[lm_history_cntr_0] = test_var;
    7233             :                                 } else {
    7234           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7235             :                                           PyLong_Type.tp_name);
    7236           0 :                                         return -1;
    7237             :                                 }
    7238             :                         }
    7239             :                 }
    7240             :         }
    7241           0 :         return 0;
    7242             : }
    7243             : 
    7244             : static PyGetSetDef py_netr_PasswordHistory_getsetters[] = {
    7245             :         {
    7246             :                 .name = discard_const_p(char, "nt_length"),
    7247             :                 .get = py_netr_PasswordHistory_get_nt_length,
    7248             :                 .set = py_netr_PasswordHistory_set_nt_length,
    7249             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7250             :         },
    7251             :         {
    7252             :                 .name = discard_const_p(char, "nt_size"),
    7253             :                 .get = py_netr_PasswordHistory_get_nt_size,
    7254             :                 .set = py_netr_PasswordHistory_set_nt_size,
    7255             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7256             :         },
    7257             :         {
    7258             :                 .name = discard_const_p(char, "nt_flags"),
    7259             :                 .get = py_netr_PasswordHistory_get_nt_flags,
    7260             :                 .set = py_netr_PasswordHistory_set_nt_flags,
    7261             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7262             :         },
    7263             :         {
    7264             :                 .name = discard_const_p(char, "lm_length"),
    7265             :                 .get = py_netr_PasswordHistory_get_lm_length,
    7266             :                 .set = py_netr_PasswordHistory_set_lm_length,
    7267             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7268             :         },
    7269             :         {
    7270             :                 .name = discard_const_p(char, "lm_size"),
    7271             :                 .get = py_netr_PasswordHistory_get_lm_size,
    7272             :                 .set = py_netr_PasswordHistory_set_lm_size,
    7273             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7274             :         },
    7275             :         {
    7276             :                 .name = discard_const_p(char, "lm_flags"),
    7277             :                 .get = py_netr_PasswordHistory_get_lm_flags,
    7278             :                 .set = py_netr_PasswordHistory_set_lm_flags,
    7279             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7280             :         },
    7281             :         {
    7282             :                 .name = discard_const_p(char, "nt_history"),
    7283             :                 .get = py_netr_PasswordHistory_get_nt_history,
    7284             :                 .set = py_netr_PasswordHistory_set_nt_history,
    7285             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7286             :         },
    7287             :         {
    7288             :                 .name = discard_const_p(char, "lm_history"),
    7289             :                 .get = py_netr_PasswordHistory_get_lm_history,
    7290             :                 .set = py_netr_PasswordHistory_set_lm_history,
    7291             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7292             :         },
    7293             :         { .name = NULL }
    7294             : };
    7295             : 
    7296           0 : static PyObject *py_netr_PasswordHistory_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7297             : {
    7298           0 :         return pytalloc_new(struct netr_PasswordHistory, type);
    7299             : }
    7300             : 
    7301             : 
    7302             : static PyTypeObject netr_PasswordHistory_Type = {
    7303             :         PyVarObject_HEAD_INIT(NULL, 0)
    7304             :         .tp_name = "netlogon.netr_PasswordHistory",
    7305             :         .tp_getset = py_netr_PasswordHistory_getsetters,
    7306             :         .tp_methods = NULL,
    7307             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7308             :         .tp_new = py_netr_PasswordHistory_new,
    7309             : };
    7310             : 
    7311             : 
    7312           0 : static PyObject *py_netr_USER_KEYS2_get_lmpassword(PyObject *obj, void *closure)
    7313             : {
    7314           0 :         struct netr_USER_KEYS2 *object = pytalloc_get_ptr(obj);
    7315           0 :         PyObject *py_lmpassword;
    7316           0 :         py_lmpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    7317           0 :         return py_lmpassword;
    7318             : }
    7319             : 
    7320           0 : static int py_netr_USER_KEYS2_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    7321             : {
    7322           0 :         struct netr_USER_KEYS2 *object = pytalloc_get_ptr(py_obj);
    7323           0 :         if (value == NULL) {
    7324           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmpassword");
    7325           0 :                 return -1;
    7326             :         }
    7327           0 :         PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
    7328           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7329           0 :                 PyErr_NoMemory();
    7330           0 :                 return -1;
    7331             :         }
    7332           0 :         object->lmpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
    7333           0 :         return 0;
    7334             : }
    7335             : 
    7336           0 : static PyObject *py_netr_USER_KEYS2_get_ntpassword(PyObject *obj, void *closure)
    7337             : {
    7338           0 :         struct netr_USER_KEYS2 *object = pytalloc_get_ptr(obj);
    7339           0 :         PyObject *py_ntpassword;
    7340           0 :         py_ntpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    7341           0 :         return py_ntpassword;
    7342             : }
    7343             : 
    7344           0 : static int py_netr_USER_KEYS2_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    7345             : {
    7346           0 :         struct netr_USER_KEYS2 *object = pytalloc_get_ptr(py_obj);
    7347           0 :         if (value == NULL) {
    7348           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ntpassword");
    7349           0 :                 return -1;
    7350             :         }
    7351           0 :         PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
    7352           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7353           0 :                 PyErr_NoMemory();
    7354           0 :                 return -1;
    7355             :         }
    7356           0 :         object->ntpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
    7357           0 :         return 0;
    7358             : }
    7359             : 
    7360           0 : static PyObject *py_netr_USER_KEYS2_get_history(PyObject *obj, void *closure)
    7361             : {
    7362           0 :         struct netr_USER_KEYS2 *object = pytalloc_get_ptr(obj);
    7363           0 :         PyObject *py_history;
    7364           0 :         py_history = pytalloc_reference_ex(&netr_PasswordHistory_Type, pytalloc_get_mem_ctx(obj), &object->history);
    7365           0 :         return py_history;
    7366             : }
    7367             : 
    7368           0 : static int py_netr_USER_KEYS2_set_history(PyObject *py_obj, PyObject *value, void *closure)
    7369             : {
    7370           0 :         struct netr_USER_KEYS2 *object = pytalloc_get_ptr(py_obj);
    7371           0 :         if (value == NULL) {
    7372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->history");
    7373           0 :                 return -1;
    7374             :         }
    7375           0 :         PY_CHECK_TYPE(&netr_PasswordHistory_Type, value, return -1;);
    7376           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7377           0 :                 PyErr_NoMemory();
    7378           0 :                 return -1;
    7379             :         }
    7380           0 :         object->history = *(struct netr_PasswordHistory *)pytalloc_get_ptr(value);
    7381           0 :         return 0;
    7382             : }
    7383             : 
    7384             : static PyGetSetDef py_netr_USER_KEYS2_getsetters[] = {
    7385             :         {
    7386             :                 .name = discard_const_p(char, "lmpassword"),
    7387             :                 .get = py_netr_USER_KEYS2_get_lmpassword,
    7388             :                 .set = py_netr_USER_KEYS2_set_lmpassword,
    7389             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
    7390             :         },
    7391             :         {
    7392             :                 .name = discard_const_p(char, "ntpassword"),
    7393             :                 .get = py_netr_USER_KEYS2_get_ntpassword,
    7394             :                 .set = py_netr_USER_KEYS2_set_ntpassword,
    7395             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
    7396             :         },
    7397             :         {
    7398             :                 .name = discard_const_p(char, "history"),
    7399             :                 .get = py_netr_USER_KEYS2_get_history,
    7400             :                 .set = py_netr_USER_KEYS2_set_history,
    7401             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_PasswordHistory")
    7402             :         },
    7403             :         { .name = NULL }
    7404             : };
    7405             : 
    7406           0 : static PyObject *py_netr_USER_KEYS2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7407             : {
    7408           0 :         return pytalloc_new(struct netr_USER_KEYS2, type);
    7409             : }
    7410             : 
    7411             : 
    7412             : static PyTypeObject netr_USER_KEYS2_Type = {
    7413             :         PyVarObject_HEAD_INIT(NULL, 0)
    7414             :         .tp_name = "netlogon.netr_USER_KEYS2",
    7415             :         .tp_getset = py_netr_USER_KEYS2_getsetters,
    7416             :         .tp_methods = NULL,
    7417             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7418             :         .tp_new = py_netr_USER_KEYS2_new,
    7419             : };
    7420             : 
    7421             : 
    7422           0 : static PyObject *py_netr_USER_KEY_UNION_get_keys2(PyObject *obj, void *closure)
    7423             : {
    7424           0 :         struct netr_USER_KEY_UNION *object = pytalloc_get_ptr(obj);
    7425           0 :         PyObject *py_keys2;
    7426           0 :         py_keys2 = pytalloc_reference_ex(&netr_USER_KEYS2_Type, pytalloc_get_mem_ctx(obj), &object->keys2);
    7427           0 :         return py_keys2;
    7428             : }
    7429             : 
    7430           0 : static int py_netr_USER_KEY_UNION_set_keys2(PyObject *py_obj, PyObject *value, void *closure)
    7431             : {
    7432           0 :         struct netr_USER_KEY_UNION *object = pytalloc_get_ptr(py_obj);
    7433           0 :         if (value == NULL) {
    7434           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->keys2");
    7435           0 :                 return -1;
    7436             :         }
    7437           0 :         PY_CHECK_TYPE(&netr_USER_KEYS2_Type, value, return -1;);
    7438           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7439           0 :                 PyErr_NoMemory();
    7440           0 :                 return -1;
    7441             :         }
    7442           0 :         object->keys2 = *(struct netr_USER_KEYS2 *)pytalloc_get_ptr(value);
    7443           0 :         return 0;
    7444             : }
    7445             : 
    7446             : static PyGetSetDef py_netr_USER_KEY_UNION_getsetters[] = {
    7447             :         {
    7448             :                 .name = discard_const_p(char, "keys2"),
    7449             :                 .get = py_netr_USER_KEY_UNION_get_keys2,
    7450             :                 .set = py_netr_USER_KEY_UNION_set_keys2,
    7451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEYS2")
    7452             :         },
    7453             :         { .name = NULL }
    7454             : };
    7455             : 
    7456           0 : static PyObject *py_netr_USER_KEY_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7457             : {
    7458           0 :         return pytalloc_new(struct netr_USER_KEY_UNION, type);
    7459             : }
    7460             : 
    7461             : 
    7462             : static PyTypeObject netr_USER_KEY_UNION_Type = {
    7463             :         PyVarObject_HEAD_INIT(NULL, 0)
    7464             :         .tp_name = "netlogon.netr_USER_KEY_UNION",
    7465             :         .tp_getset = py_netr_USER_KEY_UNION_getsetters,
    7466             :         .tp_methods = NULL,
    7467             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7468             :         .tp_new = py_netr_USER_KEY_UNION_new,
    7469             : };
    7470             : 
    7471             : 
    7472           0 : static PyObject *py_netr_USER_KEYS_get_version(PyObject *obj, void *closure)
    7473             : {
    7474           0 :         struct netr_USER_KEYS *object = pytalloc_get_ptr(obj);
    7475           0 :         PyObject *py_version;
    7476           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
    7477           0 :         return py_version;
    7478             : }
    7479             : 
    7480           0 : static int py_netr_USER_KEYS_set_version(PyObject *py_obj, PyObject *value, void *closure)
    7481             : {
    7482           0 :         struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
    7483           0 :         if (value == NULL) {
    7484           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->version");
    7485           0 :                 return -1;
    7486             :         }
    7487             :         {
    7488           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    7489           0 :                 if (PyLong_Check(value)) {
    7490           0 :                         unsigned long long test_var;
    7491           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7492           0 :                         if (PyErr_Occurred() != NULL) {
    7493           0 :                                 return -1;
    7494             :                         }
    7495           0 :                         if (test_var > uint_max) {
    7496           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7497             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7498           0 :                                 return -1;
    7499             :                         }
    7500           0 :                         object->version = test_var;
    7501             :                 } else {
    7502           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7503             :                           PyLong_Type.tp_name);
    7504           0 :                         return -1;
    7505             :                 }
    7506             :         }
    7507           0 :         return 0;
    7508             : }
    7509             : 
    7510           0 : static PyObject *py_netr_USER_KEYS_get_keys(PyObject *obj, void *closure)
    7511             : {
    7512           0 :         struct netr_USER_KEYS *object = pytalloc_get_ptr(obj);
    7513           0 :         PyObject *py_keys;
    7514           0 :         py_keys = pytalloc_reference_ex(&netr_USER_KEY_UNION_Type, pytalloc_get_mem_ctx(obj), &object->keys);
    7515           0 :         return py_keys;
    7516             : }
    7517             : 
    7518           0 : static int py_netr_USER_KEYS_set_keys(PyObject *py_obj, PyObject *value, void *closure)
    7519             : {
    7520           0 :         struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
    7521           0 :         if (value == NULL) {
    7522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->keys");
    7523           0 :                 return -1;
    7524             :         }
    7525           0 :         PY_CHECK_TYPE(&netr_USER_KEY_UNION_Type, value, return -1;);
    7526           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7527           0 :                 PyErr_NoMemory();
    7528           0 :                 return -1;
    7529             :         }
    7530           0 :         object->keys = *(struct netr_USER_KEY_UNION *)pytalloc_get_ptr(value);
    7531           0 :         return 0;
    7532             : }
    7533             : 
    7534             : static PyGetSetDef py_netr_USER_KEYS_getsetters[] = {
    7535             :         {
    7536             :                 .name = discard_const_p(char, "version"),
    7537             :                 .get = py_netr_USER_KEYS_get_version,
    7538             :                 .set = py_netr_USER_KEYS_set_version,
    7539             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7540             :         },
    7541             :         {
    7542             :                 .name = discard_const_p(char, "keys"),
    7543             :                 .get = py_netr_USER_KEYS_get_keys,
    7544             :                 .set = py_netr_USER_KEYS_set_keys,
    7545             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY_UNION")
    7546             :         },
    7547             :         { .name = NULL }
    7548             : };
    7549             : 
    7550           0 : static PyObject *py_netr_USER_KEYS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7551             : {
    7552           0 :         return pytalloc_new(struct netr_USER_KEYS, type);
    7553             : }
    7554             : 
    7555           0 : static PyObject *py_netr_USER_KEYS_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7556             : {
    7557           0 :         struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
    7558           0 :         PyObject *ret = NULL;
    7559           0 :         DATA_BLOB blob;
    7560           0 :         enum ndr_err_code err;
    7561           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7562           0 :         if (tmp_ctx == NULL) {
    7563           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7564           0 :                 return NULL;
    7565             :         }
    7566           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_USER_KEYS);
    7567           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7568           0 :                 TALLOC_FREE(tmp_ctx);
    7569           0 :                 PyErr_SetNdrError(err);
    7570           0 :                 return NULL;
    7571             :         }
    7572             : 
    7573           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7574           0 :         TALLOC_FREE(tmp_ctx);
    7575           0 :         return ret;
    7576             : }
    7577             : 
    7578           0 : static PyObject *py_netr_USER_KEYS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7579             : {
    7580           0 :         struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
    7581           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7582           0 :         Py_ssize_t blob_length = 0;
    7583           0 :         enum ndr_err_code err;
    7584           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7585           0 :         PyObject *allow_remaining_obj = NULL;
    7586           0 :         bool allow_remaining = false;
    7587             : 
    7588           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7589             :                 discard_const_p(char *, kwnames),
    7590             :                 &blob.data, &blob_length,
    7591             :                 &allow_remaining_obj)) {
    7592           0 :                 return NULL;
    7593             :         }
    7594           0 :         blob.length = blob_length;
    7595             : 
    7596           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7597           0 :                 allow_remaining = true;
    7598             :         }
    7599             : 
    7600           0 :         if (allow_remaining) {
    7601           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
    7602             :         } else {
    7603           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);
    7604             :         }
    7605           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7606           0 :                 PyErr_SetNdrError(err);
    7607           0 :                 return NULL;
    7608             :         }
    7609             : 
    7610           0 :         Py_RETURN_NONE;
    7611             : }
    7612             : 
    7613           0 : static PyObject *py_netr_USER_KEYS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7614             : {
    7615           0 :         struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
    7616           0 :         PyObject *ret;
    7617           0 :         char *retstr;
    7618             : 
    7619           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);
    7620           0 :         ret = PyUnicode_FromString(retstr);
    7621           0 :         talloc_free(retstr);
    7622             : 
    7623           0 :         return ret;
    7624             : }
    7625             : 
    7626             : static PyMethodDef py_netr_USER_KEYS_methods[] = {
    7627             :         { "__ndr_pack__", (PyCFunction)py_netr_USER_KEYS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7628             :         { "__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" },
    7629             :         { "__ndr_print__", (PyCFunction)py_netr_USER_KEYS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7630             :         { NULL, NULL, 0, NULL }
    7631             : };
    7632             : 
    7633             : 
    7634             : static PyTypeObject netr_USER_KEYS_Type = {
    7635             :         PyVarObject_HEAD_INIT(NULL, 0)
    7636             :         .tp_name = "netlogon.netr_USER_KEYS",
    7637             :         .tp_getset = py_netr_USER_KEYS_getsetters,
    7638             :         .tp_methods = py_netr_USER_KEYS_methods,
    7639             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7640             :         .tp_new = py_netr_USER_KEYS_new,
    7641             : };
    7642             : 
    7643             : 
    7644           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag(PyObject *obj, void *closure)
    7645             : {
    7646           0 :         struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(obj);
    7647           0 :         PyObject *py_SensitiveDataFlag;
    7648           0 :         py_SensitiveDataFlag = PyLong_FromLong((uint16_t)(object->SensitiveDataFlag));
    7649           0 :         return py_SensitiveDataFlag;
    7650             : }
    7651             : 
    7652           0 : static int py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag(PyObject *py_obj, PyObject *value, void *closure)
    7653             : {
    7654           0 :         struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(py_obj);
    7655           0 :         if (value == NULL) {
    7656           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SensitiveDataFlag");
    7657           0 :                 return -1;
    7658             :         }
    7659             :         {
    7660           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SensitiveDataFlag));
    7661           0 :                 if (PyLong_Check(value)) {
    7662           0 :                         unsigned long long test_var;
    7663           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7664           0 :                         if (PyErr_Occurred() != NULL) {
    7665           0 :                                 return -1;
    7666             :                         }
    7667           0 :                         if (test_var > uint_max) {
    7668           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7669             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7670           0 :                                 return -1;
    7671             :                         }
    7672           0 :                         object->SensitiveDataFlag = test_var;
    7673             :                 } else {
    7674           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7675             :                           PyLong_Type.tp_name);
    7676           0 :                         return -1;
    7677             :                 }
    7678             :         }
    7679           0 :         return 0;
    7680             : }
    7681             : 
    7682           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_DataLength(PyObject *obj, void *closure)
    7683             : {
    7684           0 :         struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(obj);
    7685           0 :         PyObject *py_DataLength;
    7686           0 :         py_DataLength = PyLong_FromUnsignedLongLong((uint32_t)(object->DataLength));
    7687           0 :         return py_DataLength;
    7688             : }
    7689             : 
    7690           0 : static int py_netr_USER_PRIVATE_INFO_set_DataLength(PyObject *py_obj, PyObject *value, void *closure)
    7691             : {
    7692           0 :         struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(py_obj);
    7693           0 :         if (value == NULL) {
    7694           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->DataLength");
    7695           0 :                 return -1;
    7696             :         }
    7697             :         {
    7698           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->DataLength));
    7699           0 :                 if (PyLong_Check(value)) {
    7700           0 :                         unsigned long long test_var;
    7701           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7702           0 :                         if (PyErr_Occurred() != NULL) {
    7703           0 :                                 return -1;
    7704             :                         }
    7705           0 :                         if (test_var > uint_max) {
    7706           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7707             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7708           0 :                                 return -1;
    7709             :                         }
    7710           0 :                         object->DataLength = test_var;
    7711             :                 } else {
    7712           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7713             :                           PyLong_Type.tp_name);
    7714           0 :                         return -1;
    7715             :                 }
    7716             :         }
    7717           0 :         return 0;
    7718             : }
    7719             : 
    7720           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveData(PyObject *obj, void *closure)
    7721             : {
    7722           0 :         struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(obj);
    7723           0 :         PyObject *py_SensitiveData;
    7724           0 :         if (object->SensitiveData == NULL) {
    7725           0 :                 Py_RETURN_NONE;
    7726             :         }
    7727           0 :         if (object->SensitiveData == NULL) {
    7728           0 :                 py_SensitiveData = Py_None;
    7729           0 :                 Py_INCREF(py_SensitiveData);
    7730             :         } else {
    7731           0 :                 py_SensitiveData = PyList_New(object->DataLength);
    7732           0 :                 if (py_SensitiveData == NULL) {
    7733           0 :                         return NULL;
    7734             :                 }
    7735             :                 {
    7736             :                         int SensitiveData_cntr_1;
    7737           0 :                         for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < (object->DataLength); SensitiveData_cntr_1++) {
    7738           0 :                                 PyObject *py_SensitiveData_1;
    7739           0 :                                 py_SensitiveData_1 = PyLong_FromLong((uint16_t)((object->SensitiveData)[SensitiveData_cntr_1]));
    7740           0 :                                 PyList_SetItem(py_SensitiveData, SensitiveData_cntr_1, py_SensitiveData_1);
    7741             :                         }
    7742             :                 }
    7743             :         }
    7744           0 :         return py_SensitiveData;
    7745             : }
    7746             : 
    7747           0 : static int py_netr_USER_PRIVATE_INFO_set_SensitiveData(PyObject *py_obj, PyObject *value, void *closure)
    7748             : {
    7749           0 :         struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(py_obj);
    7750           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->SensitiveData));
    7751           0 :         if (value == NULL) {
    7752           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SensitiveData");
    7753           0 :                 return -1;
    7754             :         }
    7755           0 :         if (value == Py_None) {
    7756           0 :                 object->SensitiveData = NULL;
    7757             :         } else {
    7758           0 :                 object->SensitiveData = NULL;
    7759           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7760             :                 {
    7761           0 :                         int SensitiveData_cntr_1;
    7762           0 :                         object->SensitiveData = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->SensitiveData, PyList_GET_SIZE(value));
    7763           0 :                         if (!object->SensitiveData) { return -1; }
    7764           0 :                         talloc_set_name_const(object->SensitiveData, "ARRAY: object->SensitiveData");
    7765           0 :                         for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < PyList_GET_SIZE(value); SensitiveData_cntr_1++) {
    7766           0 :                                 if (PyList_GET_ITEM(value, SensitiveData_cntr_1) == NULL) {
    7767           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->SensitiveData)[SensitiveData_cntr_1]");
    7768           0 :                                         return -1;
    7769             :                                 }
    7770             :                                 {
    7771           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->SensitiveData)[SensitiveData_cntr_1]));
    7772           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, SensitiveData_cntr_1))) {
    7773           0 :                                                 unsigned long long test_var;
    7774           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, SensitiveData_cntr_1));
    7775           0 :                                                 if (PyErr_Occurred() != NULL) {
    7776           0 :                                                         return -1;
    7777             :                                                 }
    7778           0 :                                                 if (test_var > uint_max) {
    7779           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7780             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    7781           0 :                                                         return -1;
    7782             :                                                 }
    7783           0 :                                                 (object->SensitiveData)[SensitiveData_cntr_1] = test_var;
    7784             :                                         } else {
    7785           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    7786             :                                                   PyLong_Type.tp_name);
    7787           0 :                                                 return -1;
    7788             :                                         }
    7789             :                                 }
    7790             :                         }
    7791             :                 }
    7792             :         }
    7793           0 :         return 0;
    7794             : }
    7795             : 
    7796             : static PyGetSetDef py_netr_USER_PRIVATE_INFO_getsetters[] = {
    7797             :         {
    7798             :                 .name = discard_const_p(char, "SensitiveDataFlag"),
    7799             :                 .get = py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag,
    7800             :                 .set = py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag,
    7801             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7802             :         },
    7803             :         {
    7804             :                 .name = discard_const_p(char, "DataLength"),
    7805             :                 .get = py_netr_USER_PRIVATE_INFO_get_DataLength,
    7806             :                 .set = py_netr_USER_PRIVATE_INFO_set_DataLength,
    7807             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7808             :         },
    7809             :         {
    7810             :                 .name = discard_const_p(char, "SensitiveData"),
    7811             :                 .get = py_netr_USER_PRIVATE_INFO_get_SensitiveData,
    7812             :                 .set = py_netr_USER_PRIVATE_INFO_set_SensitiveData,
    7813             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7814             :         },
    7815             :         { .name = NULL }
    7816             : };
    7817             : 
    7818           0 : static PyObject *py_netr_USER_PRIVATE_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7819             : {
    7820           0 :         return pytalloc_new(struct netr_USER_PRIVATE_INFO, type);
    7821             : }
    7822             : 
    7823             : 
    7824             : static PyTypeObject netr_USER_PRIVATE_INFO_Type = {
    7825             :         PyVarObject_HEAD_INIT(NULL, 0)
    7826             :         .tp_name = "netlogon.netr_USER_PRIVATE_INFO",
    7827             :         .tp_getset = py_netr_USER_PRIVATE_INFO_getsetters,
    7828             :         .tp_methods = NULL,
    7829             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7830             :         .tp_new = py_netr_USER_PRIVATE_INFO_new,
    7831             : };
    7832             : 
    7833             : 
    7834           0 : static PyObject *py_netr_DELTA_USER_get_account_name(PyObject *obj, void *closure)
    7835             : {
    7836           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    7837           0 :         PyObject *py_account_name;
    7838           0 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    7839           0 :         return py_account_name;
    7840             : }
    7841             : 
    7842           0 : static int py_netr_DELTA_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    7843             : {
    7844           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    7845           0 :         if (value == NULL) {
    7846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
    7847           0 :                 return -1;
    7848             :         }
    7849           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7850           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7851           0 :                 PyErr_NoMemory();
    7852           0 :                 return -1;
    7853             :         }
    7854           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    7855           0 :         return 0;
    7856             : }
    7857             : 
    7858           0 : static PyObject *py_netr_DELTA_USER_get_full_name(PyObject *obj, void *closure)
    7859             : {
    7860           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    7861           0 :         PyObject *py_full_name;
    7862           0 :         py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
    7863           0 :         return py_full_name;
    7864             : }
    7865             : 
    7866           0 : static int py_netr_DELTA_USER_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
    7867             : {
    7868           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    7869           0 :         if (value == NULL) {
    7870           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->full_name");
    7871           0 :                 return -1;
    7872             :         }
    7873           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7874           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7875           0 :                 PyErr_NoMemory();
    7876           0 :                 return -1;
    7877             :         }
    7878           0 :         object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    7879           0 :         return 0;
    7880             : }
    7881             : 
    7882           0 : static PyObject *py_netr_DELTA_USER_get_rid(PyObject *obj, void *closure)
    7883             : {
    7884           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    7885           0 :         PyObject *py_rid;
    7886           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->rid));
    7887           0 :         return py_rid;
    7888             : }
    7889             : 
    7890           0 : static int py_netr_DELTA_USER_set_rid(PyObject *py_obj, PyObject *value, void *closure)
    7891             : {
    7892           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    7893           0 :         if (value == NULL) {
    7894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rid");
    7895           0 :                 return -1;
    7896             :         }
    7897             :         {
    7898           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
    7899           0 :                 if (PyLong_Check(value)) {
    7900           0 :                         unsigned long long test_var;
    7901           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7902           0 :                         if (PyErr_Occurred() != NULL) {
    7903           0 :                                 return -1;
    7904             :                         }
    7905           0 :                         if (test_var > uint_max) {
    7906           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7907             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7908           0 :                                 return -1;
    7909             :                         }
    7910           0 :                         object->rid = test_var;
    7911             :                 } else {
    7912           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7913             :                           PyLong_Type.tp_name);
    7914           0 :                         return -1;
    7915             :                 }
    7916             :         }
    7917           0 :         return 0;
    7918             : }
    7919             : 
    7920           0 : static PyObject *py_netr_DELTA_USER_get_primary_gid(PyObject *obj, void *closure)
    7921             : {
    7922           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    7923           0 :         PyObject *py_primary_gid;
    7924           0 :         py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)(object->primary_gid));
    7925           0 :         return py_primary_gid;
    7926             : }
    7927             : 
    7928           0 : static int py_netr_DELTA_USER_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
    7929             : {
    7930           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    7931           0 :         if (value == NULL) {
    7932           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->primary_gid");
    7933           0 :                 return -1;
    7934             :         }
    7935             :         {
    7936           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
    7937           0 :                 if (PyLong_Check(value)) {
    7938           0 :                         unsigned long long test_var;
    7939           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7940           0 :                         if (PyErr_Occurred() != NULL) {
    7941           0 :                                 return -1;
    7942             :                         }
    7943           0 :                         if (test_var > uint_max) {
    7944           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7945             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7946           0 :                                 return -1;
    7947             :                         }
    7948           0 :                         object->primary_gid = test_var;
    7949             :                 } else {
    7950           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7951             :                           PyLong_Type.tp_name);
    7952           0 :                         return -1;
    7953             :                 }
    7954             :         }
    7955           0 :         return 0;
    7956             : }
    7957             : 
    7958           0 : static PyObject *py_netr_DELTA_USER_get_home_directory(PyObject *obj, void *closure)
    7959             : {
    7960           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    7961           0 :         PyObject *py_home_directory;
    7962           0 :         py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
    7963           0 :         return py_home_directory;
    7964             : }
    7965             : 
    7966           0 : static int py_netr_DELTA_USER_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
    7967             : {
    7968           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    7969           0 :         if (value == NULL) {
    7970           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->home_directory");
    7971           0 :                 return -1;
    7972             :         }
    7973           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7974           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7975           0 :                 PyErr_NoMemory();
    7976           0 :                 return -1;
    7977             :         }
    7978           0 :         object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
    7979           0 :         return 0;
    7980             : }
    7981             : 
    7982           0 : static PyObject *py_netr_DELTA_USER_get_home_drive(PyObject *obj, void *closure)
    7983             : {
    7984           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    7985           0 :         PyObject *py_home_drive;
    7986           0 :         py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
    7987           0 :         return py_home_drive;
    7988             : }
    7989             : 
    7990           0 : static int py_netr_DELTA_USER_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
    7991             : {
    7992           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    7993           0 :         if (value == NULL) {
    7994           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->home_drive");
    7995           0 :                 return -1;
    7996             :         }
    7997           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7998           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7999           0 :                 PyErr_NoMemory();
    8000           0 :                 return -1;
    8001             :         }
    8002           0 :         object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
    8003           0 :         return 0;
    8004             : }
    8005             : 
    8006           0 : static PyObject *py_netr_DELTA_USER_get_logon_script(PyObject *obj, void *closure)
    8007             : {
    8008           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8009           0 :         PyObject *py_logon_script;
    8010           0 :         py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
    8011           0 :         return py_logon_script;
    8012             : }
    8013             : 
    8014           0 : static int py_netr_DELTA_USER_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
    8015             : {
    8016           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8017           0 :         if (value == NULL) {
    8018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_script");
    8019           0 :                 return -1;
    8020             :         }
    8021           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8022           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8023           0 :                 PyErr_NoMemory();
    8024           0 :                 return -1;
    8025             :         }
    8026           0 :         object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
    8027           0 :         return 0;
    8028             : }
    8029             : 
    8030           0 : static PyObject *py_netr_DELTA_USER_get_description(PyObject *obj, void *closure)
    8031             : {
    8032           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8033           0 :         PyObject *py_description;
    8034           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
    8035           0 :         return py_description;
    8036             : }
    8037             : 
    8038           0 : static int py_netr_DELTA_USER_set_description(PyObject *py_obj, PyObject *value, void *closure)
    8039             : {
    8040           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8041           0 :         if (value == NULL) {
    8042           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->description");
    8043           0 :                 return -1;
    8044             :         }
    8045           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8046           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8047           0 :                 PyErr_NoMemory();
    8048           0 :                 return -1;
    8049             :         }
    8050           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
    8051           0 :         return 0;
    8052             : }
    8053             : 
    8054           0 : static PyObject *py_netr_DELTA_USER_get_workstations(PyObject *obj, void *closure)
    8055             : {
    8056           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8057           0 :         PyObject *py_workstations;
    8058           0 :         py_workstations = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstations);
    8059           0 :         return py_workstations;
    8060             : }
    8061             : 
    8062           0 : static int py_netr_DELTA_USER_set_workstations(PyObject *py_obj, PyObject *value, void *closure)
    8063             : {
    8064           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8065           0 :         if (value == NULL) {
    8066           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->workstations");
    8067           0 :                 return -1;
    8068             :         }
    8069           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8070           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8071           0 :                 PyErr_NoMemory();
    8072           0 :                 return -1;
    8073             :         }
    8074           0 :         object->workstations = *(struct lsa_String *)pytalloc_get_ptr(value);
    8075           0 :         return 0;
    8076             : }
    8077             : 
    8078           0 : static PyObject *py_netr_DELTA_USER_get_last_logon(PyObject *obj, void *closure)
    8079             : {
    8080           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8081           0 :         PyObject *py_last_logon;
    8082           0 :         py_last_logon = PyLong_FromUnsignedLongLong(object->last_logon);
    8083           0 :         return py_last_logon;
    8084             : }
    8085             : 
    8086           0 : static int py_netr_DELTA_USER_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
    8087             : {
    8088           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8089           0 :         if (value == NULL) {
    8090           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_logon");
    8091           0 :                 return -1;
    8092             :         }
    8093             :         {
    8094           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logon));
    8095           0 :                 if (PyLong_Check(value)) {
    8096           0 :                         unsigned long long test_var;
    8097           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8098           0 :                         if (PyErr_Occurred() != NULL) {
    8099           0 :                                 return -1;
    8100             :                         }
    8101           0 :                         if (test_var > uint_max) {
    8102           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8103             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8104           0 :                                 return -1;
    8105             :                         }
    8106           0 :                         object->last_logon = test_var;
    8107             :                 } else {
    8108           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8109             :                           PyLong_Type.tp_name);
    8110           0 :                         return -1;
    8111             :                 }
    8112             :         }
    8113           0 :         return 0;
    8114             : }
    8115             : 
    8116           0 : static PyObject *py_netr_DELTA_USER_get_last_logoff(PyObject *obj, void *closure)
    8117             : {
    8118           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8119           0 :         PyObject *py_last_logoff;
    8120           0 :         py_last_logoff = PyLong_FromUnsignedLongLong(object->last_logoff);
    8121           0 :         return py_last_logoff;
    8122             : }
    8123             : 
    8124           0 : static int py_netr_DELTA_USER_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
    8125             : {
    8126           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8127           0 :         if (value == NULL) {
    8128           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_logoff");
    8129           0 :                 return -1;
    8130             :         }
    8131             :         {
    8132           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logoff));
    8133           0 :                 if (PyLong_Check(value)) {
    8134           0 :                         unsigned long long test_var;
    8135           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8136           0 :                         if (PyErr_Occurred() != NULL) {
    8137           0 :                                 return -1;
    8138             :                         }
    8139           0 :                         if (test_var > uint_max) {
    8140           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8141             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8142           0 :                                 return -1;
    8143             :                         }
    8144           0 :                         object->last_logoff = test_var;
    8145             :                 } else {
    8146           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8147             :                           PyLong_Type.tp_name);
    8148           0 :                         return -1;
    8149             :                 }
    8150             :         }
    8151           0 :         return 0;
    8152             : }
    8153             : 
    8154           0 : static PyObject *py_netr_DELTA_USER_get_logon_hours(PyObject *obj, void *closure)
    8155             : {
    8156           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8157           0 :         PyObject *py_logon_hours;
    8158           0 :         py_logon_hours = pytalloc_reference_ex(samr_LogonHours_Type, pytalloc_get_mem_ctx(obj), &object->logon_hours);
    8159           0 :         return py_logon_hours;
    8160             : }
    8161             : 
    8162           0 : static int py_netr_DELTA_USER_set_logon_hours(PyObject *py_obj, PyObject *value, void *closure)
    8163             : {
    8164           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8165           0 :         if (value == NULL) {
    8166           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_hours");
    8167           0 :                 return -1;
    8168             :         }
    8169           0 :         PY_CHECK_TYPE(samr_LogonHours_Type, value, return -1;);
    8170           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8171           0 :                 PyErr_NoMemory();
    8172           0 :                 return -1;
    8173             :         }
    8174           0 :         object->logon_hours = *(struct samr_LogonHours *)pytalloc_get_ptr(value);
    8175           0 :         return 0;
    8176             : }
    8177             : 
    8178           0 : static PyObject *py_netr_DELTA_USER_get_bad_password_count(PyObject *obj, void *closure)
    8179             : {
    8180           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8181           0 :         PyObject *py_bad_password_count;
    8182           0 :         py_bad_password_count = PyLong_FromLong((uint16_t)(object->bad_password_count));
    8183           0 :         return py_bad_password_count;
    8184             : }
    8185             : 
    8186           0 : static int py_netr_DELTA_USER_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
    8187             : {
    8188           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8189           0 :         if (value == NULL) {
    8190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bad_password_count");
    8191           0 :                 return -1;
    8192             :         }
    8193             :         {
    8194           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
    8195           0 :                 if (PyLong_Check(value)) {
    8196           0 :                         unsigned long long test_var;
    8197           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8198           0 :                         if (PyErr_Occurred() != NULL) {
    8199           0 :                                 return -1;
    8200             :                         }
    8201           0 :                         if (test_var > uint_max) {
    8202           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8203             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8204           0 :                                 return -1;
    8205             :                         }
    8206           0 :                         object->bad_password_count = test_var;
    8207             :                 } else {
    8208           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8209             :                           PyLong_Type.tp_name);
    8210           0 :                         return -1;
    8211             :                 }
    8212             :         }
    8213           0 :         return 0;
    8214             : }
    8215             : 
    8216           0 : static PyObject *py_netr_DELTA_USER_get_logon_count(PyObject *obj, void *closure)
    8217             : {
    8218           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8219           0 :         PyObject *py_logon_count;
    8220           0 :         py_logon_count = PyLong_FromLong((uint16_t)(object->logon_count));
    8221           0 :         return py_logon_count;
    8222             : }
    8223             : 
    8224           0 : static int py_netr_DELTA_USER_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    8225             : {
    8226           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8227           0 :         if (value == NULL) {
    8228           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_count");
    8229           0 :                 return -1;
    8230             :         }
    8231             :         {
    8232           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    8233           0 :                 if (PyLong_Check(value)) {
    8234           0 :                         unsigned long long test_var;
    8235           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8236           0 :                         if (PyErr_Occurred() != NULL) {
    8237           0 :                                 return -1;
    8238             :                         }
    8239           0 :                         if (test_var > uint_max) {
    8240           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8241             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8242           0 :                                 return -1;
    8243             :                         }
    8244           0 :                         object->logon_count = test_var;
    8245             :                 } else {
    8246           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8247             :                           PyLong_Type.tp_name);
    8248           0 :                         return -1;
    8249             :                 }
    8250             :         }
    8251           0 :         return 0;
    8252             : }
    8253             : 
    8254           0 : static PyObject *py_netr_DELTA_USER_get_last_password_change(PyObject *obj, void *closure)
    8255             : {
    8256           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8257           0 :         PyObject *py_last_password_change;
    8258           0 :         py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
    8259           0 :         return py_last_password_change;
    8260             : }
    8261             : 
    8262           0 : static int py_netr_DELTA_USER_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
    8263             : {
    8264           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8265           0 :         if (value == NULL) {
    8266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_password_change");
    8267           0 :                 return -1;
    8268             :         }
    8269             :         {
    8270           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
    8271           0 :                 if (PyLong_Check(value)) {
    8272           0 :                         unsigned long long test_var;
    8273           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8274           0 :                         if (PyErr_Occurred() != NULL) {
    8275           0 :                                 return -1;
    8276             :                         }
    8277           0 :                         if (test_var > uint_max) {
    8278           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8279             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8280           0 :                                 return -1;
    8281             :                         }
    8282           0 :                         object->last_password_change = test_var;
    8283             :                 } else {
    8284           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8285             :                           PyLong_Type.tp_name);
    8286           0 :                         return -1;
    8287             :                 }
    8288             :         }
    8289           0 :         return 0;
    8290             : }
    8291             : 
    8292           0 : static PyObject *py_netr_DELTA_USER_get_acct_expiry(PyObject *obj, void *closure)
    8293             : {
    8294           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8295           0 :         PyObject *py_acct_expiry;
    8296           0 :         py_acct_expiry = PyLong_FromUnsignedLongLong(object->acct_expiry);
    8297           0 :         return py_acct_expiry;
    8298             : }
    8299             : 
    8300           0 : static int py_netr_DELTA_USER_set_acct_expiry(PyObject *py_obj, PyObject *value, void *closure)
    8301             : {
    8302           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8303           0 :         if (value == NULL) {
    8304           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->acct_expiry");
    8305           0 :                 return -1;
    8306             :         }
    8307             :         {
    8308           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_expiry));
    8309           0 :                 if (PyLong_Check(value)) {
    8310           0 :                         unsigned long long test_var;
    8311           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8312           0 :                         if (PyErr_Occurred() != NULL) {
    8313           0 :                                 return -1;
    8314             :                         }
    8315           0 :                         if (test_var > uint_max) {
    8316           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8317             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8318           0 :                                 return -1;
    8319             :                         }
    8320           0 :                         object->acct_expiry = test_var;
    8321             :                 } else {
    8322           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8323             :                           PyLong_Type.tp_name);
    8324           0 :                         return -1;
    8325             :                 }
    8326             :         }
    8327           0 :         return 0;
    8328             : }
    8329             : 
    8330           0 : static PyObject *py_netr_DELTA_USER_get_acct_flags(PyObject *obj, void *closure)
    8331             : {
    8332           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8333           0 :         PyObject *py_acct_flags;
    8334           0 :         py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->acct_flags));
    8335           0 :         return py_acct_flags;
    8336             : }
    8337             : 
    8338           0 : static int py_netr_DELTA_USER_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
    8339             : {
    8340           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8341           0 :         if (value == NULL) {
    8342           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->acct_flags");
    8343           0 :                 return -1;
    8344             :         }
    8345             :         {
    8346           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
    8347           0 :                 if (PyLong_Check(value)) {
    8348           0 :                         unsigned long long test_var;
    8349           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8350           0 :                         if (PyErr_Occurred() != NULL) {
    8351           0 :                                 return -1;
    8352             :                         }
    8353           0 :                         if (test_var > uint_max) {
    8354           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8355             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8356           0 :                                 return -1;
    8357             :                         }
    8358           0 :                         object->acct_flags = test_var;
    8359             :                 } else {
    8360           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8361             :                           PyLong_Type.tp_name);
    8362           0 :                         return -1;
    8363             :                 }
    8364             :         }
    8365           0 :         return 0;
    8366             : }
    8367             : 
    8368           0 : static PyObject *py_netr_DELTA_USER_get_lmpassword(PyObject *obj, void *closure)
    8369             : {
    8370           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8371           0 :         PyObject *py_lmpassword;
    8372           0 :         py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    8373           0 :         return py_lmpassword;
    8374             : }
    8375             : 
    8376           0 : static int py_netr_DELTA_USER_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    8377             : {
    8378           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8379           0 :         if (value == NULL) {
    8380           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmpassword");
    8381           0 :                 return -1;
    8382             :         }
    8383           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    8384           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8385           0 :                 PyErr_NoMemory();
    8386           0 :                 return -1;
    8387             :         }
    8388           0 :         object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    8389           0 :         return 0;
    8390             : }
    8391             : 
    8392           0 : static PyObject *py_netr_DELTA_USER_get_ntpassword(PyObject *obj, void *closure)
    8393             : {
    8394           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8395           0 :         PyObject *py_ntpassword;
    8396           0 :         py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    8397           0 :         return py_ntpassword;
    8398             : }
    8399             : 
    8400           0 : static int py_netr_DELTA_USER_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    8401             : {
    8402           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8403           0 :         if (value == NULL) {
    8404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ntpassword");
    8405           0 :                 return -1;
    8406             :         }
    8407           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    8408           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8409           0 :                 PyErr_NoMemory();
    8410           0 :                 return -1;
    8411             :         }
    8412           0 :         object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    8413           0 :         return 0;
    8414             : }
    8415             : 
    8416           0 : static PyObject *py_netr_DELTA_USER_get_nt_password_present(PyObject *obj, void *closure)
    8417             : {
    8418           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8419           0 :         PyObject *py_nt_password_present;
    8420           0 :         py_nt_password_present = PyLong_FromLong((uint16_t)(object->nt_password_present));
    8421           0 :         return py_nt_password_present;
    8422             : }
    8423             : 
    8424           0 : static int py_netr_DELTA_USER_set_nt_password_present(PyObject *py_obj, PyObject *value, void *closure)
    8425             : {
    8426           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8427           0 :         if (value == NULL) {
    8428           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_password_present");
    8429           0 :                 return -1;
    8430             :         }
    8431             :         {
    8432           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_password_present));
    8433           0 :                 if (PyLong_Check(value)) {
    8434           0 :                         unsigned long long test_var;
    8435           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8436           0 :                         if (PyErr_Occurred() != NULL) {
    8437           0 :                                 return -1;
    8438             :                         }
    8439           0 :                         if (test_var > uint_max) {
    8440           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8441             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8442           0 :                                 return -1;
    8443             :                         }
    8444           0 :                         object->nt_password_present = test_var;
    8445             :                 } else {
    8446           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8447             :                           PyLong_Type.tp_name);
    8448           0 :                         return -1;
    8449             :                 }
    8450             :         }
    8451           0 :         return 0;
    8452             : }
    8453             : 
    8454           0 : static PyObject *py_netr_DELTA_USER_get_lm_password_present(PyObject *obj, void *closure)
    8455             : {
    8456           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8457           0 :         PyObject *py_lm_password_present;
    8458           0 :         py_lm_password_present = PyLong_FromLong((uint16_t)(object->lm_password_present));
    8459           0 :         return py_lm_password_present;
    8460             : }
    8461             : 
    8462           0 : static int py_netr_DELTA_USER_set_lm_password_present(PyObject *py_obj, PyObject *value, void *closure)
    8463             : {
    8464           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8465           0 :         if (value == NULL) {
    8466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_password_present");
    8467           0 :                 return -1;
    8468             :         }
    8469             :         {
    8470           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_password_present));
    8471           0 :                 if (PyLong_Check(value)) {
    8472           0 :                         unsigned long long test_var;
    8473           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8474           0 :                         if (PyErr_Occurred() != NULL) {
    8475           0 :                                 return -1;
    8476             :                         }
    8477           0 :                         if (test_var > uint_max) {
    8478           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8479             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8480           0 :                                 return -1;
    8481             :                         }
    8482           0 :                         object->lm_password_present = test_var;
    8483             :                 } else {
    8484           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8485             :                           PyLong_Type.tp_name);
    8486           0 :                         return -1;
    8487             :                 }
    8488             :         }
    8489           0 :         return 0;
    8490             : }
    8491             : 
    8492           0 : static PyObject *py_netr_DELTA_USER_get_password_expired(PyObject *obj, void *closure)
    8493             : {
    8494           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8495           0 :         PyObject *py_password_expired;
    8496           0 :         py_password_expired = PyLong_FromLong((uint16_t)(object->password_expired));
    8497           0 :         return py_password_expired;
    8498             : }
    8499             : 
    8500           0 : static int py_netr_DELTA_USER_set_password_expired(PyObject *py_obj, PyObject *value, void *closure)
    8501             : {
    8502           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8503           0 :         if (value == NULL) {
    8504           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->password_expired");
    8505           0 :                 return -1;
    8506             :         }
    8507             :         {
    8508           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_expired));
    8509           0 :                 if (PyLong_Check(value)) {
    8510           0 :                         unsigned long long test_var;
    8511           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8512           0 :                         if (PyErr_Occurred() != NULL) {
    8513           0 :                                 return -1;
    8514             :                         }
    8515           0 :                         if (test_var > uint_max) {
    8516           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8517             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8518           0 :                                 return -1;
    8519             :                         }
    8520           0 :                         object->password_expired = test_var;
    8521             :                 } else {
    8522           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8523             :                           PyLong_Type.tp_name);
    8524           0 :                         return -1;
    8525             :                 }
    8526             :         }
    8527           0 :         return 0;
    8528             : }
    8529             : 
    8530           0 : static PyObject *py_netr_DELTA_USER_get_comment(PyObject *obj, void *closure)
    8531             : {
    8532           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8533           0 :         PyObject *py_comment;
    8534           0 :         py_comment = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->comment);
    8535           0 :         return py_comment;
    8536             : }
    8537             : 
    8538           0 : static int py_netr_DELTA_USER_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    8539             : {
    8540           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8541           0 :         if (value == NULL) {
    8542           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
    8543           0 :                 return -1;
    8544             :         }
    8545           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8546           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8547           0 :                 PyErr_NoMemory();
    8548           0 :                 return -1;
    8549             :         }
    8550           0 :         object->comment = *(struct lsa_String *)pytalloc_get_ptr(value);
    8551           0 :         return 0;
    8552             : }
    8553             : 
    8554           0 : static PyObject *py_netr_DELTA_USER_get_parameters(PyObject *obj, void *closure)
    8555             : {
    8556           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8557           0 :         PyObject *py_parameters;
    8558           0 :         py_parameters = pytalloc_reference_ex(lsa_BinaryString_Type, pytalloc_get_mem_ctx(obj), &object->parameters);
    8559           0 :         return py_parameters;
    8560             : }
    8561             : 
    8562           0 : static int py_netr_DELTA_USER_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
    8563             : {
    8564           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8565           0 :         if (value == NULL) {
    8566           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->parameters");
    8567           0 :                 return -1;
    8568             :         }
    8569           0 :         PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
    8570           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8571           0 :                 PyErr_NoMemory();
    8572           0 :                 return -1;
    8573             :         }
    8574           0 :         object->parameters = *(struct lsa_BinaryString *)pytalloc_get_ptr(value);
    8575           0 :         return 0;
    8576             : }
    8577             : 
    8578           0 : static PyObject *py_netr_DELTA_USER_get_country_code(PyObject *obj, void *closure)
    8579             : {
    8580           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8581           0 :         PyObject *py_country_code;
    8582           0 :         py_country_code = PyLong_FromLong((uint16_t)(object->country_code));
    8583           0 :         return py_country_code;
    8584             : }
    8585             : 
    8586           0 : static int py_netr_DELTA_USER_set_country_code(PyObject *py_obj, PyObject *value, void *closure)
    8587             : {
    8588           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8589           0 :         if (value == NULL) {
    8590           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->country_code");
    8591           0 :                 return -1;
    8592             :         }
    8593             :         {
    8594           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->country_code));
    8595           0 :                 if (PyLong_Check(value)) {
    8596           0 :                         unsigned long long test_var;
    8597           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8598           0 :                         if (PyErr_Occurred() != NULL) {
    8599           0 :                                 return -1;
    8600             :                         }
    8601           0 :                         if (test_var > uint_max) {
    8602           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8603             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8604           0 :                                 return -1;
    8605             :                         }
    8606           0 :                         object->country_code = test_var;
    8607             :                 } else {
    8608           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8609             :                           PyLong_Type.tp_name);
    8610           0 :                         return -1;
    8611             :                 }
    8612             :         }
    8613           0 :         return 0;
    8614             : }
    8615             : 
    8616           0 : static PyObject *py_netr_DELTA_USER_get_code_page(PyObject *obj, void *closure)
    8617             : {
    8618           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8619           0 :         PyObject *py_code_page;
    8620           0 :         py_code_page = PyLong_FromLong((uint16_t)(object->code_page));
    8621           0 :         return py_code_page;
    8622             : }
    8623             : 
    8624           0 : static int py_netr_DELTA_USER_set_code_page(PyObject *py_obj, PyObject *value, void *closure)
    8625             : {
    8626           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8627           0 :         if (value == NULL) {
    8628           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->code_page");
    8629           0 :                 return -1;
    8630             :         }
    8631             :         {
    8632           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->code_page));
    8633           0 :                 if (PyLong_Check(value)) {
    8634           0 :                         unsigned long long test_var;
    8635           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8636           0 :                         if (PyErr_Occurred() != NULL) {
    8637           0 :                                 return -1;
    8638             :                         }
    8639           0 :                         if (test_var > uint_max) {
    8640           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8641             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8642           0 :                                 return -1;
    8643             :                         }
    8644           0 :                         object->code_page = test_var;
    8645             :                 } else {
    8646           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8647             :                           PyLong_Type.tp_name);
    8648           0 :                         return -1;
    8649             :                 }
    8650             :         }
    8651           0 :         return 0;
    8652             : }
    8653             : 
    8654           0 : static PyObject *py_netr_DELTA_USER_get_user_private_info(PyObject *obj, void *closure)
    8655             : {
    8656           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8657           0 :         PyObject *py_user_private_info;
    8658           0 :         py_user_private_info = pytalloc_reference_ex(&netr_USER_PRIVATE_INFO_Type, pytalloc_get_mem_ctx(obj), &object->user_private_info);
    8659           0 :         return py_user_private_info;
    8660             : }
    8661             : 
    8662           0 : static int py_netr_DELTA_USER_set_user_private_info(PyObject *py_obj, PyObject *value, void *closure)
    8663             : {
    8664           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8665           0 :         if (value == NULL) {
    8666           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_private_info");
    8667           0 :                 return -1;
    8668             :         }
    8669           0 :         PY_CHECK_TYPE(&netr_USER_PRIVATE_INFO_Type, value, return -1;);
    8670           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8671           0 :                 PyErr_NoMemory();
    8672           0 :                 return -1;
    8673             :         }
    8674           0 :         object->user_private_info = *(struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(value);
    8675           0 :         return 0;
    8676             : }
    8677             : 
    8678           0 : static PyObject *py_netr_DELTA_USER_get_SecurityInformation(PyObject *obj, void *closure)
    8679             : {
    8680           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8681           0 :         PyObject *py_SecurityInformation;
    8682           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
    8683           0 :         return py_SecurityInformation;
    8684             : }
    8685             : 
    8686           0 : static int py_netr_DELTA_USER_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
    8687             : {
    8688           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8689           0 :         if (value == NULL) {
    8690           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
    8691           0 :                 return -1;
    8692             :         }
    8693             :         {
    8694           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
    8695           0 :                 if (PyLong_Check(value)) {
    8696           0 :                         unsigned long long test_var;
    8697           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8698           0 :                         if (PyErr_Occurred() != NULL) {
    8699           0 :                                 return -1;
    8700             :                         }
    8701           0 :                         if (test_var > uint_max) {
    8702           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8703             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8704           0 :                                 return -1;
    8705             :                         }
    8706           0 :                         object->SecurityInformation = test_var;
    8707             :                 } else {
    8708           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8709             :                           PyLong_Type.tp_name);
    8710           0 :                         return -1;
    8711             :                 }
    8712             :         }
    8713           0 :         return 0;
    8714             : }
    8715             : 
    8716           0 : static PyObject *py_netr_DELTA_USER_get_sdbuf(PyObject *obj, void *closure)
    8717             : {
    8718           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8719           0 :         PyObject *py_sdbuf;
    8720           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
    8721           0 :         return py_sdbuf;
    8722             : }
    8723             : 
    8724           0 : static int py_netr_DELTA_USER_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
    8725             : {
    8726           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8727           0 :         if (value == NULL) {
    8728           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
    8729           0 :                 return -1;
    8730             :         }
    8731           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
    8732           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8733           0 :                 PyErr_NoMemory();
    8734           0 :                 return -1;
    8735             :         }
    8736           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
    8737           0 :         return 0;
    8738             : }
    8739             : 
    8740           0 : static PyObject *py_netr_DELTA_USER_get_profile_path(PyObject *obj, void *closure)
    8741             : {
    8742           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8743           0 :         PyObject *py_profile_path;
    8744           0 :         py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
    8745           0 :         return py_profile_path;
    8746             : }
    8747             : 
    8748           0 : static int py_netr_DELTA_USER_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
    8749             : {
    8750           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8751           0 :         if (value == NULL) {
    8752           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->profile_path");
    8753           0 :                 return -1;
    8754             :         }
    8755           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8756           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8757           0 :                 PyErr_NoMemory();
    8758           0 :                 return -1;
    8759             :         }
    8760           0 :         object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
    8761           0 :         return 0;
    8762             : }
    8763             : 
    8764           0 : static PyObject *py_netr_DELTA_USER_get_unknown2(PyObject *obj, void *closure)
    8765             : {
    8766           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8767           0 :         PyObject *py_unknown2;
    8768           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    8769           0 :         return py_unknown2;
    8770             : }
    8771             : 
    8772           0 : static int py_netr_DELTA_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    8773             : {
    8774           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8775           0 :         if (value == NULL) {
    8776           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
    8777           0 :                 return -1;
    8778             :         }
    8779           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8780           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8781           0 :                 PyErr_NoMemory();
    8782           0 :                 return -1;
    8783             :         }
    8784           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8785           0 :         return 0;
    8786             : }
    8787             : 
    8788           0 : static PyObject *py_netr_DELTA_USER_get_unknown3(PyObject *obj, void *closure)
    8789             : {
    8790           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8791           0 :         PyObject *py_unknown3;
    8792           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    8793           0 :         return py_unknown3;
    8794             : }
    8795             : 
    8796           0 : static int py_netr_DELTA_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    8797             : {
    8798           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8799           0 :         if (value == NULL) {
    8800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
    8801           0 :                 return -1;
    8802             :         }
    8803           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8804           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8805           0 :                 PyErr_NoMemory();
    8806           0 :                 return -1;
    8807             :         }
    8808           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8809           0 :         return 0;
    8810             : }
    8811             : 
    8812           0 : static PyObject *py_netr_DELTA_USER_get_unknown4(PyObject *obj, void *closure)
    8813             : {
    8814           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8815           0 :         PyObject *py_unknown4;
    8816           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    8817           0 :         return py_unknown4;
    8818             : }
    8819             : 
    8820           0 : static int py_netr_DELTA_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    8821             : {
    8822           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8823           0 :         if (value == NULL) {
    8824           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
    8825           0 :                 return -1;
    8826             :         }
    8827           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8828           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8829           0 :                 PyErr_NoMemory();
    8830           0 :                 return -1;
    8831             :         }
    8832           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8833           0 :         return 0;
    8834             : }
    8835             : 
    8836           0 : static PyObject *py_netr_DELTA_USER_get_unknown5(PyObject *obj, void *closure)
    8837             : {
    8838           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8839           0 :         PyObject *py_unknown5;
    8840           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
    8841           0 :         return py_unknown5;
    8842             : }
    8843             : 
    8844           0 : static int py_netr_DELTA_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
    8845             : {
    8846           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8847           0 :         if (value == NULL) {
    8848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
    8849           0 :                 return -1;
    8850             :         }
    8851             :         {
    8852           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
    8853           0 :                 if (PyLong_Check(value)) {
    8854           0 :                         unsigned long long test_var;
    8855           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8856           0 :                         if (PyErr_Occurred() != NULL) {
    8857           0 :                                 return -1;
    8858             :                         }
    8859           0 :                         if (test_var > uint_max) {
    8860           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8861             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8862           0 :                                 return -1;
    8863             :                         }
    8864           0 :                         object->unknown5 = test_var;
    8865             :                 } else {
    8866           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8867             :                           PyLong_Type.tp_name);
    8868           0 :                         return -1;
    8869             :                 }
    8870             :         }
    8871           0 :         return 0;
    8872             : }
    8873             : 
    8874           0 : static PyObject *py_netr_DELTA_USER_get_unknown6(PyObject *obj, void *closure)
    8875             : {
    8876           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8877           0 :         PyObject *py_unknown6;
    8878           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
    8879           0 :         return py_unknown6;
    8880             : }
    8881             : 
    8882           0 : static int py_netr_DELTA_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    8883             : {
    8884           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8885           0 :         if (value == NULL) {
    8886           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
    8887           0 :                 return -1;
    8888             :         }
    8889             :         {
    8890           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    8891           0 :                 if (PyLong_Check(value)) {
    8892           0 :                         unsigned long long test_var;
    8893           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8894           0 :                         if (PyErr_Occurred() != NULL) {
    8895           0 :                                 return -1;
    8896             :                         }
    8897           0 :                         if (test_var > uint_max) {
    8898           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8899             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8900           0 :                                 return -1;
    8901             :                         }
    8902           0 :                         object->unknown6 = test_var;
    8903             :                 } else {
    8904           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8905             :                           PyLong_Type.tp_name);
    8906           0 :                         return -1;
    8907             :                 }
    8908             :         }
    8909           0 :         return 0;
    8910             : }
    8911             : 
    8912           0 : static PyObject *py_netr_DELTA_USER_get_unknown7(PyObject *obj, void *closure)
    8913             : {
    8914           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8915           0 :         PyObject *py_unknown7;
    8916           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
    8917           0 :         return py_unknown7;
    8918             : }
    8919             : 
    8920           0 : static int py_netr_DELTA_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    8921             : {
    8922           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8923           0 :         if (value == NULL) {
    8924           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
    8925           0 :                 return -1;
    8926             :         }
    8927             :         {
    8928           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    8929           0 :                 if (PyLong_Check(value)) {
    8930           0 :                         unsigned long long test_var;
    8931           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8932           0 :                         if (PyErr_Occurred() != NULL) {
    8933           0 :                                 return -1;
    8934             :                         }
    8935           0 :                         if (test_var > uint_max) {
    8936           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8937             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8938           0 :                                 return -1;
    8939             :                         }
    8940           0 :                         object->unknown7 = test_var;
    8941             :                 } else {
    8942           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8943             :                           PyLong_Type.tp_name);
    8944           0 :                         return -1;
    8945             :                 }
    8946             :         }
    8947           0 :         return 0;
    8948             : }
    8949             : 
    8950           0 : static PyObject *py_netr_DELTA_USER_get_unknown8(PyObject *obj, void *closure)
    8951             : {
    8952           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
    8953           0 :         PyObject *py_unknown8;
    8954           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
    8955           0 :         return py_unknown8;
    8956             : }
    8957             : 
    8958           0 : static int py_netr_DELTA_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    8959             : {
    8960           0 :         struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
    8961           0 :         if (value == NULL) {
    8962           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
    8963           0 :                 return -1;
    8964             :         }
    8965             :         {
    8966           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    8967           0 :                 if (PyLong_Check(value)) {
    8968           0 :                         unsigned long long test_var;
    8969           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8970           0 :                         if (PyErr_Occurred() != NULL) {
    8971           0 :                                 return -1;
    8972             :                         }
    8973           0 :                         if (test_var > uint_max) {
    8974           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8975             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8976           0 :                                 return -1;
    8977             :                         }
    8978           0 :                         object->unknown8 = test_var;
    8979             :                 } else {
    8980           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8981             :                           PyLong_Type.tp_name);
    8982           0 :                         return -1;
    8983             :                 }
    8984             :         }
    8985           0 :         return 0;
    8986             : }
    8987             : 
    8988             : static PyGetSetDef py_netr_DELTA_USER_getsetters[] = {
    8989             :         {
    8990             :                 .name = discard_const_p(char, "account_name"),
    8991             :                 .get = py_netr_DELTA_USER_get_account_name,
    8992             :                 .set = py_netr_DELTA_USER_set_account_name,
    8993             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8994             :         },
    8995             :         {
    8996             :                 .name = discard_const_p(char, "full_name"),
    8997             :                 .get = py_netr_DELTA_USER_get_full_name,
    8998             :                 .set = py_netr_DELTA_USER_set_full_name,
    8999             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9000             :         },
    9001             :         {
    9002             :                 .name = discard_const_p(char, "rid"),
    9003             :                 .get = py_netr_DELTA_USER_get_rid,
    9004             :                 .set = py_netr_DELTA_USER_set_rid,
    9005             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9006             :         },
    9007             :         {
    9008             :                 .name = discard_const_p(char, "primary_gid"),
    9009             :                 .get = py_netr_DELTA_USER_get_primary_gid,
    9010             :                 .set = py_netr_DELTA_USER_set_primary_gid,
    9011             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9012             :         },
    9013             :         {
    9014             :                 .name = discard_const_p(char, "home_directory"),
    9015             :                 .get = py_netr_DELTA_USER_get_home_directory,
    9016             :                 .set = py_netr_DELTA_USER_set_home_directory,
    9017             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9018             :         },
    9019             :         {
    9020             :                 .name = discard_const_p(char, "home_drive"),
    9021             :                 .get = py_netr_DELTA_USER_get_home_drive,
    9022             :                 .set = py_netr_DELTA_USER_set_home_drive,
    9023             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9024             :         },
    9025             :         {
    9026             :                 .name = discard_const_p(char, "logon_script"),
    9027             :                 .get = py_netr_DELTA_USER_get_logon_script,
    9028             :                 .set = py_netr_DELTA_USER_set_logon_script,
    9029             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9030             :         },
    9031             :         {
    9032             :                 .name = discard_const_p(char, "description"),
    9033             :                 .get = py_netr_DELTA_USER_get_description,
    9034             :                 .set = py_netr_DELTA_USER_set_description,
    9035             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9036             :         },
    9037             :         {
    9038             :                 .name = discard_const_p(char, "workstations"),
    9039             :                 .get = py_netr_DELTA_USER_get_workstations,
    9040             :                 .set = py_netr_DELTA_USER_set_workstations,
    9041             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9042             :         },
    9043             :         {
    9044             :                 .name = discard_const_p(char, "last_logon"),
    9045             :                 .get = py_netr_DELTA_USER_get_last_logon,
    9046             :                 .set = py_netr_DELTA_USER_set_last_logon,
    9047             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9048             :         },
    9049             :         {
    9050             :                 .name = discard_const_p(char, "last_logoff"),
    9051             :                 .get = py_netr_DELTA_USER_get_last_logoff,
    9052             :                 .set = py_netr_DELTA_USER_set_last_logoff,
    9053             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9054             :         },
    9055             :         {
    9056             :                 .name = discard_const_p(char, "logon_hours"),
    9057             :                 .get = py_netr_DELTA_USER_get_logon_hours,
    9058             :                 .set = py_netr_DELTA_USER_set_logon_hours,
    9059             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_LogonHours")
    9060             :         },
    9061             :         {
    9062             :                 .name = discard_const_p(char, "bad_password_count"),
    9063             :                 .get = py_netr_DELTA_USER_get_bad_password_count,
    9064             :                 .set = py_netr_DELTA_USER_set_bad_password_count,
    9065             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9066             :         },
    9067             :         {
    9068             :                 .name = discard_const_p(char, "logon_count"),
    9069             :                 .get = py_netr_DELTA_USER_get_logon_count,
    9070             :                 .set = py_netr_DELTA_USER_set_logon_count,
    9071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9072             :         },
    9073             :         {
    9074             :                 .name = discard_const_p(char, "last_password_change"),
    9075             :                 .get = py_netr_DELTA_USER_get_last_password_change,
    9076             :                 .set = py_netr_DELTA_USER_set_last_password_change,
    9077             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9078             :         },
    9079             :         {
    9080             :                 .name = discard_const_p(char, "acct_expiry"),
    9081             :                 .get = py_netr_DELTA_USER_get_acct_expiry,
    9082             :                 .set = py_netr_DELTA_USER_set_acct_expiry,
    9083             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9084             :         },
    9085             :         {
    9086             :                 .name = discard_const_p(char, "acct_flags"),
    9087             :                 .get = py_netr_DELTA_USER_get_acct_flags,
    9088             :                 .set = py_netr_DELTA_USER_set_acct_flags,
    9089             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
    9090             :         },
    9091             :         {
    9092             :                 .name = discard_const_p(char, "lmpassword"),
    9093             :                 .get = py_netr_DELTA_USER_get_lmpassword,
    9094             :                 .set = py_netr_DELTA_USER_set_lmpassword,
    9095             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    9096             :         },
    9097             :         {
    9098             :                 .name = discard_const_p(char, "ntpassword"),
    9099             :                 .get = py_netr_DELTA_USER_get_ntpassword,
    9100             :                 .set = py_netr_DELTA_USER_set_ntpassword,
    9101             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    9102             :         },
    9103             :         {
    9104             :                 .name = discard_const_p(char, "nt_password_present"),
    9105             :                 .get = py_netr_DELTA_USER_get_nt_password_present,
    9106             :                 .set = py_netr_DELTA_USER_set_nt_password_present,
    9107             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    9108             :         },
    9109             :         {
    9110             :                 .name = discard_const_p(char, "lm_password_present"),
    9111             :                 .get = py_netr_DELTA_USER_get_lm_password_present,
    9112             :                 .set = py_netr_DELTA_USER_set_lm_password_present,
    9113             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    9114             :         },
    9115             :         {
    9116             :                 .name = discard_const_p(char, "password_expired"),
    9117             :                 .get = py_netr_DELTA_USER_get_password_expired,
    9118             :                 .set = py_netr_DELTA_USER_set_password_expired,
    9119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    9120             :         },
    9121             :         {
    9122             :                 .name = discard_const_p(char, "comment"),
    9123             :                 .get = py_netr_DELTA_USER_get_comment,
    9124             :                 .set = py_netr_DELTA_USER_set_comment,
    9125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9126             :         },
    9127             :         {
    9128             :                 .name = discard_const_p(char, "parameters"),
    9129             :                 .get = py_netr_DELTA_USER_get_parameters,
    9130             :                 .set = py_netr_DELTA_USER_set_parameters,
    9131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_BinaryString")
    9132             :         },
    9133             :         {
    9134             :                 .name = discard_const_p(char, "country_code"),
    9135             :                 .get = py_netr_DELTA_USER_get_country_code,
    9136             :                 .set = py_netr_DELTA_USER_set_country_code,
    9137             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9138             :         },
    9139             :         {
    9140             :                 .name = discard_const_p(char, "code_page"),
    9141             :                 .get = py_netr_DELTA_USER_get_code_page,
    9142             :                 .set = py_netr_DELTA_USER_set_code_page,
    9143             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9144             :         },
    9145             :         {
    9146             :                 .name = discard_const_p(char, "user_private_info"),
    9147             :                 .get = py_netr_DELTA_USER_get_user_private_info,
    9148             :                 .set = py_netr_DELTA_USER_set_user_private_info,
    9149             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_PRIVATE_INFO")
    9150             :         },
    9151             :         {
    9152             :                 .name = discard_const_p(char, "SecurityInformation"),
    9153             :                 .get = py_netr_DELTA_USER_get_SecurityInformation,
    9154             :                 .set = py_netr_DELTA_USER_set_SecurityInformation,
    9155             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9156             :         },
    9157             :         {
    9158             :                 .name = discard_const_p(char, "sdbuf"),
    9159             :                 .get = py_netr_DELTA_USER_get_sdbuf,
    9160             :                 .set = py_netr_DELTA_USER_set_sdbuf,
    9161             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
    9162             :         },
    9163             :         {
    9164             :                 .name = discard_const_p(char, "profile_path"),
    9165             :                 .get = py_netr_DELTA_USER_get_profile_path,
    9166             :                 .set = py_netr_DELTA_USER_set_profile_path,
    9167             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9168             :         },
    9169             :         {
    9170             :                 .name = discard_const_p(char, "unknown2"),
    9171             :                 .get = py_netr_DELTA_USER_get_unknown2,
    9172             :                 .set = py_netr_DELTA_USER_set_unknown2,
    9173             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9174             :         },
    9175             :         {
    9176             :                 .name = discard_const_p(char, "unknown3"),
    9177             :                 .get = py_netr_DELTA_USER_get_unknown3,
    9178             :                 .set = py_netr_DELTA_USER_set_unknown3,
    9179             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9180             :         },
    9181             :         {
    9182             :                 .name = discard_const_p(char, "unknown4"),
    9183             :                 .get = py_netr_DELTA_USER_get_unknown4,
    9184             :                 .set = py_netr_DELTA_USER_set_unknown4,
    9185             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9186             :         },
    9187             :         {
    9188             :                 .name = discard_const_p(char, "unknown5"),
    9189             :                 .get = py_netr_DELTA_USER_get_unknown5,
    9190             :                 .set = py_netr_DELTA_USER_set_unknown5,
    9191             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9192             :         },
    9193             :         {
    9194             :                 .name = discard_const_p(char, "unknown6"),
    9195             :                 .get = py_netr_DELTA_USER_get_unknown6,
    9196             :                 .set = py_netr_DELTA_USER_set_unknown6,
    9197             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9198             :         },
    9199             :         {
    9200             :                 .name = discard_const_p(char, "unknown7"),
    9201             :                 .get = py_netr_DELTA_USER_get_unknown7,
    9202             :                 .set = py_netr_DELTA_USER_set_unknown7,
    9203             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9204             :         },
    9205             :         {
    9206             :                 .name = discard_const_p(char, "unknown8"),
    9207             :                 .get = py_netr_DELTA_USER_get_unknown8,
    9208             :                 .set = py_netr_DELTA_USER_set_unknown8,
    9209             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9210             :         },
    9211             :         { .name = NULL }
    9212             : };
    9213             : 
    9214           0 : static PyObject *py_netr_DELTA_USER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9215             : {
    9216           0 :         return pytalloc_new(struct netr_DELTA_USER, type);
    9217             : }
    9218             : 
    9219             : 
    9220             : static PyTypeObject netr_DELTA_USER_Type = {
    9221             :         PyVarObject_HEAD_INIT(NULL, 0)
    9222             :         .tp_name = "netlogon.netr_DELTA_USER",
    9223             :         .tp_getset = py_netr_DELTA_USER_getsetters,
    9224             :         .tp_methods = NULL,
    9225             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9226             :         .tp_new = py_netr_DELTA_USER_new,
    9227             : };
    9228             : 
    9229             : 
    9230           0 : static PyObject *py_netr_DELTA_DOMAIN_get_domain_name(PyObject *obj, void *closure)
    9231             : {
    9232           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9233           0 :         PyObject *py_domain_name;
    9234           0 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
    9235           0 :         return py_domain_name;
    9236             : }
    9237             : 
    9238           0 : static int py_netr_DELTA_DOMAIN_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    9239             : {
    9240           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9241           0 :         if (value == NULL) {
    9242           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_name");
    9243           0 :                 return -1;
    9244             :         }
    9245           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9246           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9247           0 :                 PyErr_NoMemory();
    9248           0 :                 return -1;
    9249             :         }
    9250           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    9251           0 :         return 0;
    9252             : }
    9253             : 
    9254           0 : static PyObject *py_netr_DELTA_DOMAIN_get_oem_information(PyObject *obj, void *closure)
    9255             : {
    9256           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9257           0 :         PyObject *py_oem_information;
    9258           0 :         py_oem_information = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->oem_information);
    9259           0 :         return py_oem_information;
    9260             : }
    9261             : 
    9262           0 : static int py_netr_DELTA_DOMAIN_set_oem_information(PyObject *py_obj, PyObject *value, void *closure)
    9263             : {
    9264           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9265           0 :         if (value == NULL) {
    9266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->oem_information");
    9267           0 :                 return -1;
    9268             :         }
    9269           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9270           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9271           0 :                 PyErr_NoMemory();
    9272           0 :                 return -1;
    9273             :         }
    9274           0 :         object->oem_information = *(struct lsa_String *)pytalloc_get_ptr(value);
    9275           0 :         return 0;
    9276             : }
    9277             : 
    9278           0 : static PyObject *py_netr_DELTA_DOMAIN_get_force_logoff_time(PyObject *obj, void *closure)
    9279             : {
    9280           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9281           0 :         PyObject *py_force_logoff_time;
    9282           0 :         py_force_logoff_time = PyLong_FromLongLong(object->force_logoff_time);
    9283           0 :         return py_force_logoff_time;
    9284             : }
    9285             : 
    9286           0 : static int py_netr_DELTA_DOMAIN_set_force_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
    9287             : {
    9288           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9289           0 :         if (value == NULL) {
    9290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->force_logoff_time");
    9291           0 :                 return -1;
    9292             :         }
    9293             :         {
    9294           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->force_logoff_time));
    9295           0 :                 const long long int_min = -int_max - 1;
    9296           0 :                 if (PyLong_Check(value)) {
    9297           0 :                         long long test_var;
    9298           0 :                         test_var = PyLong_AsLongLong(value);
    9299           0 :                         if (PyErr_Occurred() != NULL) {
    9300           0 :                                 return -1;
    9301             :                         }
    9302           0 :                         if (test_var < int_min || test_var > int_max) {
    9303           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    9304             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9305           0 :                                 return -1;
    9306             :                         }
    9307           0 :                         object->force_logoff_time = test_var;
    9308             :                 } else {
    9309           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9310             :                           PyLong_Type.tp_name);
    9311           0 :                         return -1;
    9312             :                 }
    9313             :         }
    9314           0 :         return 0;
    9315             : }
    9316             : 
    9317           0 : static PyObject *py_netr_DELTA_DOMAIN_get_min_password_length(PyObject *obj, void *closure)
    9318             : {
    9319           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9320           0 :         PyObject *py_min_password_length;
    9321           0 :         py_min_password_length = PyLong_FromLong((uint16_t)(object->min_password_length));
    9322           0 :         return py_min_password_length;
    9323             : }
    9324             : 
    9325           0 : static int py_netr_DELTA_DOMAIN_set_min_password_length(PyObject *py_obj, PyObject *value, void *closure)
    9326             : {
    9327           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9328           0 :         if (value == NULL) {
    9329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->min_password_length");
    9330           0 :                 return -1;
    9331             :         }
    9332             :         {
    9333           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->min_password_length));
    9334           0 :                 if (PyLong_Check(value)) {
    9335           0 :                         unsigned long long test_var;
    9336           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9337           0 :                         if (PyErr_Occurred() != NULL) {
    9338           0 :                                 return -1;
    9339             :                         }
    9340           0 :                         if (test_var > uint_max) {
    9341           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9342             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9343           0 :                                 return -1;
    9344             :                         }
    9345           0 :                         object->min_password_length = test_var;
    9346             :                 } else {
    9347           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9348             :                           PyLong_Type.tp_name);
    9349           0 :                         return -1;
    9350             :                 }
    9351             :         }
    9352           0 :         return 0;
    9353             : }
    9354             : 
    9355           0 : static PyObject *py_netr_DELTA_DOMAIN_get_password_history_length(PyObject *obj, void *closure)
    9356             : {
    9357           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9358           0 :         PyObject *py_password_history_length;
    9359           0 :         py_password_history_length = PyLong_FromLong((uint16_t)(object->password_history_length));
    9360           0 :         return py_password_history_length;
    9361             : }
    9362             : 
    9363           0 : static int py_netr_DELTA_DOMAIN_set_password_history_length(PyObject *py_obj, PyObject *value, void *closure)
    9364             : {
    9365           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9366           0 :         if (value == NULL) {
    9367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->password_history_length");
    9368           0 :                 return -1;
    9369             :         }
    9370             :         {
    9371           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_history_length));
    9372           0 :                 if (PyLong_Check(value)) {
    9373           0 :                         unsigned long long test_var;
    9374           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9375           0 :                         if (PyErr_Occurred() != NULL) {
    9376           0 :                                 return -1;
    9377             :                         }
    9378           0 :                         if (test_var > uint_max) {
    9379           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9380             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9381           0 :                                 return -1;
    9382             :                         }
    9383           0 :                         object->password_history_length = test_var;
    9384             :                 } else {
    9385           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9386             :                           PyLong_Type.tp_name);
    9387           0 :                         return -1;
    9388             :                 }
    9389             :         }
    9390           0 :         return 0;
    9391             : }
    9392             : 
    9393           0 : static PyObject *py_netr_DELTA_DOMAIN_get_max_password_age(PyObject *obj, void *closure)
    9394             : {
    9395           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9396           0 :         PyObject *py_max_password_age;
    9397           0 :         py_max_password_age = PyLong_FromLongLong(object->max_password_age);
    9398           0 :         return py_max_password_age;
    9399             : }
    9400             : 
    9401           0 : static int py_netr_DELTA_DOMAIN_set_max_password_age(PyObject *py_obj, PyObject *value, void *closure)
    9402             : {
    9403           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9404           0 :         if (value == NULL) {
    9405           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->max_password_age");
    9406           0 :                 return -1;
    9407             :         }
    9408             :         {
    9409           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->max_password_age));
    9410           0 :                 const long long int_min = -int_max - 1;
    9411           0 :                 if (PyLong_Check(value)) {
    9412           0 :                         long long test_var;
    9413           0 :                         test_var = PyLong_AsLongLong(value);
    9414           0 :                         if (PyErr_Occurred() != NULL) {
    9415           0 :                                 return -1;
    9416             :                         }
    9417           0 :                         if (test_var < int_min || test_var > int_max) {
    9418           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    9419             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9420           0 :                                 return -1;
    9421             :                         }
    9422           0 :                         object->max_password_age = test_var;
    9423             :                 } else {
    9424           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9425             :                           PyLong_Type.tp_name);
    9426           0 :                         return -1;
    9427             :                 }
    9428             :         }
    9429           0 :         return 0;
    9430             : }
    9431             : 
    9432           0 : static PyObject *py_netr_DELTA_DOMAIN_get_min_password_age(PyObject *obj, void *closure)
    9433             : {
    9434           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9435           0 :         PyObject *py_min_password_age;
    9436           0 :         py_min_password_age = PyLong_FromLongLong(object->min_password_age);
    9437           0 :         return py_min_password_age;
    9438             : }
    9439             : 
    9440           0 : static int py_netr_DELTA_DOMAIN_set_min_password_age(PyObject *py_obj, PyObject *value, void *closure)
    9441             : {
    9442           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9443           0 :         if (value == NULL) {
    9444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->min_password_age");
    9445           0 :                 return -1;
    9446             :         }
    9447             :         {
    9448           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->min_password_age));
    9449           0 :                 const long long int_min = -int_max - 1;
    9450           0 :                 if (PyLong_Check(value)) {
    9451           0 :                         long long test_var;
    9452           0 :                         test_var = PyLong_AsLongLong(value);
    9453           0 :                         if (PyErr_Occurred() != NULL) {
    9454           0 :                                 return -1;
    9455             :                         }
    9456           0 :                         if (test_var < int_min || test_var > int_max) {
    9457           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    9458             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9459           0 :                                 return -1;
    9460             :                         }
    9461           0 :                         object->min_password_age = test_var;
    9462             :                 } else {
    9463           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9464             :                           PyLong_Type.tp_name);
    9465           0 :                         return -1;
    9466             :                 }
    9467             :         }
    9468           0 :         return 0;
    9469             : }
    9470             : 
    9471           0 : static PyObject *py_netr_DELTA_DOMAIN_get_sequence_num(PyObject *obj, void *closure)
    9472             : {
    9473           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9474           0 :         PyObject *py_sequence_num;
    9475           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(object->sequence_num);
    9476           0 :         return py_sequence_num;
    9477             : }
    9478             : 
    9479           0 : static int py_netr_DELTA_DOMAIN_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
    9480             : {
    9481           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9482           0 :         if (value == NULL) {
    9483           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sequence_num");
    9484           0 :                 return -1;
    9485             :         }
    9486             :         {
    9487           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sequence_num));
    9488           0 :                 if (PyLong_Check(value)) {
    9489           0 :                         unsigned long long test_var;
    9490           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9491           0 :                         if (PyErr_Occurred() != NULL) {
    9492           0 :                                 return -1;
    9493             :                         }
    9494           0 :                         if (test_var > uint_max) {
    9495           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9496             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9497           0 :                                 return -1;
    9498             :                         }
    9499           0 :                         object->sequence_num = test_var;
    9500             :                 } else {
    9501           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9502             :                           PyLong_Type.tp_name);
    9503           0 :                         return -1;
    9504             :                 }
    9505             :         }
    9506           0 :         return 0;
    9507             : }
    9508             : 
    9509           0 : static PyObject *py_netr_DELTA_DOMAIN_get_domain_create_time(PyObject *obj, void *closure)
    9510             : {
    9511           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9512           0 :         PyObject *py_domain_create_time;
    9513           0 :         py_domain_create_time = PyLong_FromUnsignedLongLong(object->domain_create_time);
    9514           0 :         return py_domain_create_time;
    9515             : }
    9516             : 
    9517           0 : static int py_netr_DELTA_DOMAIN_set_domain_create_time(PyObject *py_obj, PyObject *value, void *closure)
    9518             : {
    9519           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9520           0 :         if (value == NULL) {
    9521           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_create_time");
    9522           0 :                 return -1;
    9523             :         }
    9524             :         {
    9525           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->domain_create_time));
    9526           0 :                 if (PyLong_Check(value)) {
    9527           0 :                         unsigned long long test_var;
    9528           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9529           0 :                         if (PyErr_Occurred() != NULL) {
    9530           0 :                                 return -1;
    9531             :                         }
    9532           0 :                         if (test_var > uint_max) {
    9533           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9534             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9535           0 :                                 return -1;
    9536             :                         }
    9537           0 :                         object->domain_create_time = test_var;
    9538             :                 } else {
    9539           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9540             :                           PyLong_Type.tp_name);
    9541           0 :                         return -1;
    9542             :                 }
    9543             :         }
    9544           0 :         return 0;
    9545             : }
    9546             : 
    9547           0 : static PyObject *py_netr_DELTA_DOMAIN_get_SecurityInformation(PyObject *obj, void *closure)
    9548             : {
    9549           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9550           0 :         PyObject *py_SecurityInformation;
    9551           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
    9552           0 :         return py_SecurityInformation;
    9553             : }
    9554             : 
    9555           0 : static int py_netr_DELTA_DOMAIN_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
    9556             : {
    9557           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9558           0 :         if (value == NULL) {
    9559           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
    9560           0 :                 return -1;
    9561             :         }
    9562             :         {
    9563           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
    9564           0 :                 if (PyLong_Check(value)) {
    9565           0 :                         unsigned long long test_var;
    9566           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9567           0 :                         if (PyErr_Occurred() != NULL) {
    9568           0 :                                 return -1;
    9569             :                         }
    9570           0 :                         if (test_var > uint_max) {
    9571           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9572             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9573           0 :                                 return -1;
    9574             :                         }
    9575           0 :                         object->SecurityInformation = test_var;
    9576             :                 } else {
    9577           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9578             :                           PyLong_Type.tp_name);
    9579           0 :                         return -1;
    9580             :                 }
    9581             :         }
    9582           0 :         return 0;
    9583             : }
    9584             : 
    9585           0 : static PyObject *py_netr_DELTA_DOMAIN_get_sdbuf(PyObject *obj, void *closure)
    9586             : {
    9587           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9588           0 :         PyObject *py_sdbuf;
    9589           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
    9590           0 :         return py_sdbuf;
    9591             : }
    9592             : 
    9593           0 : static int py_netr_DELTA_DOMAIN_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
    9594             : {
    9595           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9596           0 :         if (value == NULL) {
    9597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
    9598           0 :                 return -1;
    9599             :         }
    9600           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
    9601           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9602           0 :                 PyErr_NoMemory();
    9603           0 :                 return -1;
    9604             :         }
    9605           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
    9606           0 :         return 0;
    9607             : }
    9608             : 
    9609           0 : static PyObject *py_netr_DELTA_DOMAIN_get_account_lockout(PyObject *obj, void *closure)
    9610             : {
    9611           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9612           0 :         PyObject *py_account_lockout;
    9613           0 :         py_account_lockout = pytalloc_reference_ex(lsa_BinaryString_Type, pytalloc_get_mem_ctx(obj), &object->account_lockout);
    9614           0 :         return py_account_lockout;
    9615             : }
    9616             : 
    9617           0 : static int py_netr_DELTA_DOMAIN_set_account_lockout(PyObject *py_obj, PyObject *value, void *closure)
    9618             : {
    9619           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9620           0 :         if (value == NULL) {
    9621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_lockout");
    9622           0 :                 return -1;
    9623             :         }
    9624           0 :         PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
    9625           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9626           0 :                 PyErr_NoMemory();
    9627           0 :                 return -1;
    9628             :         }
    9629           0 :         object->account_lockout = *(struct lsa_BinaryString *)pytalloc_get_ptr(value);
    9630           0 :         return 0;
    9631             : }
    9632             : 
    9633           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown2(PyObject *obj, void *closure)
    9634             : {
    9635           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9636           0 :         PyObject *py_unknown2;
    9637           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    9638           0 :         return py_unknown2;
    9639             : }
    9640             : 
    9641           0 : static int py_netr_DELTA_DOMAIN_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    9642             : {
    9643           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9644           0 :         if (value == NULL) {
    9645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
    9646           0 :                 return -1;
    9647             :         }
    9648           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9649           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9650           0 :                 PyErr_NoMemory();
    9651           0 :                 return -1;
    9652             :         }
    9653           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    9654           0 :         return 0;
    9655             : }
    9656             : 
    9657           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown3(PyObject *obj, void *closure)
    9658             : {
    9659           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9660           0 :         PyObject *py_unknown3;
    9661           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    9662           0 :         return py_unknown3;
    9663             : }
    9664             : 
    9665           0 : static int py_netr_DELTA_DOMAIN_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    9666             : {
    9667           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9668           0 :         if (value == NULL) {
    9669           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
    9670           0 :                 return -1;
    9671             :         }
    9672           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9673           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9674           0 :                 PyErr_NoMemory();
    9675           0 :                 return -1;
    9676             :         }
    9677           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    9678           0 :         return 0;
    9679             : }
    9680             : 
    9681           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown4(PyObject *obj, void *closure)
    9682             : {
    9683           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9684           0 :         PyObject *py_unknown4;
    9685           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    9686           0 :         return py_unknown4;
    9687             : }
    9688             : 
    9689           0 : static int py_netr_DELTA_DOMAIN_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    9690             : {
    9691           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9692           0 :         if (value == NULL) {
    9693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
    9694           0 :                 return -1;
    9695             :         }
    9696           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9697           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9698           0 :                 PyErr_NoMemory();
    9699           0 :                 return -1;
    9700             :         }
    9701           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    9702           0 :         return 0;
    9703             : }
    9704             : 
    9705           0 : static PyObject *py_netr_DELTA_DOMAIN_get_logon_to_chgpass(PyObject *obj, void *closure)
    9706             : {
    9707           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9708           0 :         PyObject *py_logon_to_chgpass;
    9709           0 :         py_logon_to_chgpass = PyLong_FromUnsignedLongLong((uint32_t)(object->logon_to_chgpass));
    9710           0 :         return py_logon_to_chgpass;
    9711             : }
    9712             : 
    9713           0 : static int py_netr_DELTA_DOMAIN_set_logon_to_chgpass(PyObject *py_obj, PyObject *value, void *closure)
    9714             : {
    9715           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9716           0 :         if (value == NULL) {
    9717           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_to_chgpass");
    9718           0 :                 return -1;
    9719             :         }
    9720             :         {
    9721           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_to_chgpass));
    9722           0 :                 if (PyLong_Check(value)) {
    9723           0 :                         unsigned long long test_var;
    9724           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9725           0 :                         if (PyErr_Occurred() != NULL) {
    9726           0 :                                 return -1;
    9727             :                         }
    9728           0 :                         if (test_var > uint_max) {
    9729           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9730             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9731           0 :                                 return -1;
    9732             :                         }
    9733           0 :                         object->logon_to_chgpass = test_var;
    9734             :                 } else {
    9735           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9736             :                           PyLong_Type.tp_name);
    9737           0 :                         return -1;
    9738             :                 }
    9739             :         }
    9740           0 :         return 0;
    9741             : }
    9742             : 
    9743           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown6(PyObject *obj, void *closure)
    9744             : {
    9745           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9746           0 :         PyObject *py_unknown6;
    9747           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
    9748           0 :         return py_unknown6;
    9749             : }
    9750             : 
    9751           0 : static int py_netr_DELTA_DOMAIN_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    9752             : {
    9753           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9754           0 :         if (value == NULL) {
    9755           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
    9756           0 :                 return -1;
    9757             :         }
    9758             :         {
    9759           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    9760           0 :                 if (PyLong_Check(value)) {
    9761           0 :                         unsigned long long test_var;
    9762           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9763           0 :                         if (PyErr_Occurred() != NULL) {
    9764           0 :                                 return -1;
    9765             :                         }
    9766           0 :                         if (test_var > uint_max) {
    9767           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9768             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9769           0 :                                 return -1;
    9770             :                         }
    9771           0 :                         object->unknown6 = test_var;
    9772             :                 } else {
    9773           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9774             :                           PyLong_Type.tp_name);
    9775           0 :                         return -1;
    9776             :                 }
    9777             :         }
    9778           0 :         return 0;
    9779             : }
    9780             : 
    9781           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown7(PyObject *obj, void *closure)
    9782             : {
    9783           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9784           0 :         PyObject *py_unknown7;
    9785           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
    9786           0 :         return py_unknown7;
    9787             : }
    9788             : 
    9789           0 : static int py_netr_DELTA_DOMAIN_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    9790             : {
    9791           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9792           0 :         if (value == NULL) {
    9793           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
    9794           0 :                 return -1;
    9795             :         }
    9796             :         {
    9797           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    9798           0 :                 if (PyLong_Check(value)) {
    9799           0 :                         unsigned long long test_var;
    9800           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9801           0 :                         if (PyErr_Occurred() != NULL) {
    9802           0 :                                 return -1;
    9803             :                         }
    9804           0 :                         if (test_var > uint_max) {
    9805           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9806             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9807           0 :                                 return -1;
    9808             :                         }
    9809           0 :                         object->unknown7 = test_var;
    9810             :                 } else {
    9811           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9812             :                           PyLong_Type.tp_name);
    9813           0 :                         return -1;
    9814             :                 }
    9815             :         }
    9816           0 :         return 0;
    9817             : }
    9818             : 
    9819           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown8(PyObject *obj, void *closure)
    9820             : {
    9821           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
    9822           0 :         PyObject *py_unknown8;
    9823           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
    9824           0 :         return py_unknown8;
    9825             : }
    9826             : 
    9827           0 : static int py_netr_DELTA_DOMAIN_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    9828             : {
    9829           0 :         struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
    9830           0 :         if (value == NULL) {
    9831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
    9832           0 :                 return -1;
    9833             :         }
    9834             :         {
    9835           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    9836           0 :                 if (PyLong_Check(value)) {
    9837           0 :                         unsigned long long test_var;
    9838           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9839           0 :                         if (PyErr_Occurred() != NULL) {
    9840           0 :                                 return -1;
    9841             :                         }
    9842           0 :                         if (test_var > uint_max) {
    9843           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9844             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9845           0 :                                 return -1;
    9846             :                         }
    9847           0 :                         object->unknown8 = test_var;
    9848             :                 } else {
    9849           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9850             :                           PyLong_Type.tp_name);
    9851           0 :                         return -1;
    9852             :                 }
    9853             :         }
    9854           0 :         return 0;
    9855             : }
    9856             : 
    9857             : static PyGetSetDef py_netr_DELTA_DOMAIN_getsetters[] = {
    9858             :         {
    9859             :                 .name = discard_const_p(char, "domain_name"),
    9860             :                 .get = py_netr_DELTA_DOMAIN_get_domain_name,
    9861             :                 .set = py_netr_DELTA_DOMAIN_set_domain_name,
    9862             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9863             :         },
    9864             :         {
    9865             :                 .name = discard_const_p(char, "oem_information"),
    9866             :                 .get = py_netr_DELTA_DOMAIN_get_oem_information,
    9867             :                 .set = py_netr_DELTA_DOMAIN_set_oem_information,
    9868             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9869             :         },
    9870             :         {
    9871             :                 .name = discard_const_p(char, "force_logoff_time"),
    9872             :                 .get = py_netr_DELTA_DOMAIN_get_force_logoff_time,
    9873             :                 .set = py_netr_DELTA_DOMAIN_set_force_logoff_time,
    9874             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    9875             :         },
    9876             :         {
    9877             :                 .name = discard_const_p(char, "min_password_length"),
    9878             :                 .get = py_netr_DELTA_DOMAIN_get_min_password_length,
    9879             :                 .set = py_netr_DELTA_DOMAIN_set_min_password_length,
    9880             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9881             :         },
    9882             :         {
    9883             :                 .name = discard_const_p(char, "password_history_length"),
    9884             :                 .get = py_netr_DELTA_DOMAIN_get_password_history_length,
    9885             :                 .set = py_netr_DELTA_DOMAIN_set_password_history_length,
    9886             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9887             :         },
    9888             :         {
    9889             :                 .name = discard_const_p(char, "max_password_age"),
    9890             :                 .get = py_netr_DELTA_DOMAIN_get_max_password_age,
    9891             :                 .set = py_netr_DELTA_DOMAIN_set_max_password_age,
    9892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    9893             :         },
    9894             :         {
    9895             :                 .name = discard_const_p(char, "min_password_age"),
    9896             :                 .get = py_netr_DELTA_DOMAIN_get_min_password_age,
    9897             :                 .set = py_netr_DELTA_DOMAIN_set_min_password_age,
    9898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    9899             :         },
    9900             :         {
    9901             :                 .name = discard_const_p(char, "sequence_num"),
    9902             :                 .get = py_netr_DELTA_DOMAIN_get_sequence_num,
    9903             :                 .set = py_netr_DELTA_DOMAIN_set_sequence_num,
    9904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    9905             :         },
    9906             :         {
    9907             :                 .name = discard_const_p(char, "domain_create_time"),
    9908             :                 .get = py_netr_DELTA_DOMAIN_get_domain_create_time,
    9909             :                 .set = py_netr_DELTA_DOMAIN_set_domain_create_time,
    9910             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9911             :         },
    9912             :         {
    9913             :                 .name = discard_const_p(char, "SecurityInformation"),
    9914             :                 .get = py_netr_DELTA_DOMAIN_get_SecurityInformation,
    9915             :                 .set = py_netr_DELTA_DOMAIN_set_SecurityInformation,
    9916             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9917             :         },
    9918             :         {
    9919             :                 .name = discard_const_p(char, "sdbuf"),
    9920             :                 .get = py_netr_DELTA_DOMAIN_get_sdbuf,
    9921             :                 .set = py_netr_DELTA_DOMAIN_set_sdbuf,
    9922             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
    9923             :         },
    9924             :         {
    9925             :                 .name = discard_const_p(char, "account_lockout"),
    9926             :                 .get = py_netr_DELTA_DOMAIN_get_account_lockout,
    9927             :                 .set = py_netr_DELTA_DOMAIN_set_account_lockout,
    9928             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_BinaryString")
    9929             :         },
    9930             :         {
    9931             :                 .name = discard_const_p(char, "unknown2"),
    9932             :                 .get = py_netr_DELTA_DOMAIN_get_unknown2,
    9933             :                 .set = py_netr_DELTA_DOMAIN_set_unknown2,
    9934             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9935             :         },
    9936             :         {
    9937             :                 .name = discard_const_p(char, "unknown3"),
    9938             :                 .get = py_netr_DELTA_DOMAIN_get_unknown3,
    9939             :                 .set = py_netr_DELTA_DOMAIN_set_unknown3,
    9940             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9941             :         },
    9942             :         {
    9943             :                 .name = discard_const_p(char, "unknown4"),
    9944             :                 .get = py_netr_DELTA_DOMAIN_get_unknown4,
    9945             :                 .set = py_netr_DELTA_DOMAIN_set_unknown4,
    9946             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9947             :         },
    9948             :         {
    9949             :                 .name = discard_const_p(char, "logon_to_chgpass"),
    9950             :                 .get = py_netr_DELTA_DOMAIN_get_logon_to_chgpass,
    9951             :                 .set = py_netr_DELTA_DOMAIN_set_logon_to_chgpass,
    9952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9953             :         },
    9954             :         {
    9955             :                 .name = discard_const_p(char, "unknown6"),
    9956             :                 .get = py_netr_DELTA_DOMAIN_get_unknown6,
    9957             :                 .set = py_netr_DELTA_DOMAIN_set_unknown6,
    9958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9959             :         },
    9960             :         {
    9961             :                 .name = discard_const_p(char, "unknown7"),
    9962             :                 .get = py_netr_DELTA_DOMAIN_get_unknown7,
    9963             :                 .set = py_netr_DELTA_DOMAIN_set_unknown7,
    9964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9965             :         },
    9966             :         {
    9967             :                 .name = discard_const_p(char, "unknown8"),
    9968             :                 .get = py_netr_DELTA_DOMAIN_get_unknown8,
    9969             :                 .set = py_netr_DELTA_DOMAIN_set_unknown8,
    9970             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9971             :         },
    9972             :         { .name = NULL }
    9973             : };
    9974             : 
    9975           0 : static PyObject *py_netr_DELTA_DOMAIN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9976             : {
    9977           0 :         return pytalloc_new(struct netr_DELTA_DOMAIN, type);
    9978             : }
    9979             : 
    9980             : 
    9981             : static PyTypeObject netr_DELTA_DOMAIN_Type = {
    9982             :         PyVarObject_HEAD_INIT(NULL, 0)
    9983             :         .tp_name = "netlogon.netr_DELTA_DOMAIN",
    9984             :         .tp_getset = py_netr_DELTA_DOMAIN_getsetters,
    9985             :         .tp_methods = NULL,
    9986             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9987             :         .tp_new = py_netr_DELTA_DOMAIN_new,
    9988             : };
    9989             : 
    9990             : 
    9991           0 : static PyObject *py_netr_DELTA_GROUP_get_group_name(PyObject *obj, void *closure)
    9992             : {
    9993           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
    9994           0 :         PyObject *py_group_name;
    9995           0 :         py_group_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->group_name);
    9996           0 :         return py_group_name;
    9997             : }
    9998             : 
    9999           0 : static int py_netr_DELTA_GROUP_set_group_name(PyObject *py_obj, PyObject *value, void *closure)
   10000             : {
   10001           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10002           0 :         if (value == NULL) {
   10003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->group_name");
   10004           0 :                 return -1;
   10005             :         }
   10006           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10007           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10008           0 :                 PyErr_NoMemory();
   10009           0 :                 return -1;
   10010             :         }
   10011           0 :         object->group_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   10012           0 :         return 0;
   10013             : }
   10014             : 
   10015           0 : static PyObject *py_netr_DELTA_GROUP_get_rid(PyObject *obj, void *closure)
   10016             : {
   10017           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10018           0 :         PyObject *py_rid;
   10019           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->rid));
   10020           0 :         return py_rid;
   10021             : }
   10022             : 
   10023           0 : static int py_netr_DELTA_GROUP_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   10024             : {
   10025           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10026           0 :         if (value == NULL) {
   10027           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rid");
   10028           0 :                 return -1;
   10029             :         }
   10030             :         {
   10031           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
   10032           0 :                 if (PyLong_Check(value)) {
   10033           0 :                         unsigned long long test_var;
   10034           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10035           0 :                         if (PyErr_Occurred() != NULL) {
   10036           0 :                                 return -1;
   10037             :                         }
   10038           0 :                         if (test_var > uint_max) {
   10039           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10040             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10041           0 :                                 return -1;
   10042             :                         }
   10043           0 :                         object->rid = test_var;
   10044             :                 } else {
   10045           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10046             :                           PyLong_Type.tp_name);
   10047           0 :                         return -1;
   10048             :                 }
   10049             :         }
   10050           0 :         return 0;
   10051             : }
   10052             : 
   10053           0 : static PyObject *py_netr_DELTA_GROUP_get_attributes(PyObject *obj, void *closure)
   10054             : {
   10055           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10056           0 :         PyObject *py_attributes;
   10057           0 :         py_attributes = PyLong_FromUnsignedLongLong((uint32_t)(object->attributes));
   10058           0 :         return py_attributes;
   10059             : }
   10060             : 
   10061           0 : static int py_netr_DELTA_GROUP_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
   10062             : {
   10063           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10064           0 :         if (value == NULL) {
   10065           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->attributes");
   10066           0 :                 return -1;
   10067             :         }
   10068             :         {
   10069           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attributes));
   10070           0 :                 if (PyLong_Check(value)) {
   10071           0 :                         unsigned long long test_var;
   10072           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10073           0 :                         if (PyErr_Occurred() != NULL) {
   10074           0 :                                 return -1;
   10075             :                         }
   10076           0 :                         if (test_var > uint_max) {
   10077           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10078             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10079           0 :                                 return -1;
   10080             :                         }
   10081           0 :                         object->attributes = test_var;
   10082             :                 } else {
   10083           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10084             :                           PyLong_Type.tp_name);
   10085           0 :                         return -1;
   10086             :                 }
   10087             :         }
   10088           0 :         return 0;
   10089             : }
   10090             : 
   10091           0 : static PyObject *py_netr_DELTA_GROUP_get_description(PyObject *obj, void *closure)
   10092             : {
   10093           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10094           0 :         PyObject *py_description;
   10095           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
   10096           0 :         return py_description;
   10097             : }
   10098             : 
   10099           0 : static int py_netr_DELTA_GROUP_set_description(PyObject *py_obj, PyObject *value, void *closure)
   10100             : {
   10101           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10102           0 :         if (value == NULL) {
   10103           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->description");
   10104           0 :                 return -1;
   10105             :         }
   10106           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10107           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10108           0 :                 PyErr_NoMemory();
   10109           0 :                 return -1;
   10110             :         }
   10111           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
   10112           0 :         return 0;
   10113             : }
   10114             : 
   10115           0 : static PyObject *py_netr_DELTA_GROUP_get_SecurityInformation(PyObject *obj, void *closure)
   10116             : {
   10117           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10118           0 :         PyObject *py_SecurityInformation;
   10119           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
   10120           0 :         return py_SecurityInformation;
   10121             : }
   10122             : 
   10123           0 : static int py_netr_DELTA_GROUP_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   10124             : {
   10125           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10126           0 :         if (value == NULL) {
   10127           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
   10128           0 :                 return -1;
   10129             :         }
   10130             :         {
   10131           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   10132           0 :                 if (PyLong_Check(value)) {
   10133           0 :                         unsigned long long test_var;
   10134           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10135           0 :                         if (PyErr_Occurred() != NULL) {
   10136           0 :                                 return -1;
   10137             :                         }
   10138           0 :                         if (test_var > uint_max) {
   10139           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10140             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10141           0 :                                 return -1;
   10142             :                         }
   10143           0 :                         object->SecurityInformation = test_var;
   10144             :                 } else {
   10145           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10146             :                           PyLong_Type.tp_name);
   10147           0 :                         return -1;
   10148             :                 }
   10149             :         }
   10150           0 :         return 0;
   10151             : }
   10152             : 
   10153           0 : static PyObject *py_netr_DELTA_GROUP_get_sdbuf(PyObject *obj, void *closure)
   10154             : {
   10155           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10156           0 :         PyObject *py_sdbuf;
   10157           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   10158           0 :         return py_sdbuf;
   10159             : }
   10160             : 
   10161           0 : static int py_netr_DELTA_GROUP_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   10162             : {
   10163           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10164           0 :         if (value == NULL) {
   10165           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
   10166           0 :                 return -1;
   10167             :         }
   10168           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   10169           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10170           0 :                 PyErr_NoMemory();
   10171           0 :                 return -1;
   10172             :         }
   10173           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   10174           0 :         return 0;
   10175             : }
   10176             : 
   10177           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown1(PyObject *obj, void *closure)
   10178             : {
   10179           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10180           0 :         PyObject *py_unknown1;
   10181           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   10182           0 :         return py_unknown1;
   10183             : }
   10184             : 
   10185           0 : static int py_netr_DELTA_GROUP_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   10186             : {
   10187           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10188           0 :         if (value == NULL) {
   10189           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   10190           0 :                 return -1;
   10191             :         }
   10192           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10193           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10194           0 :                 PyErr_NoMemory();
   10195           0 :                 return -1;
   10196             :         }
   10197           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10198           0 :         return 0;
   10199             : }
   10200             : 
   10201           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown2(PyObject *obj, void *closure)
   10202             : {
   10203           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10204           0 :         PyObject *py_unknown2;
   10205           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   10206           0 :         return py_unknown2;
   10207             : }
   10208             : 
   10209           0 : static int py_netr_DELTA_GROUP_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   10210             : {
   10211           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10212           0 :         if (value == NULL) {
   10213           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   10214           0 :                 return -1;
   10215             :         }
   10216           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10217           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10218           0 :                 PyErr_NoMemory();
   10219           0 :                 return -1;
   10220             :         }
   10221           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10222           0 :         return 0;
   10223             : }
   10224             : 
   10225           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown3(PyObject *obj, void *closure)
   10226             : {
   10227           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10228           0 :         PyObject *py_unknown3;
   10229           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   10230           0 :         return py_unknown3;
   10231             : }
   10232             : 
   10233           0 : static int py_netr_DELTA_GROUP_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   10234             : {
   10235           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10236           0 :         if (value == NULL) {
   10237           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   10238           0 :                 return -1;
   10239             :         }
   10240           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10241           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10242           0 :                 PyErr_NoMemory();
   10243           0 :                 return -1;
   10244             :         }
   10245           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10246           0 :         return 0;
   10247             : }
   10248             : 
   10249           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown4(PyObject *obj, void *closure)
   10250             : {
   10251           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10252           0 :         PyObject *py_unknown4;
   10253           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   10254           0 :         return py_unknown4;
   10255             : }
   10256             : 
   10257           0 : static int py_netr_DELTA_GROUP_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   10258             : {
   10259           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10260           0 :         if (value == NULL) {
   10261           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   10262           0 :                 return -1;
   10263             :         }
   10264           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10265           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10266           0 :                 PyErr_NoMemory();
   10267           0 :                 return -1;
   10268             :         }
   10269           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10270           0 :         return 0;
   10271             : }
   10272             : 
   10273           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown5(PyObject *obj, void *closure)
   10274             : {
   10275           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10276           0 :         PyObject *py_unknown5;
   10277           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
   10278           0 :         return py_unknown5;
   10279             : }
   10280             : 
   10281           0 : static int py_netr_DELTA_GROUP_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   10282             : {
   10283           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10284           0 :         if (value == NULL) {
   10285           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
   10286           0 :                 return -1;
   10287             :         }
   10288             :         {
   10289           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   10290           0 :                 if (PyLong_Check(value)) {
   10291           0 :                         unsigned long long test_var;
   10292           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10293           0 :                         if (PyErr_Occurred() != NULL) {
   10294           0 :                                 return -1;
   10295             :                         }
   10296           0 :                         if (test_var > uint_max) {
   10297           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10298             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10299           0 :                                 return -1;
   10300             :                         }
   10301           0 :                         object->unknown5 = test_var;
   10302             :                 } else {
   10303           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10304             :                           PyLong_Type.tp_name);
   10305           0 :                         return -1;
   10306             :                 }
   10307             :         }
   10308           0 :         return 0;
   10309             : }
   10310             : 
   10311           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown6(PyObject *obj, void *closure)
   10312             : {
   10313           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10314           0 :         PyObject *py_unknown6;
   10315           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
   10316           0 :         return py_unknown6;
   10317             : }
   10318             : 
   10319           0 : static int py_netr_DELTA_GROUP_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   10320             : {
   10321           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10322           0 :         if (value == NULL) {
   10323           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
   10324           0 :                 return -1;
   10325             :         }
   10326             :         {
   10327           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   10328           0 :                 if (PyLong_Check(value)) {
   10329           0 :                         unsigned long long test_var;
   10330           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10331           0 :                         if (PyErr_Occurred() != NULL) {
   10332           0 :                                 return -1;
   10333             :                         }
   10334           0 :                         if (test_var > uint_max) {
   10335           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10336             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10337           0 :                                 return -1;
   10338             :                         }
   10339           0 :                         object->unknown6 = test_var;
   10340             :                 } else {
   10341           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10342             :                           PyLong_Type.tp_name);
   10343           0 :                         return -1;
   10344             :                 }
   10345             :         }
   10346           0 :         return 0;
   10347             : }
   10348             : 
   10349           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown7(PyObject *obj, void *closure)
   10350             : {
   10351           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10352           0 :         PyObject *py_unknown7;
   10353           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
   10354           0 :         return py_unknown7;
   10355             : }
   10356             : 
   10357           0 : static int py_netr_DELTA_GROUP_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   10358             : {
   10359           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10360           0 :         if (value == NULL) {
   10361           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
   10362           0 :                 return -1;
   10363             :         }
   10364             :         {
   10365           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   10366           0 :                 if (PyLong_Check(value)) {
   10367           0 :                         unsigned long long test_var;
   10368           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10369           0 :                         if (PyErr_Occurred() != NULL) {
   10370           0 :                                 return -1;
   10371             :                         }
   10372           0 :                         if (test_var > uint_max) {
   10373           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10374             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10375           0 :                                 return -1;
   10376             :                         }
   10377           0 :                         object->unknown7 = test_var;
   10378             :                 } else {
   10379           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10380             :                           PyLong_Type.tp_name);
   10381           0 :                         return -1;
   10382             :                 }
   10383             :         }
   10384           0 :         return 0;
   10385             : }
   10386             : 
   10387           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown8(PyObject *obj, void *closure)
   10388             : {
   10389           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
   10390           0 :         PyObject *py_unknown8;
   10391           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
   10392           0 :         return py_unknown8;
   10393             : }
   10394             : 
   10395           0 : static int py_netr_DELTA_GROUP_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   10396             : {
   10397           0 :         struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
   10398           0 :         if (value == NULL) {
   10399           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
   10400           0 :                 return -1;
   10401             :         }
   10402             :         {
   10403           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   10404           0 :                 if (PyLong_Check(value)) {
   10405           0 :                         unsigned long long test_var;
   10406           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10407           0 :                         if (PyErr_Occurred() != NULL) {
   10408           0 :                                 return -1;
   10409             :                         }
   10410           0 :                         if (test_var > uint_max) {
   10411           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10412             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10413           0 :                                 return -1;
   10414             :                         }
   10415           0 :                         object->unknown8 = test_var;
   10416             :                 } else {
   10417           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10418             :                           PyLong_Type.tp_name);
   10419           0 :                         return -1;
   10420             :                 }
   10421             :         }
   10422           0 :         return 0;
   10423             : }
   10424             : 
   10425             : static PyGetSetDef py_netr_DELTA_GROUP_getsetters[] = {
   10426             :         {
   10427             :                 .name = discard_const_p(char, "group_name"),
   10428             :                 .get = py_netr_DELTA_GROUP_get_group_name,
   10429             :                 .set = py_netr_DELTA_GROUP_set_group_name,
   10430             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10431             :         },
   10432             :         {
   10433             :                 .name = discard_const_p(char, "rid"),
   10434             :                 .get = py_netr_DELTA_GROUP_get_rid,
   10435             :                 .set = py_netr_DELTA_GROUP_set_rid,
   10436             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10437             :         },
   10438             :         {
   10439             :                 .name = discard_const_p(char, "attributes"),
   10440             :                 .get = py_netr_DELTA_GROUP_get_attributes,
   10441             :                 .set = py_netr_DELTA_GROUP_set_attributes,
   10442             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10443             :         },
   10444             :         {
   10445             :                 .name = discard_const_p(char, "description"),
   10446             :                 .get = py_netr_DELTA_GROUP_get_description,
   10447             :                 .set = py_netr_DELTA_GROUP_set_description,
   10448             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10449             :         },
   10450             :         {
   10451             :                 .name = discard_const_p(char, "SecurityInformation"),
   10452             :                 .get = py_netr_DELTA_GROUP_get_SecurityInformation,
   10453             :                 .set = py_netr_DELTA_GROUP_set_SecurityInformation,
   10454             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10455             :         },
   10456             :         {
   10457             :                 .name = discard_const_p(char, "sdbuf"),
   10458             :                 .get = py_netr_DELTA_GROUP_get_sdbuf,
   10459             :                 .set = py_netr_DELTA_GROUP_set_sdbuf,
   10460             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   10461             :         },
   10462             :         {
   10463             :                 .name = discard_const_p(char, "unknown1"),
   10464             :                 .get = py_netr_DELTA_GROUP_get_unknown1,
   10465             :                 .set = py_netr_DELTA_GROUP_set_unknown1,
   10466             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10467             :         },
   10468             :         {
   10469             :                 .name = discard_const_p(char, "unknown2"),
   10470             :                 .get = py_netr_DELTA_GROUP_get_unknown2,
   10471             :                 .set = py_netr_DELTA_GROUP_set_unknown2,
   10472             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10473             :         },
   10474             :         {
   10475             :                 .name = discard_const_p(char, "unknown3"),
   10476             :                 .get = py_netr_DELTA_GROUP_get_unknown3,
   10477             :                 .set = py_netr_DELTA_GROUP_set_unknown3,
   10478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10479             :         },
   10480             :         {
   10481             :                 .name = discard_const_p(char, "unknown4"),
   10482             :                 .get = py_netr_DELTA_GROUP_get_unknown4,
   10483             :                 .set = py_netr_DELTA_GROUP_set_unknown4,
   10484             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10485             :         },
   10486             :         {
   10487             :                 .name = discard_const_p(char, "unknown5"),
   10488             :                 .get = py_netr_DELTA_GROUP_get_unknown5,
   10489             :                 .set = py_netr_DELTA_GROUP_set_unknown5,
   10490             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10491             :         },
   10492             :         {
   10493             :                 .name = discard_const_p(char, "unknown6"),
   10494             :                 .get = py_netr_DELTA_GROUP_get_unknown6,
   10495             :                 .set = py_netr_DELTA_GROUP_set_unknown6,
   10496             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10497             :         },
   10498             :         {
   10499             :                 .name = discard_const_p(char, "unknown7"),
   10500             :                 .get = py_netr_DELTA_GROUP_get_unknown7,
   10501             :                 .set = py_netr_DELTA_GROUP_set_unknown7,
   10502             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10503             :         },
   10504             :         {
   10505             :                 .name = discard_const_p(char, "unknown8"),
   10506             :                 .get = py_netr_DELTA_GROUP_get_unknown8,
   10507             :                 .set = py_netr_DELTA_GROUP_set_unknown8,
   10508             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10509             :         },
   10510             :         { .name = NULL }
   10511             : };
   10512             : 
   10513           0 : static PyObject *py_netr_DELTA_GROUP_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10514             : {
   10515           0 :         return pytalloc_new(struct netr_DELTA_GROUP, type);
   10516             : }
   10517             : 
   10518             : 
   10519             : static PyTypeObject netr_DELTA_GROUP_Type = {
   10520             :         PyVarObject_HEAD_INIT(NULL, 0)
   10521             :         .tp_name = "netlogon.netr_DELTA_GROUP",
   10522             :         .tp_getset = py_netr_DELTA_GROUP_getsetters,
   10523             :         .tp_methods = NULL,
   10524             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10525             :         .tp_new = py_netr_DELTA_GROUP_new,
   10526             : };
   10527             : 
   10528             : 
   10529           0 : static PyObject *py_netr_DELTA_RENAME_get_OldName(PyObject *obj, void *closure)
   10530             : {
   10531           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10532           0 :         PyObject *py_OldName;
   10533           0 :         py_OldName = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->OldName);
   10534           0 :         return py_OldName;
   10535             : }
   10536             : 
   10537           0 : static int py_netr_DELTA_RENAME_set_OldName(PyObject *py_obj, PyObject *value, void *closure)
   10538             : {
   10539           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10540           0 :         if (value == NULL) {
   10541           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->OldName");
   10542           0 :                 return -1;
   10543             :         }
   10544           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10545           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10546           0 :                 PyErr_NoMemory();
   10547           0 :                 return -1;
   10548             :         }
   10549           0 :         object->OldName = *(struct lsa_String *)pytalloc_get_ptr(value);
   10550           0 :         return 0;
   10551             : }
   10552             : 
   10553           0 : static PyObject *py_netr_DELTA_RENAME_get_NewName(PyObject *obj, void *closure)
   10554             : {
   10555           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10556           0 :         PyObject *py_NewName;
   10557           0 :         py_NewName = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->NewName);
   10558           0 :         return py_NewName;
   10559             : }
   10560             : 
   10561           0 : static int py_netr_DELTA_RENAME_set_NewName(PyObject *py_obj, PyObject *value, void *closure)
   10562             : {
   10563           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10564           0 :         if (value == NULL) {
   10565           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->NewName");
   10566           0 :                 return -1;
   10567             :         }
   10568           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10569           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10570           0 :                 PyErr_NoMemory();
   10571           0 :                 return -1;
   10572             :         }
   10573           0 :         object->NewName = *(struct lsa_String *)pytalloc_get_ptr(value);
   10574           0 :         return 0;
   10575             : }
   10576             : 
   10577           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown1(PyObject *obj, void *closure)
   10578             : {
   10579           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10580           0 :         PyObject *py_unknown1;
   10581           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   10582           0 :         return py_unknown1;
   10583             : }
   10584             : 
   10585           0 : static int py_netr_DELTA_RENAME_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   10586             : {
   10587           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10588           0 :         if (value == NULL) {
   10589           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   10590           0 :                 return -1;
   10591             :         }
   10592           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10593           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10594           0 :                 PyErr_NoMemory();
   10595           0 :                 return -1;
   10596             :         }
   10597           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10598           0 :         return 0;
   10599             : }
   10600             : 
   10601           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown2(PyObject *obj, void *closure)
   10602             : {
   10603           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10604           0 :         PyObject *py_unknown2;
   10605           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   10606           0 :         return py_unknown2;
   10607             : }
   10608             : 
   10609           0 : static int py_netr_DELTA_RENAME_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   10610             : {
   10611           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10612           0 :         if (value == NULL) {
   10613           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   10614           0 :                 return -1;
   10615             :         }
   10616           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10617           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10618           0 :                 PyErr_NoMemory();
   10619           0 :                 return -1;
   10620             :         }
   10621           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10622           0 :         return 0;
   10623             : }
   10624             : 
   10625           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown3(PyObject *obj, void *closure)
   10626             : {
   10627           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10628           0 :         PyObject *py_unknown3;
   10629           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   10630           0 :         return py_unknown3;
   10631             : }
   10632             : 
   10633           0 : static int py_netr_DELTA_RENAME_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   10634             : {
   10635           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10636           0 :         if (value == NULL) {
   10637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   10638           0 :                 return -1;
   10639             :         }
   10640           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10641           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10642           0 :                 PyErr_NoMemory();
   10643           0 :                 return -1;
   10644             :         }
   10645           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10646           0 :         return 0;
   10647             : }
   10648             : 
   10649           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown4(PyObject *obj, void *closure)
   10650             : {
   10651           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10652           0 :         PyObject *py_unknown4;
   10653           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   10654           0 :         return py_unknown4;
   10655             : }
   10656             : 
   10657           0 : static int py_netr_DELTA_RENAME_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   10658             : {
   10659           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10660           0 :         if (value == NULL) {
   10661           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   10662           0 :                 return -1;
   10663             :         }
   10664           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10665           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10666           0 :                 PyErr_NoMemory();
   10667           0 :                 return -1;
   10668             :         }
   10669           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10670           0 :         return 0;
   10671             : }
   10672             : 
   10673           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown5(PyObject *obj, void *closure)
   10674             : {
   10675           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10676           0 :         PyObject *py_unknown5;
   10677           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
   10678           0 :         return py_unknown5;
   10679             : }
   10680             : 
   10681           0 : static int py_netr_DELTA_RENAME_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   10682             : {
   10683           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10684           0 :         if (value == NULL) {
   10685           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
   10686           0 :                 return -1;
   10687             :         }
   10688             :         {
   10689           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   10690           0 :                 if (PyLong_Check(value)) {
   10691           0 :                         unsigned long long test_var;
   10692           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10693           0 :                         if (PyErr_Occurred() != NULL) {
   10694           0 :                                 return -1;
   10695             :                         }
   10696           0 :                         if (test_var > uint_max) {
   10697           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10698             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10699           0 :                                 return -1;
   10700             :                         }
   10701           0 :                         object->unknown5 = test_var;
   10702             :                 } else {
   10703           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10704             :                           PyLong_Type.tp_name);
   10705           0 :                         return -1;
   10706             :                 }
   10707             :         }
   10708           0 :         return 0;
   10709             : }
   10710             : 
   10711           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown6(PyObject *obj, void *closure)
   10712             : {
   10713           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10714           0 :         PyObject *py_unknown6;
   10715           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
   10716           0 :         return py_unknown6;
   10717             : }
   10718             : 
   10719           0 : static int py_netr_DELTA_RENAME_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   10720             : {
   10721           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10722           0 :         if (value == NULL) {
   10723           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
   10724           0 :                 return -1;
   10725             :         }
   10726             :         {
   10727           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   10728           0 :                 if (PyLong_Check(value)) {
   10729           0 :                         unsigned long long test_var;
   10730           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10731           0 :                         if (PyErr_Occurred() != NULL) {
   10732           0 :                                 return -1;
   10733             :                         }
   10734           0 :                         if (test_var > uint_max) {
   10735           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10736             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10737           0 :                                 return -1;
   10738             :                         }
   10739           0 :                         object->unknown6 = test_var;
   10740             :                 } else {
   10741           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10742             :                           PyLong_Type.tp_name);
   10743           0 :                         return -1;
   10744             :                 }
   10745             :         }
   10746           0 :         return 0;
   10747             : }
   10748             : 
   10749           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown7(PyObject *obj, void *closure)
   10750             : {
   10751           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10752           0 :         PyObject *py_unknown7;
   10753           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
   10754           0 :         return py_unknown7;
   10755             : }
   10756             : 
   10757           0 : static int py_netr_DELTA_RENAME_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   10758             : {
   10759           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10760           0 :         if (value == NULL) {
   10761           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
   10762           0 :                 return -1;
   10763             :         }
   10764             :         {
   10765           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   10766           0 :                 if (PyLong_Check(value)) {
   10767           0 :                         unsigned long long test_var;
   10768           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10769           0 :                         if (PyErr_Occurred() != NULL) {
   10770           0 :                                 return -1;
   10771             :                         }
   10772           0 :                         if (test_var > uint_max) {
   10773           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10774             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10775           0 :                                 return -1;
   10776             :                         }
   10777           0 :                         object->unknown7 = test_var;
   10778             :                 } else {
   10779           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10780             :                           PyLong_Type.tp_name);
   10781           0 :                         return -1;
   10782             :                 }
   10783             :         }
   10784           0 :         return 0;
   10785             : }
   10786             : 
   10787           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown8(PyObject *obj, void *closure)
   10788             : {
   10789           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
   10790           0 :         PyObject *py_unknown8;
   10791           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
   10792           0 :         return py_unknown8;
   10793             : }
   10794             : 
   10795           0 : static int py_netr_DELTA_RENAME_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   10796             : {
   10797           0 :         struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
   10798           0 :         if (value == NULL) {
   10799           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
   10800           0 :                 return -1;
   10801             :         }
   10802             :         {
   10803           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   10804           0 :                 if (PyLong_Check(value)) {
   10805           0 :                         unsigned long long test_var;
   10806           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10807           0 :                         if (PyErr_Occurred() != NULL) {
   10808           0 :                                 return -1;
   10809             :                         }
   10810           0 :                         if (test_var > uint_max) {
   10811           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10812             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10813           0 :                                 return -1;
   10814             :                         }
   10815           0 :                         object->unknown8 = test_var;
   10816             :                 } else {
   10817           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10818             :                           PyLong_Type.tp_name);
   10819           0 :                         return -1;
   10820             :                 }
   10821             :         }
   10822           0 :         return 0;
   10823             : }
   10824             : 
   10825             : static PyGetSetDef py_netr_DELTA_RENAME_getsetters[] = {
   10826             :         {
   10827             :                 .name = discard_const_p(char, "OldName"),
   10828             :                 .get = py_netr_DELTA_RENAME_get_OldName,
   10829             :                 .set = py_netr_DELTA_RENAME_set_OldName,
   10830             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10831             :         },
   10832             :         {
   10833             :                 .name = discard_const_p(char, "NewName"),
   10834             :                 .get = py_netr_DELTA_RENAME_get_NewName,
   10835             :                 .set = py_netr_DELTA_RENAME_set_NewName,
   10836             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10837             :         },
   10838             :         {
   10839             :                 .name = discard_const_p(char, "unknown1"),
   10840             :                 .get = py_netr_DELTA_RENAME_get_unknown1,
   10841             :                 .set = py_netr_DELTA_RENAME_set_unknown1,
   10842             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10843             :         },
   10844             :         {
   10845             :                 .name = discard_const_p(char, "unknown2"),
   10846             :                 .get = py_netr_DELTA_RENAME_get_unknown2,
   10847             :                 .set = py_netr_DELTA_RENAME_set_unknown2,
   10848             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10849             :         },
   10850             :         {
   10851             :                 .name = discard_const_p(char, "unknown3"),
   10852             :                 .get = py_netr_DELTA_RENAME_get_unknown3,
   10853             :                 .set = py_netr_DELTA_RENAME_set_unknown3,
   10854             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10855             :         },
   10856             :         {
   10857             :                 .name = discard_const_p(char, "unknown4"),
   10858             :                 .get = py_netr_DELTA_RENAME_get_unknown4,
   10859             :                 .set = py_netr_DELTA_RENAME_set_unknown4,
   10860             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10861             :         },
   10862             :         {
   10863             :                 .name = discard_const_p(char, "unknown5"),
   10864             :                 .get = py_netr_DELTA_RENAME_get_unknown5,
   10865             :                 .set = py_netr_DELTA_RENAME_set_unknown5,
   10866             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10867             :         },
   10868             :         {
   10869             :                 .name = discard_const_p(char, "unknown6"),
   10870             :                 .get = py_netr_DELTA_RENAME_get_unknown6,
   10871             :                 .set = py_netr_DELTA_RENAME_set_unknown6,
   10872             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10873             :         },
   10874             :         {
   10875             :                 .name = discard_const_p(char, "unknown7"),
   10876             :                 .get = py_netr_DELTA_RENAME_get_unknown7,
   10877             :                 .set = py_netr_DELTA_RENAME_set_unknown7,
   10878             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10879             :         },
   10880             :         {
   10881             :                 .name = discard_const_p(char, "unknown8"),
   10882             :                 .get = py_netr_DELTA_RENAME_get_unknown8,
   10883             :                 .set = py_netr_DELTA_RENAME_set_unknown8,
   10884             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10885             :         },
   10886             :         { .name = NULL }
   10887             : };
   10888             : 
   10889           0 : static PyObject *py_netr_DELTA_RENAME_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10890             : {
   10891           0 :         return pytalloc_new(struct netr_DELTA_RENAME, type);
   10892             : }
   10893             : 
   10894             : 
   10895             : static PyTypeObject netr_DELTA_RENAME_Type = {
   10896             :         PyVarObject_HEAD_INIT(NULL, 0)
   10897             :         .tp_name = "netlogon.netr_DELTA_RENAME",
   10898             :         .tp_getset = py_netr_DELTA_RENAME_getsetters,
   10899             :         .tp_methods = NULL,
   10900             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10901             :         .tp_new = py_netr_DELTA_RENAME_new,
   10902             : };
   10903             : 
   10904             : 
   10905           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_rids(PyObject *obj, void *closure)
   10906             : {
   10907           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
   10908           0 :         PyObject *py_rids;
   10909           0 :         if (object->rids == NULL) {
   10910           0 :                 Py_RETURN_NONE;
   10911             :         }
   10912           0 :         if (object->rids == NULL) {
   10913           0 :                 py_rids = Py_None;
   10914           0 :                 Py_INCREF(py_rids);
   10915             :         } else {
   10916           0 :                 py_rids = PyList_New(object->num_rids);
   10917           0 :                 if (py_rids == NULL) {
   10918           0 :                         return NULL;
   10919             :                 }
   10920             :                 {
   10921             :                         int rids_cntr_1;
   10922           0 :                         for (rids_cntr_1 = 0; rids_cntr_1 < (object->num_rids); rids_cntr_1++) {
   10923           0 :                                 PyObject *py_rids_1;
   10924           0 :                                 py_rids_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->rids)[rids_cntr_1]));
   10925           0 :                                 PyList_SetItem(py_rids, rids_cntr_1, py_rids_1);
   10926             :                         }
   10927             :                 }
   10928             :         }
   10929           0 :         return py_rids;
   10930             : }
   10931             : 
   10932           0 : static int py_netr_DELTA_GROUP_MEMBER_set_rids(PyObject *py_obj, PyObject *value, void *closure)
   10933             : {
   10934           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
   10935           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->rids));
   10936           0 :         if (value == NULL) {
   10937           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rids");
   10938           0 :                 return -1;
   10939             :         }
   10940           0 :         if (value == Py_None) {
   10941           0 :                 object->rids = NULL;
   10942             :         } else {
   10943           0 :                 object->rids = NULL;
   10944           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10945             :                 {
   10946           0 :                         int rids_cntr_1;
   10947           0 :                         object->rids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->rids, PyList_GET_SIZE(value));
   10948           0 :                         if (!object->rids) { return -1; }
   10949           0 :                         talloc_set_name_const(object->rids, "ARRAY: object->rids");
   10950           0 :                         for (rids_cntr_1 = 0; rids_cntr_1 < PyList_GET_SIZE(value); rids_cntr_1++) {
   10951           0 :                                 if (PyList_GET_ITEM(value, rids_cntr_1) == NULL) {
   10952           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->rids)[rids_cntr_1]");
   10953           0 :                                         return -1;
   10954             :                                 }
   10955             :                                 {
   10956           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->rids)[rids_cntr_1]));
   10957           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, rids_cntr_1))) {
   10958           0 :                                                 unsigned long long test_var;
   10959           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, rids_cntr_1));
   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->rids)[rids_cntr_1] = 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             :                         }
   10976             :                 }
   10977             :         }
   10978           0 :         return 0;
   10979             : }
   10980             : 
   10981           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_attribs(PyObject *obj, void *closure)
   10982             : {
   10983           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
   10984           0 :         PyObject *py_attribs;
   10985           0 :         if (object->attribs == NULL) {
   10986           0 :                 Py_RETURN_NONE;
   10987             :         }
   10988           0 :         if (object->attribs == NULL) {
   10989           0 :                 py_attribs = Py_None;
   10990           0 :                 Py_INCREF(py_attribs);
   10991             :         } else {
   10992           0 :                 py_attribs = PyList_New(object->num_rids);
   10993           0 :                 if (py_attribs == NULL) {
   10994           0 :                         return NULL;
   10995             :                 }
   10996             :                 {
   10997             :                         int attribs_cntr_1;
   10998           0 :                         for (attribs_cntr_1 = 0; attribs_cntr_1 < (object->num_rids); attribs_cntr_1++) {
   10999           0 :                                 PyObject *py_attribs_1;
   11000           0 :                                 py_attribs_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->attribs)[attribs_cntr_1]));
   11001           0 :                                 PyList_SetItem(py_attribs, attribs_cntr_1, py_attribs_1);
   11002             :                         }
   11003             :                 }
   11004             :         }
   11005           0 :         return py_attribs;
   11006             : }
   11007             : 
   11008           0 : static int py_netr_DELTA_GROUP_MEMBER_set_attribs(PyObject *py_obj, PyObject *value, void *closure)
   11009             : {
   11010           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
   11011           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->attribs));
   11012           0 :         if (value == NULL) {
   11013           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->attribs");
   11014           0 :                 return -1;
   11015             :         }
   11016           0 :         if (value == Py_None) {
   11017           0 :                 object->attribs = NULL;
   11018             :         } else {
   11019           0 :                 object->attribs = NULL;
   11020           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   11021             :                 {
   11022           0 :                         int attribs_cntr_1;
   11023           0 :                         object->attribs = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->attribs, PyList_GET_SIZE(value));
   11024           0 :                         if (!object->attribs) { return -1; }
   11025           0 :                         talloc_set_name_const(object->attribs, "ARRAY: object->attribs");
   11026           0 :                         for (attribs_cntr_1 = 0; attribs_cntr_1 < PyList_GET_SIZE(value); attribs_cntr_1++) {
   11027           0 :                                 if (PyList_GET_ITEM(value, attribs_cntr_1) == NULL) {
   11028           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->attribs)[attribs_cntr_1]");
   11029           0 :                                         return -1;
   11030             :                                 }
   11031             :                                 {
   11032           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->attribs)[attribs_cntr_1]));
   11033           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, attribs_cntr_1))) {
   11034           0 :                                                 unsigned long long test_var;
   11035           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, attribs_cntr_1));
   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->attribs)[attribs_cntr_1] = 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             :                         }
   11052             :                 }
   11053             :         }
   11054           0 :         return 0;
   11055             : }
   11056             : 
   11057           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_num_rids(PyObject *obj, void *closure)
   11058             : {
   11059           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
   11060           0 :         PyObject *py_num_rids;
   11061           0 :         py_num_rids = PyLong_FromUnsignedLongLong((uint32_t)(object->num_rids));
   11062           0 :         return py_num_rids;
   11063             : }
   11064             : 
   11065           0 : static int py_netr_DELTA_GROUP_MEMBER_set_num_rids(PyObject *py_obj, PyObject *value, void *closure)
   11066             : {
   11067           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
   11068           0 :         if (value == NULL) {
   11069           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_rids");
   11070           0 :                 return -1;
   11071             :         }
   11072             :         {
   11073           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_rids));
   11074           0 :                 if (PyLong_Check(value)) {
   11075           0 :                         unsigned long long test_var;
   11076           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11077           0 :                         if (PyErr_Occurred() != NULL) {
   11078           0 :                                 return -1;
   11079             :                         }
   11080           0 :                         if (test_var > uint_max) {
   11081           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11082             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11083           0 :                                 return -1;
   11084             :                         }
   11085           0 :                         object->num_rids = test_var;
   11086             :                 } else {
   11087           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11088             :                           PyLong_Type.tp_name);
   11089           0 :                         return -1;
   11090             :                 }
   11091             :         }
   11092           0 :         return 0;
   11093             : }
   11094             : 
   11095           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown1(PyObject *obj, void *closure)
   11096             : {
   11097           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
   11098           0 :         PyObject *py_unknown1;
   11099           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
   11100           0 :         return py_unknown1;
   11101             : }
   11102             : 
   11103           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   11104             : {
   11105           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
   11106           0 :         if (value == NULL) {
   11107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   11108           0 :                 return -1;
   11109             :         }
   11110             :         {
   11111           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   11112           0 :                 if (PyLong_Check(value)) {
   11113           0 :                         unsigned long long test_var;
   11114           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11115           0 :                         if (PyErr_Occurred() != NULL) {
   11116           0 :                                 return -1;
   11117             :                         }
   11118           0 :                         if (test_var > uint_max) {
   11119           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11120             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11121           0 :                                 return -1;
   11122             :                         }
   11123           0 :                         object->unknown1 = test_var;
   11124             :                 } else {
   11125           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11126             :                           PyLong_Type.tp_name);
   11127           0 :                         return -1;
   11128             :                 }
   11129             :         }
   11130           0 :         return 0;
   11131             : }
   11132             : 
   11133           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown2(PyObject *obj, void *closure)
   11134             : {
   11135           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
   11136           0 :         PyObject *py_unknown2;
   11137           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown2));
   11138           0 :         return py_unknown2;
   11139             : }
   11140             : 
   11141           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   11142             : {
   11143           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
   11144           0 :         if (value == NULL) {
   11145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   11146           0 :                 return -1;
   11147             :         }
   11148             :         {
   11149           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   11150           0 :                 if (PyLong_Check(value)) {
   11151           0 :                         unsigned long long test_var;
   11152           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11153           0 :                         if (PyErr_Occurred() != NULL) {
   11154           0 :                                 return -1;
   11155             :                         }
   11156           0 :                         if (test_var > uint_max) {
   11157           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11158             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11159           0 :                                 return -1;
   11160             :                         }
   11161           0 :                         object->unknown2 = test_var;
   11162             :                 } else {
   11163           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11164             :                           PyLong_Type.tp_name);
   11165           0 :                         return -1;
   11166             :                 }
   11167             :         }
   11168           0 :         return 0;
   11169             : }
   11170             : 
   11171           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown3(PyObject *obj, void *closure)
   11172             : {
   11173           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
   11174           0 :         PyObject *py_unknown3;
   11175           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown3));
   11176           0 :         return py_unknown3;
   11177             : }
   11178             : 
   11179           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   11180             : {
   11181           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
   11182           0 :         if (value == NULL) {
   11183           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   11184           0 :                 return -1;
   11185             :         }
   11186             :         {
   11187           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   11188           0 :                 if (PyLong_Check(value)) {
   11189           0 :                         unsigned long long test_var;
   11190           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11191           0 :                         if (PyErr_Occurred() != NULL) {
   11192           0 :                                 return -1;
   11193             :                         }
   11194           0 :                         if (test_var > uint_max) {
   11195           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11196             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11197           0 :                                 return -1;
   11198             :                         }
   11199           0 :                         object->unknown3 = test_var;
   11200             :                 } else {
   11201           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11202             :                           PyLong_Type.tp_name);
   11203           0 :                         return -1;
   11204             :                 }
   11205             :         }
   11206           0 :         return 0;
   11207             : }
   11208             : 
   11209           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown4(PyObject *obj, void *closure)
   11210             : {
   11211           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
   11212           0 :         PyObject *py_unknown4;
   11213           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown4));
   11214           0 :         return py_unknown4;
   11215             : }
   11216             : 
   11217           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   11218             : {
   11219           0 :         struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
   11220           0 :         if (value == NULL) {
   11221           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   11222           0 :                 return -1;
   11223             :         }
   11224             :         {
   11225           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   11226           0 :                 if (PyLong_Check(value)) {
   11227           0 :                         unsigned long long test_var;
   11228           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11229           0 :                         if (PyErr_Occurred() != NULL) {
   11230           0 :                                 return -1;
   11231             :                         }
   11232           0 :                         if (test_var > uint_max) {
   11233           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11234             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11235           0 :                                 return -1;
   11236             :                         }
   11237           0 :                         object->unknown4 = test_var;
   11238             :                 } else {
   11239           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11240             :                           PyLong_Type.tp_name);
   11241           0 :                         return -1;
   11242             :                 }
   11243             :         }
   11244           0 :         return 0;
   11245             : }
   11246             : 
   11247             : static PyGetSetDef py_netr_DELTA_GROUP_MEMBER_getsetters[] = {
   11248             :         {
   11249             :                 .name = discard_const_p(char, "rids"),
   11250             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_rids,
   11251             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_rids,
   11252             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11253             :         },
   11254             :         {
   11255             :                 .name = discard_const_p(char, "attribs"),
   11256             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_attribs,
   11257             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_attribs,
   11258             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11259             :         },
   11260             :         {
   11261             :                 .name = discard_const_p(char, "num_rids"),
   11262             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_num_rids,
   11263             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_num_rids,
   11264             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11265             :         },
   11266             :         {
   11267             :                 .name = discard_const_p(char, "unknown1"),
   11268             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown1,
   11269             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown1,
   11270             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11271             :         },
   11272             :         {
   11273             :                 .name = discard_const_p(char, "unknown2"),
   11274             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown2,
   11275             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown2,
   11276             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11277             :         },
   11278             :         {
   11279             :                 .name = discard_const_p(char, "unknown3"),
   11280             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown3,
   11281             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown3,
   11282             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11283             :         },
   11284             :         {
   11285             :                 .name = discard_const_p(char, "unknown4"),
   11286             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown4,
   11287             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown4,
   11288             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11289             :         },
   11290             :         { .name = NULL }
   11291             : };
   11292             : 
   11293           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11294             : {
   11295           0 :         return pytalloc_new(struct netr_DELTA_GROUP_MEMBER, type);
   11296             : }
   11297             : 
   11298             : 
   11299             : static PyTypeObject netr_DELTA_GROUP_MEMBER_Type = {
   11300             :         PyVarObject_HEAD_INIT(NULL, 0)
   11301             :         .tp_name = "netlogon.netr_DELTA_GROUP_MEMBER",
   11302             :         .tp_getset = py_netr_DELTA_GROUP_MEMBER_getsetters,
   11303             :         .tp_methods = NULL,
   11304             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11305             :         .tp_new = py_netr_DELTA_GROUP_MEMBER_new,
   11306             : };
   11307             : 
   11308             : 
   11309           0 : static PyObject *py_netr_DELTA_ALIAS_get_alias_name(PyObject *obj, void *closure)
   11310             : {
   11311           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11312           0 :         PyObject *py_alias_name;
   11313           0 :         py_alias_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->alias_name);
   11314           0 :         return py_alias_name;
   11315             : }
   11316             : 
   11317           0 : static int py_netr_DELTA_ALIAS_set_alias_name(PyObject *py_obj, PyObject *value, void *closure)
   11318             : {
   11319           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11320           0 :         if (value == NULL) {
   11321           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alias_name");
   11322           0 :                 return -1;
   11323             :         }
   11324           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11325           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11326           0 :                 PyErr_NoMemory();
   11327           0 :                 return -1;
   11328             :         }
   11329           0 :         object->alias_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   11330           0 :         return 0;
   11331             : }
   11332             : 
   11333           0 : static PyObject *py_netr_DELTA_ALIAS_get_rid(PyObject *obj, void *closure)
   11334             : {
   11335           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11336           0 :         PyObject *py_rid;
   11337           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->rid));
   11338           0 :         return py_rid;
   11339             : }
   11340             : 
   11341           0 : static int py_netr_DELTA_ALIAS_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   11342             : {
   11343           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11344           0 :         if (value == NULL) {
   11345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rid");
   11346           0 :                 return -1;
   11347             :         }
   11348             :         {
   11349           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
   11350           0 :                 if (PyLong_Check(value)) {
   11351           0 :                         unsigned long long test_var;
   11352           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11353           0 :                         if (PyErr_Occurred() != NULL) {
   11354           0 :                                 return -1;
   11355             :                         }
   11356           0 :                         if (test_var > uint_max) {
   11357           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11358             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11359           0 :                                 return -1;
   11360             :                         }
   11361           0 :                         object->rid = test_var;
   11362             :                 } else {
   11363           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11364             :                           PyLong_Type.tp_name);
   11365           0 :                         return -1;
   11366             :                 }
   11367             :         }
   11368           0 :         return 0;
   11369             : }
   11370             : 
   11371           0 : static PyObject *py_netr_DELTA_ALIAS_get_SecurityInformation(PyObject *obj, void *closure)
   11372             : {
   11373           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11374           0 :         PyObject *py_SecurityInformation;
   11375           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
   11376           0 :         return py_SecurityInformation;
   11377             : }
   11378             : 
   11379           0 : static int py_netr_DELTA_ALIAS_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   11380             : {
   11381           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11382           0 :         if (value == NULL) {
   11383           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
   11384           0 :                 return -1;
   11385             :         }
   11386             :         {
   11387           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   11388           0 :                 if (PyLong_Check(value)) {
   11389           0 :                         unsigned long long test_var;
   11390           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11391           0 :                         if (PyErr_Occurred() != NULL) {
   11392           0 :                                 return -1;
   11393             :                         }
   11394           0 :                         if (test_var > uint_max) {
   11395           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11396             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11397           0 :                                 return -1;
   11398             :                         }
   11399           0 :                         object->SecurityInformation = test_var;
   11400             :                 } else {
   11401           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11402             :                           PyLong_Type.tp_name);
   11403           0 :                         return -1;
   11404             :                 }
   11405             :         }
   11406           0 :         return 0;
   11407             : }
   11408             : 
   11409           0 : static PyObject *py_netr_DELTA_ALIAS_get_sdbuf(PyObject *obj, void *closure)
   11410             : {
   11411           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11412           0 :         PyObject *py_sdbuf;
   11413           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   11414           0 :         return py_sdbuf;
   11415             : }
   11416             : 
   11417           0 : static int py_netr_DELTA_ALIAS_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   11418             : {
   11419           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11420           0 :         if (value == NULL) {
   11421           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
   11422           0 :                 return -1;
   11423             :         }
   11424           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   11425           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11426           0 :                 PyErr_NoMemory();
   11427           0 :                 return -1;
   11428             :         }
   11429           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   11430           0 :         return 0;
   11431             : }
   11432             : 
   11433           0 : static PyObject *py_netr_DELTA_ALIAS_get_description(PyObject *obj, void *closure)
   11434             : {
   11435           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11436           0 :         PyObject *py_description;
   11437           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
   11438           0 :         return py_description;
   11439             : }
   11440             : 
   11441           0 : static int py_netr_DELTA_ALIAS_set_description(PyObject *py_obj, PyObject *value, void *closure)
   11442             : {
   11443           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11444           0 :         if (value == NULL) {
   11445           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->description");
   11446           0 :                 return -1;
   11447             :         }
   11448           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11449           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11450           0 :                 PyErr_NoMemory();
   11451           0 :                 return -1;
   11452             :         }
   11453           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
   11454           0 :         return 0;
   11455             : }
   11456             : 
   11457           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown2(PyObject *obj, void *closure)
   11458             : {
   11459           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11460           0 :         PyObject *py_unknown2;
   11461           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   11462           0 :         return py_unknown2;
   11463             : }
   11464             : 
   11465           0 : static int py_netr_DELTA_ALIAS_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   11466             : {
   11467           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11468           0 :         if (value == NULL) {
   11469           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   11470           0 :                 return -1;
   11471             :         }
   11472           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11473           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11474           0 :                 PyErr_NoMemory();
   11475           0 :                 return -1;
   11476             :         }
   11477           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   11478           0 :         return 0;
   11479             : }
   11480             : 
   11481           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown3(PyObject *obj, void *closure)
   11482             : {
   11483           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11484           0 :         PyObject *py_unknown3;
   11485           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   11486           0 :         return py_unknown3;
   11487             : }
   11488             : 
   11489           0 : static int py_netr_DELTA_ALIAS_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   11490             : {
   11491           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11492           0 :         if (value == NULL) {
   11493           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   11494           0 :                 return -1;
   11495             :         }
   11496           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11497           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11498           0 :                 PyErr_NoMemory();
   11499           0 :                 return -1;
   11500             :         }
   11501           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   11502           0 :         return 0;
   11503             : }
   11504             : 
   11505           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown4(PyObject *obj, void *closure)
   11506             : {
   11507           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11508           0 :         PyObject *py_unknown4;
   11509           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   11510           0 :         return py_unknown4;
   11511             : }
   11512             : 
   11513           0 : static int py_netr_DELTA_ALIAS_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   11514             : {
   11515           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11516           0 :         if (value == NULL) {
   11517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   11518           0 :                 return -1;
   11519             :         }
   11520           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11521           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11522           0 :                 PyErr_NoMemory();
   11523           0 :                 return -1;
   11524             :         }
   11525           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   11526           0 :         return 0;
   11527             : }
   11528             : 
   11529           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown5(PyObject *obj, void *closure)
   11530             : {
   11531           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11532           0 :         PyObject *py_unknown5;
   11533           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
   11534           0 :         return py_unknown5;
   11535             : }
   11536             : 
   11537           0 : static int py_netr_DELTA_ALIAS_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   11538             : {
   11539           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11540           0 :         if (value == NULL) {
   11541           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
   11542           0 :                 return -1;
   11543             :         }
   11544             :         {
   11545           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   11546           0 :                 if (PyLong_Check(value)) {
   11547           0 :                         unsigned long long test_var;
   11548           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11549           0 :                         if (PyErr_Occurred() != NULL) {
   11550           0 :                                 return -1;
   11551             :                         }
   11552           0 :                         if (test_var > uint_max) {
   11553           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11554             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11555           0 :                                 return -1;
   11556             :                         }
   11557           0 :                         object->unknown5 = test_var;
   11558             :                 } else {
   11559           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11560             :                           PyLong_Type.tp_name);
   11561           0 :                         return -1;
   11562             :                 }
   11563             :         }
   11564           0 :         return 0;
   11565             : }
   11566             : 
   11567           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown6(PyObject *obj, void *closure)
   11568             : {
   11569           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11570           0 :         PyObject *py_unknown6;
   11571           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
   11572           0 :         return py_unknown6;
   11573             : }
   11574             : 
   11575           0 : static int py_netr_DELTA_ALIAS_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   11576             : {
   11577           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11578           0 :         if (value == NULL) {
   11579           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
   11580           0 :                 return -1;
   11581             :         }
   11582             :         {
   11583           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   11584           0 :                 if (PyLong_Check(value)) {
   11585           0 :                         unsigned long long test_var;
   11586           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11587           0 :                         if (PyErr_Occurred() != NULL) {
   11588           0 :                                 return -1;
   11589             :                         }
   11590           0 :                         if (test_var > uint_max) {
   11591           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11592             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11593           0 :                                 return -1;
   11594             :                         }
   11595           0 :                         object->unknown6 = test_var;
   11596             :                 } else {
   11597           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11598             :                           PyLong_Type.tp_name);
   11599           0 :                         return -1;
   11600             :                 }
   11601             :         }
   11602           0 :         return 0;
   11603             : }
   11604             : 
   11605           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown7(PyObject *obj, void *closure)
   11606             : {
   11607           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11608           0 :         PyObject *py_unknown7;
   11609           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
   11610           0 :         return py_unknown7;
   11611             : }
   11612             : 
   11613           0 : static int py_netr_DELTA_ALIAS_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   11614             : {
   11615           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11616           0 :         if (value == NULL) {
   11617           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
   11618           0 :                 return -1;
   11619             :         }
   11620             :         {
   11621           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   11622           0 :                 if (PyLong_Check(value)) {
   11623           0 :                         unsigned long long test_var;
   11624           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11625           0 :                         if (PyErr_Occurred() != NULL) {
   11626           0 :                                 return -1;
   11627             :                         }
   11628           0 :                         if (test_var > uint_max) {
   11629           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11630             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11631           0 :                                 return -1;
   11632             :                         }
   11633           0 :                         object->unknown7 = test_var;
   11634             :                 } else {
   11635           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11636             :                           PyLong_Type.tp_name);
   11637           0 :                         return -1;
   11638             :                 }
   11639             :         }
   11640           0 :         return 0;
   11641             : }
   11642             : 
   11643           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown8(PyObject *obj, void *closure)
   11644             : {
   11645           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
   11646           0 :         PyObject *py_unknown8;
   11647           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
   11648           0 :         return py_unknown8;
   11649             : }
   11650             : 
   11651           0 : static int py_netr_DELTA_ALIAS_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   11652             : {
   11653           0 :         struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
   11654           0 :         if (value == NULL) {
   11655           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
   11656           0 :                 return -1;
   11657             :         }
   11658             :         {
   11659           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   11660           0 :                 if (PyLong_Check(value)) {
   11661           0 :                         unsigned long long test_var;
   11662           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11663           0 :                         if (PyErr_Occurred() != NULL) {
   11664           0 :                                 return -1;
   11665             :                         }
   11666           0 :                         if (test_var > uint_max) {
   11667           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11668             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11669           0 :                                 return -1;
   11670             :                         }
   11671           0 :                         object->unknown8 = test_var;
   11672             :                 } else {
   11673           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11674             :                           PyLong_Type.tp_name);
   11675           0 :                         return -1;
   11676             :                 }
   11677             :         }
   11678           0 :         return 0;
   11679             : }
   11680             : 
   11681             : static PyGetSetDef py_netr_DELTA_ALIAS_getsetters[] = {
   11682             :         {
   11683             :                 .name = discard_const_p(char, "alias_name"),
   11684             :                 .get = py_netr_DELTA_ALIAS_get_alias_name,
   11685             :                 .set = py_netr_DELTA_ALIAS_set_alias_name,
   11686             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11687             :         },
   11688             :         {
   11689             :                 .name = discard_const_p(char, "rid"),
   11690             :                 .get = py_netr_DELTA_ALIAS_get_rid,
   11691             :                 .set = py_netr_DELTA_ALIAS_set_rid,
   11692             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11693             :         },
   11694             :         {
   11695             :                 .name = discard_const_p(char, "SecurityInformation"),
   11696             :                 .get = py_netr_DELTA_ALIAS_get_SecurityInformation,
   11697             :                 .set = py_netr_DELTA_ALIAS_set_SecurityInformation,
   11698             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11699             :         },
   11700             :         {
   11701             :                 .name = discard_const_p(char, "sdbuf"),
   11702             :                 .get = py_netr_DELTA_ALIAS_get_sdbuf,
   11703             :                 .set = py_netr_DELTA_ALIAS_set_sdbuf,
   11704             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   11705             :         },
   11706             :         {
   11707             :                 .name = discard_const_p(char, "description"),
   11708             :                 .get = py_netr_DELTA_ALIAS_get_description,
   11709             :                 .set = py_netr_DELTA_ALIAS_set_description,
   11710             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11711             :         },
   11712             :         {
   11713             :                 .name = discard_const_p(char, "unknown2"),
   11714             :                 .get = py_netr_DELTA_ALIAS_get_unknown2,
   11715             :                 .set = py_netr_DELTA_ALIAS_set_unknown2,
   11716             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11717             :         },
   11718             :         {
   11719             :                 .name = discard_const_p(char, "unknown3"),
   11720             :                 .get = py_netr_DELTA_ALIAS_get_unknown3,
   11721             :                 .set = py_netr_DELTA_ALIAS_set_unknown3,
   11722             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11723             :         },
   11724             :         {
   11725             :                 .name = discard_const_p(char, "unknown4"),
   11726             :                 .get = py_netr_DELTA_ALIAS_get_unknown4,
   11727             :                 .set = py_netr_DELTA_ALIAS_set_unknown4,
   11728             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11729             :         },
   11730             :         {
   11731             :                 .name = discard_const_p(char, "unknown5"),
   11732             :                 .get = py_netr_DELTA_ALIAS_get_unknown5,
   11733             :                 .set = py_netr_DELTA_ALIAS_set_unknown5,
   11734             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11735             :         },
   11736             :         {
   11737             :                 .name = discard_const_p(char, "unknown6"),
   11738             :                 .get = py_netr_DELTA_ALIAS_get_unknown6,
   11739             :                 .set = py_netr_DELTA_ALIAS_set_unknown6,
   11740             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11741             :         },
   11742             :         {
   11743             :                 .name = discard_const_p(char, "unknown7"),
   11744             :                 .get = py_netr_DELTA_ALIAS_get_unknown7,
   11745             :                 .set = py_netr_DELTA_ALIAS_set_unknown7,
   11746             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11747             :         },
   11748             :         {
   11749             :                 .name = discard_const_p(char, "unknown8"),
   11750             :                 .get = py_netr_DELTA_ALIAS_get_unknown8,
   11751             :                 .set = py_netr_DELTA_ALIAS_set_unknown8,
   11752             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11753             :         },
   11754             :         { .name = NULL }
   11755             : };
   11756             : 
   11757           0 : static PyObject *py_netr_DELTA_ALIAS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11758             : {
   11759           0 :         return pytalloc_new(struct netr_DELTA_ALIAS, type);
   11760             : }
   11761             : 
   11762             : 
   11763             : static PyTypeObject netr_DELTA_ALIAS_Type = {
   11764             :         PyVarObject_HEAD_INIT(NULL, 0)
   11765             :         .tp_name = "netlogon.netr_DELTA_ALIAS",
   11766             :         .tp_getset = py_netr_DELTA_ALIAS_getsetters,
   11767             :         .tp_methods = NULL,
   11768             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11769             :         .tp_new = py_netr_DELTA_ALIAS_new,
   11770             : };
   11771             : 
   11772             : 
   11773           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_sids(PyObject *obj, void *closure)
   11774             : {
   11775           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
   11776           0 :         PyObject *py_sids;
   11777           0 :         py_sids = pytalloc_reference_ex(lsa_SidArray_Type, pytalloc_get_mem_ctx(obj), &object->sids);
   11778           0 :         return py_sids;
   11779             : }
   11780             : 
   11781           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_sids(PyObject *py_obj, PyObject *value, void *closure)
   11782             : {
   11783           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
   11784           0 :         if (value == NULL) {
   11785           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sids");
   11786           0 :                 return -1;
   11787             :         }
   11788           0 :         PY_CHECK_TYPE(lsa_SidArray_Type, value, return -1;);
   11789           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11790           0 :                 PyErr_NoMemory();
   11791           0 :                 return -1;
   11792             :         }
   11793           0 :         object->sids = *(struct lsa_SidArray *)pytalloc_get_ptr(value);
   11794           0 :         return 0;
   11795             : }
   11796             : 
   11797           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown1(PyObject *obj, void *closure)
   11798             : {
   11799           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
   11800           0 :         PyObject *py_unknown1;
   11801           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
   11802           0 :         return py_unknown1;
   11803             : }
   11804             : 
   11805           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   11806             : {
   11807           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
   11808           0 :         if (value == NULL) {
   11809           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   11810           0 :                 return -1;
   11811             :         }
   11812             :         {
   11813           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   11814           0 :                 if (PyLong_Check(value)) {
   11815           0 :                         unsigned long long test_var;
   11816           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11817           0 :                         if (PyErr_Occurred() != NULL) {
   11818           0 :                                 return -1;
   11819             :                         }
   11820           0 :                         if (test_var > uint_max) {
   11821           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11822             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11823           0 :                                 return -1;
   11824             :                         }
   11825           0 :                         object->unknown1 = test_var;
   11826             :                 } else {
   11827           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11828             :                           PyLong_Type.tp_name);
   11829           0 :                         return -1;
   11830             :                 }
   11831             :         }
   11832           0 :         return 0;
   11833             : }
   11834             : 
   11835           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown2(PyObject *obj, void *closure)
   11836             : {
   11837           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
   11838           0 :         PyObject *py_unknown2;
   11839           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown2));
   11840           0 :         return py_unknown2;
   11841             : }
   11842             : 
   11843           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   11844             : {
   11845           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
   11846           0 :         if (value == NULL) {
   11847           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   11848           0 :                 return -1;
   11849             :         }
   11850             :         {
   11851           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   11852           0 :                 if (PyLong_Check(value)) {
   11853           0 :                         unsigned long long test_var;
   11854           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11855           0 :                         if (PyErr_Occurred() != NULL) {
   11856           0 :                                 return -1;
   11857             :                         }
   11858           0 :                         if (test_var > uint_max) {
   11859           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11860             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11861           0 :                                 return -1;
   11862             :                         }
   11863           0 :                         object->unknown2 = test_var;
   11864             :                 } else {
   11865           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11866             :                           PyLong_Type.tp_name);
   11867           0 :                         return -1;
   11868             :                 }
   11869             :         }
   11870           0 :         return 0;
   11871             : }
   11872             : 
   11873           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown3(PyObject *obj, void *closure)
   11874             : {
   11875           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
   11876           0 :         PyObject *py_unknown3;
   11877           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown3));
   11878           0 :         return py_unknown3;
   11879             : }
   11880             : 
   11881           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   11882             : {
   11883           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
   11884           0 :         if (value == NULL) {
   11885           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   11886           0 :                 return -1;
   11887             :         }
   11888             :         {
   11889           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   11890           0 :                 if (PyLong_Check(value)) {
   11891           0 :                         unsigned long long test_var;
   11892           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11893           0 :                         if (PyErr_Occurred() != NULL) {
   11894           0 :                                 return -1;
   11895             :                         }
   11896           0 :                         if (test_var > uint_max) {
   11897           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11898             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11899           0 :                                 return -1;
   11900             :                         }
   11901           0 :                         object->unknown3 = test_var;
   11902             :                 } else {
   11903           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11904             :                           PyLong_Type.tp_name);
   11905           0 :                         return -1;
   11906             :                 }
   11907             :         }
   11908           0 :         return 0;
   11909             : }
   11910             : 
   11911           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown4(PyObject *obj, void *closure)
   11912             : {
   11913           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
   11914           0 :         PyObject *py_unknown4;
   11915           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown4));
   11916           0 :         return py_unknown4;
   11917             : }
   11918             : 
   11919           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   11920             : {
   11921           0 :         struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
   11922           0 :         if (value == NULL) {
   11923           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   11924           0 :                 return -1;
   11925             :         }
   11926             :         {
   11927           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   11928           0 :                 if (PyLong_Check(value)) {
   11929           0 :                         unsigned long long test_var;
   11930           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11931           0 :                         if (PyErr_Occurred() != NULL) {
   11932           0 :                                 return -1;
   11933             :                         }
   11934           0 :                         if (test_var > uint_max) {
   11935           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11936             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11937           0 :                                 return -1;
   11938             :                         }
   11939           0 :                         object->unknown4 = test_var;
   11940             :                 } else {
   11941           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11942             :                           PyLong_Type.tp_name);
   11943           0 :                         return -1;
   11944             :                 }
   11945             :         }
   11946           0 :         return 0;
   11947             : }
   11948             : 
   11949             : static PyGetSetDef py_netr_DELTA_ALIAS_MEMBER_getsetters[] = {
   11950             :         {
   11951             :                 .name = discard_const_p(char, "sids"),
   11952             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_sids,
   11953             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_sids,
   11954             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidArray")
   11955             :         },
   11956             :         {
   11957             :                 .name = discard_const_p(char, "unknown1"),
   11958             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown1,
   11959             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown1,
   11960             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11961             :         },
   11962             :         {
   11963             :                 .name = discard_const_p(char, "unknown2"),
   11964             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown2,
   11965             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown2,
   11966             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11967             :         },
   11968             :         {
   11969             :                 .name = discard_const_p(char, "unknown3"),
   11970             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown3,
   11971             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown3,
   11972             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11973             :         },
   11974             :         {
   11975             :                 .name = discard_const_p(char, "unknown4"),
   11976             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown4,
   11977             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown4,
   11978             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11979             :         },
   11980             :         { .name = NULL }
   11981             : };
   11982             : 
   11983           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11984             : {
   11985           0 :         return pytalloc_new(struct netr_DELTA_ALIAS_MEMBER, type);
   11986             : }
   11987             : 
   11988             : 
   11989             : static PyTypeObject netr_DELTA_ALIAS_MEMBER_Type = {
   11990             :         PyVarObject_HEAD_INIT(NULL, 0)
   11991             :         .tp_name = "netlogon.netr_DELTA_ALIAS_MEMBER",
   11992             :         .tp_getset = py_netr_DELTA_ALIAS_MEMBER_getsetters,
   11993             :         .tp_methods = NULL,
   11994             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11995             :         .tp_new = py_netr_DELTA_ALIAS_MEMBER_new,
   11996             : };
   11997             : 
   11998             : 
   11999           0 : static PyObject *py_netr_QUOTA_LIMITS_get_pagedpoollimit(PyObject *obj, void *closure)
   12000             : {
   12001           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
   12002           0 :         PyObject *py_pagedpoollimit;
   12003           0 :         py_pagedpoollimit = PyLong_FromUnsignedLongLong((uint32_t)(object->pagedpoollimit));
   12004           0 :         return py_pagedpoollimit;
   12005             : }
   12006             : 
   12007           0 : static int py_netr_QUOTA_LIMITS_set_pagedpoollimit(PyObject *py_obj, PyObject *value, void *closure)
   12008             : {
   12009           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
   12010           0 :         if (value == NULL) {
   12011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pagedpoollimit");
   12012           0 :                 return -1;
   12013             :         }
   12014             :         {
   12015           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pagedpoollimit));
   12016           0 :                 if (PyLong_Check(value)) {
   12017           0 :                         unsigned long long test_var;
   12018           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12019           0 :                         if (PyErr_Occurred() != NULL) {
   12020           0 :                                 return -1;
   12021             :                         }
   12022           0 :                         if (test_var > uint_max) {
   12023           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12024             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12025           0 :                                 return -1;
   12026             :                         }
   12027           0 :                         object->pagedpoollimit = test_var;
   12028             :                 } else {
   12029           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12030             :                           PyLong_Type.tp_name);
   12031           0 :                         return -1;
   12032             :                 }
   12033             :         }
   12034           0 :         return 0;
   12035             : }
   12036             : 
   12037           0 : static PyObject *py_netr_QUOTA_LIMITS_get_nonpagedpoollimit(PyObject *obj, void *closure)
   12038             : {
   12039           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
   12040           0 :         PyObject *py_nonpagedpoollimit;
   12041           0 :         py_nonpagedpoollimit = PyLong_FromUnsignedLongLong((uint32_t)(object->nonpagedpoollimit));
   12042           0 :         return py_nonpagedpoollimit;
   12043             : }
   12044             : 
   12045           0 : static int py_netr_QUOTA_LIMITS_set_nonpagedpoollimit(PyObject *py_obj, PyObject *value, void *closure)
   12046             : {
   12047           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
   12048           0 :         if (value == NULL) {
   12049           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nonpagedpoollimit");
   12050           0 :                 return -1;
   12051             :         }
   12052             :         {
   12053           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nonpagedpoollimit));
   12054           0 :                 if (PyLong_Check(value)) {
   12055           0 :                         unsigned long long test_var;
   12056           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12057           0 :                         if (PyErr_Occurred() != NULL) {
   12058           0 :                                 return -1;
   12059             :                         }
   12060           0 :                         if (test_var > uint_max) {
   12061           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12062             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12063           0 :                                 return -1;
   12064             :                         }
   12065           0 :                         object->nonpagedpoollimit = test_var;
   12066             :                 } else {
   12067           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12068             :                           PyLong_Type.tp_name);
   12069           0 :                         return -1;
   12070             :                 }
   12071             :         }
   12072           0 :         return 0;
   12073             : }
   12074             : 
   12075           0 : static PyObject *py_netr_QUOTA_LIMITS_get_minimumworkingsetsize(PyObject *obj, void *closure)
   12076             : {
   12077           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
   12078           0 :         PyObject *py_minimumworkingsetsize;
   12079           0 :         py_minimumworkingsetsize = PyLong_FromUnsignedLongLong((uint32_t)(object->minimumworkingsetsize));
   12080           0 :         return py_minimumworkingsetsize;
   12081             : }
   12082             : 
   12083           0 : static int py_netr_QUOTA_LIMITS_set_minimumworkingsetsize(PyObject *py_obj, PyObject *value, void *closure)
   12084             : {
   12085           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
   12086           0 :         if (value == NULL) {
   12087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minimumworkingsetsize");
   12088           0 :                 return -1;
   12089             :         }
   12090             :         {
   12091           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minimumworkingsetsize));
   12092           0 :                 if (PyLong_Check(value)) {
   12093           0 :                         unsigned long long test_var;
   12094           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12095           0 :                         if (PyErr_Occurred() != NULL) {
   12096           0 :                                 return -1;
   12097             :                         }
   12098           0 :                         if (test_var > uint_max) {
   12099           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12100             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12101           0 :                                 return -1;
   12102             :                         }
   12103           0 :                         object->minimumworkingsetsize = test_var;
   12104             :                 } else {
   12105           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12106             :                           PyLong_Type.tp_name);
   12107           0 :                         return -1;
   12108             :                 }
   12109             :         }
   12110           0 :         return 0;
   12111             : }
   12112             : 
   12113           0 : static PyObject *py_netr_QUOTA_LIMITS_get_maximumworkingsetsize(PyObject *obj, void *closure)
   12114             : {
   12115           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
   12116           0 :         PyObject *py_maximumworkingsetsize;
   12117           0 :         py_maximumworkingsetsize = PyLong_FromUnsignedLongLong((uint32_t)(object->maximumworkingsetsize));
   12118           0 :         return py_maximumworkingsetsize;
   12119             : }
   12120             : 
   12121           0 : static int py_netr_QUOTA_LIMITS_set_maximumworkingsetsize(PyObject *py_obj, PyObject *value, void *closure)
   12122             : {
   12123           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
   12124           0 :         if (value == NULL) {
   12125           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maximumworkingsetsize");
   12126           0 :                 return -1;
   12127             :         }
   12128             :         {
   12129           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maximumworkingsetsize));
   12130           0 :                 if (PyLong_Check(value)) {
   12131           0 :                         unsigned long long test_var;
   12132           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12133           0 :                         if (PyErr_Occurred() != NULL) {
   12134           0 :                                 return -1;
   12135             :                         }
   12136           0 :                         if (test_var > uint_max) {
   12137           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12138             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12139           0 :                                 return -1;
   12140             :                         }
   12141           0 :                         object->maximumworkingsetsize = test_var;
   12142             :                 } else {
   12143           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12144             :                           PyLong_Type.tp_name);
   12145           0 :                         return -1;
   12146             :                 }
   12147             :         }
   12148           0 :         return 0;
   12149             : }
   12150             : 
   12151           0 : static PyObject *py_netr_QUOTA_LIMITS_get_pagefilelimit(PyObject *obj, void *closure)
   12152             : {
   12153           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
   12154           0 :         PyObject *py_pagefilelimit;
   12155           0 :         py_pagefilelimit = PyLong_FromUnsignedLongLong((uint32_t)(object->pagefilelimit));
   12156           0 :         return py_pagefilelimit;
   12157             : }
   12158             : 
   12159           0 : static int py_netr_QUOTA_LIMITS_set_pagefilelimit(PyObject *py_obj, PyObject *value, void *closure)
   12160             : {
   12161           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
   12162           0 :         if (value == NULL) {
   12163           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pagefilelimit");
   12164           0 :                 return -1;
   12165             :         }
   12166             :         {
   12167           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pagefilelimit));
   12168           0 :                 if (PyLong_Check(value)) {
   12169           0 :                         unsigned long long test_var;
   12170           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12171           0 :                         if (PyErr_Occurred() != NULL) {
   12172           0 :                                 return -1;
   12173             :                         }
   12174           0 :                         if (test_var > uint_max) {
   12175           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12176             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12177           0 :                                 return -1;
   12178             :                         }
   12179           0 :                         object->pagefilelimit = test_var;
   12180             :                 } else {
   12181           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12182             :                           PyLong_Type.tp_name);
   12183           0 :                         return -1;
   12184             :                 }
   12185             :         }
   12186           0 :         return 0;
   12187             : }
   12188             : 
   12189           0 : static PyObject *py_netr_QUOTA_LIMITS_get_timelimit(PyObject *obj, void *closure)
   12190             : {
   12191           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
   12192           0 :         PyObject *py_timelimit;
   12193           0 :         py_timelimit = PyLong_FromUnsignedLongLong(object->timelimit);
   12194           0 :         return py_timelimit;
   12195             : }
   12196             : 
   12197           0 : static int py_netr_QUOTA_LIMITS_set_timelimit(PyObject *py_obj, PyObject *value, void *closure)
   12198             : {
   12199           0 :         struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
   12200           0 :         if (value == NULL) {
   12201           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timelimit");
   12202           0 :                 return -1;
   12203             :         }
   12204             :         {
   12205           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timelimit));
   12206           0 :                 if (PyLong_Check(value)) {
   12207           0 :                         unsigned long long test_var;
   12208           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12209           0 :                         if (PyErr_Occurred() != NULL) {
   12210           0 :                                 return -1;
   12211             :                         }
   12212           0 :                         if (test_var > uint_max) {
   12213           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12214             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12215           0 :                                 return -1;
   12216             :                         }
   12217           0 :                         object->timelimit = test_var;
   12218             :                 } else {
   12219           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12220             :                           PyLong_Type.tp_name);
   12221           0 :                         return -1;
   12222             :                 }
   12223             :         }
   12224           0 :         return 0;
   12225             : }
   12226             : 
   12227             : static PyGetSetDef py_netr_QUOTA_LIMITS_getsetters[] = {
   12228             :         {
   12229             :                 .name = discard_const_p(char, "pagedpoollimit"),
   12230             :                 .get = py_netr_QUOTA_LIMITS_get_pagedpoollimit,
   12231             :                 .set = py_netr_QUOTA_LIMITS_set_pagedpoollimit,
   12232             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12233             :         },
   12234             :         {
   12235             :                 .name = discard_const_p(char, "nonpagedpoollimit"),
   12236             :                 .get = py_netr_QUOTA_LIMITS_get_nonpagedpoollimit,
   12237             :                 .set = py_netr_QUOTA_LIMITS_set_nonpagedpoollimit,
   12238             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12239             :         },
   12240             :         {
   12241             :                 .name = discard_const_p(char, "minimumworkingsetsize"),
   12242             :                 .get = py_netr_QUOTA_LIMITS_get_minimumworkingsetsize,
   12243             :                 .set = py_netr_QUOTA_LIMITS_set_minimumworkingsetsize,
   12244             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12245             :         },
   12246             :         {
   12247             :                 .name = discard_const_p(char, "maximumworkingsetsize"),
   12248             :                 .get = py_netr_QUOTA_LIMITS_get_maximumworkingsetsize,
   12249             :                 .set = py_netr_QUOTA_LIMITS_set_maximumworkingsetsize,
   12250             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12251             :         },
   12252             :         {
   12253             :                 .name = discard_const_p(char, "pagefilelimit"),
   12254             :                 .get = py_netr_QUOTA_LIMITS_get_pagefilelimit,
   12255             :                 .set = py_netr_QUOTA_LIMITS_set_pagefilelimit,
   12256             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12257             :         },
   12258             :         {
   12259             :                 .name = discard_const_p(char, "timelimit"),
   12260             :                 .get = py_netr_QUOTA_LIMITS_get_timelimit,
   12261             :                 .set = py_netr_QUOTA_LIMITS_set_timelimit,
   12262             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   12263             :         },
   12264             :         { .name = NULL }
   12265             : };
   12266             : 
   12267           0 : static PyObject *py_netr_QUOTA_LIMITS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12268             : {
   12269           0 :         return pytalloc_new(struct netr_QUOTA_LIMITS, type);
   12270             : }
   12271             : 
   12272             : 
   12273             : static PyTypeObject netr_QUOTA_LIMITS_Type = {
   12274             :         PyVarObject_HEAD_INIT(NULL, 0)
   12275             :         .tp_name = "netlogon.netr_QUOTA_LIMITS",
   12276             :         .tp_getset = py_netr_QUOTA_LIMITS_getsetters,
   12277             :         .tp_methods = NULL,
   12278             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12279             :         .tp_new = py_netr_QUOTA_LIMITS_new,
   12280             : };
   12281             : 
   12282             : 
   12283           0 : static PyObject *py_netr_DELTA_POLICY_get_maxlogsize(PyObject *obj, void *closure)
   12284             : {
   12285           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12286           0 :         PyObject *py_maxlogsize;
   12287           0 :         py_maxlogsize = PyLong_FromUnsignedLongLong((uint32_t)(object->maxlogsize));
   12288           0 :         return py_maxlogsize;
   12289             : }
   12290             : 
   12291           0 : static int py_netr_DELTA_POLICY_set_maxlogsize(PyObject *py_obj, PyObject *value, void *closure)
   12292             : {
   12293           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12294           0 :         if (value == NULL) {
   12295           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxlogsize");
   12296           0 :                 return -1;
   12297             :         }
   12298             :         {
   12299           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlogsize));
   12300           0 :                 if (PyLong_Check(value)) {
   12301           0 :                         unsigned long long test_var;
   12302           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12303           0 :                         if (PyErr_Occurred() != NULL) {
   12304           0 :                                 return -1;
   12305             :                         }
   12306           0 :                         if (test_var > uint_max) {
   12307           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12308             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12309           0 :                                 return -1;
   12310             :                         }
   12311           0 :                         object->maxlogsize = test_var;
   12312             :                 } else {
   12313           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12314             :                           PyLong_Type.tp_name);
   12315           0 :                         return -1;
   12316             :                 }
   12317             :         }
   12318           0 :         return 0;
   12319             : }
   12320             : 
   12321           0 : static PyObject *py_netr_DELTA_POLICY_get_auditretentionperiod(PyObject *obj, void *closure)
   12322             : {
   12323           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12324           0 :         PyObject *py_auditretentionperiod;
   12325           0 :         py_auditretentionperiod = PyLong_FromUnsignedLongLong(object->auditretentionperiod);
   12326           0 :         return py_auditretentionperiod;
   12327             : }
   12328             : 
   12329           0 : static int py_netr_DELTA_POLICY_set_auditretentionperiod(PyObject *py_obj, PyObject *value, void *closure)
   12330             : {
   12331           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12332           0 :         if (value == NULL) {
   12333           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auditretentionperiod");
   12334           0 :                 return -1;
   12335             :         }
   12336             :         {
   12337           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditretentionperiod));
   12338           0 :                 if (PyLong_Check(value)) {
   12339           0 :                         unsigned long long test_var;
   12340           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12341           0 :                         if (PyErr_Occurred() != NULL) {
   12342           0 :                                 return -1;
   12343             :                         }
   12344           0 :                         if (test_var > uint_max) {
   12345           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12346             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12347           0 :                                 return -1;
   12348             :                         }
   12349           0 :                         object->auditretentionperiod = test_var;
   12350             :                 } else {
   12351           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12352             :                           PyLong_Type.tp_name);
   12353           0 :                         return -1;
   12354             :                 }
   12355             :         }
   12356           0 :         return 0;
   12357             : }
   12358             : 
   12359           0 : static PyObject *py_netr_DELTA_POLICY_get_auditingmode(PyObject *obj, void *closure)
   12360             : {
   12361           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12362           0 :         PyObject *py_auditingmode;
   12363           0 :         py_auditingmode = PyLong_FromLong((uint16_t)(object->auditingmode));
   12364           0 :         return py_auditingmode;
   12365             : }
   12366             : 
   12367           0 : static int py_netr_DELTA_POLICY_set_auditingmode(PyObject *py_obj, PyObject *value, void *closure)
   12368             : {
   12369           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12370           0 :         if (value == NULL) {
   12371           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auditingmode");
   12372           0 :                 return -1;
   12373             :         }
   12374             :         {
   12375           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditingmode));
   12376           0 :                 if (PyLong_Check(value)) {
   12377           0 :                         unsigned long long test_var;
   12378           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12379           0 :                         if (PyErr_Occurred() != NULL) {
   12380           0 :                                 return -1;
   12381             :                         }
   12382           0 :                         if (test_var > uint_max) {
   12383           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12384             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12385           0 :                                 return -1;
   12386             :                         }
   12387           0 :                         object->auditingmode = test_var;
   12388             :                 } else {
   12389           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12390             :                           PyLong_Type.tp_name);
   12391           0 :                         return -1;
   12392             :                 }
   12393             :         }
   12394           0 :         return 0;
   12395             : }
   12396             : 
   12397           0 : static PyObject *py_netr_DELTA_POLICY_get_maxauditeventcount(PyObject *obj, void *closure)
   12398             : {
   12399           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12400           0 :         PyObject *py_maxauditeventcount;
   12401           0 :         py_maxauditeventcount = PyLong_FromUnsignedLongLong((uint32_t)(object->maxauditeventcount));
   12402           0 :         return py_maxauditeventcount;
   12403             : }
   12404             : 
   12405           0 : static int py_netr_DELTA_POLICY_set_maxauditeventcount(PyObject *py_obj, PyObject *value, void *closure)
   12406             : {
   12407           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12408           0 :         if (value == NULL) {
   12409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxauditeventcount");
   12410           0 :                 return -1;
   12411             :         }
   12412             :         {
   12413           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxauditeventcount));
   12414           0 :                 if (PyLong_Check(value)) {
   12415           0 :                         unsigned long long test_var;
   12416           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12417           0 :                         if (PyErr_Occurred() != NULL) {
   12418           0 :                                 return -1;
   12419             :                         }
   12420           0 :                         if (test_var > uint_max) {
   12421           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12422             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12423           0 :                                 return -1;
   12424             :                         }
   12425           0 :                         object->maxauditeventcount = test_var;
   12426             :                 } else {
   12427           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12428             :                           PyLong_Type.tp_name);
   12429           0 :                         return -1;
   12430             :                 }
   12431             :         }
   12432           0 :         return 0;
   12433             : }
   12434             : 
   12435           0 : static PyObject *py_netr_DELTA_POLICY_get_eventauditoptions(PyObject *obj, void *closure)
   12436             : {
   12437           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12438           0 :         PyObject *py_eventauditoptions;
   12439           0 :         if (object->eventauditoptions == NULL) {
   12440           0 :                 Py_RETURN_NONE;
   12441             :         }
   12442           0 :         if (object->eventauditoptions == NULL) {
   12443           0 :                 py_eventauditoptions = Py_None;
   12444           0 :                 Py_INCREF(py_eventauditoptions);
   12445             :         } else {
   12446           0 :                 py_eventauditoptions = PyList_New(object->maxauditeventcount + 1);
   12447           0 :                 if (py_eventauditoptions == NULL) {
   12448           0 :                         return NULL;
   12449             :                 }
   12450             :                 {
   12451             :                         int eventauditoptions_cntr_1;
   12452           0 :                         for (eventauditoptions_cntr_1 = 0; eventauditoptions_cntr_1 < (object->maxauditeventcount + 1); eventauditoptions_cntr_1++) {
   12453           0 :                                 PyObject *py_eventauditoptions_1;
   12454           0 :                                 py_eventauditoptions_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->eventauditoptions)[eventauditoptions_cntr_1]));
   12455           0 :                                 PyList_SetItem(py_eventauditoptions, eventauditoptions_cntr_1, py_eventauditoptions_1);
   12456             :                         }
   12457             :                 }
   12458             :         }
   12459           0 :         return py_eventauditoptions;
   12460             : }
   12461             : 
   12462           0 : static int py_netr_DELTA_POLICY_set_eventauditoptions(PyObject *py_obj, PyObject *value, void *closure)
   12463             : {
   12464           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12465           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->eventauditoptions));
   12466           0 :         if (value == NULL) {
   12467           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->eventauditoptions");
   12468           0 :                 return -1;
   12469             :         }
   12470           0 :         if (value == Py_None) {
   12471           0 :                 object->eventauditoptions = NULL;
   12472             :         } else {
   12473           0 :                 object->eventauditoptions = NULL;
   12474           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   12475             :                 {
   12476           0 :                         int eventauditoptions_cntr_1;
   12477           0 :                         object->eventauditoptions = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->eventauditoptions, PyList_GET_SIZE(value));
   12478           0 :                         if (!object->eventauditoptions) { return -1; }
   12479           0 :                         talloc_set_name_const(object->eventauditoptions, "ARRAY: object->eventauditoptions");
   12480           0 :                         for (eventauditoptions_cntr_1 = 0; eventauditoptions_cntr_1 < PyList_GET_SIZE(value); eventauditoptions_cntr_1++) {
   12481           0 :                                 if (PyList_GET_ITEM(value, eventauditoptions_cntr_1) == NULL) {
   12482           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->eventauditoptions)[eventauditoptions_cntr_1]");
   12483           0 :                                         return -1;
   12484             :                                 }
   12485             :                                 {
   12486           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->eventauditoptions)[eventauditoptions_cntr_1]));
   12487           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, eventauditoptions_cntr_1))) {
   12488           0 :                                                 unsigned long long test_var;
   12489           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, eventauditoptions_cntr_1));
   12490           0 :                                                 if (PyErr_Occurred() != NULL) {
   12491           0 :                                                         return -1;
   12492             :                                                 }
   12493           0 :                                                 if (test_var > uint_max) {
   12494           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12495             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   12496           0 :                                                         return -1;
   12497             :                                                 }
   12498           0 :                                                 (object->eventauditoptions)[eventauditoptions_cntr_1] = test_var;
   12499             :                                         } else {
   12500           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   12501             :                                                   PyLong_Type.tp_name);
   12502           0 :                                                 return -1;
   12503             :                                         }
   12504             :                                 }
   12505             :                         }
   12506             :                 }
   12507             :         }
   12508           0 :         return 0;
   12509             : }
   12510             : 
   12511           0 : static PyObject *py_netr_DELTA_POLICY_get_primary_domain_name(PyObject *obj, void *closure)
   12512             : {
   12513           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12514           0 :         PyObject *py_primary_domain_name;
   12515           0 :         py_primary_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->primary_domain_name);
   12516           0 :         return py_primary_domain_name;
   12517             : }
   12518             : 
   12519           0 : static int py_netr_DELTA_POLICY_set_primary_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   12520             : {
   12521           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12522           0 :         if (value == NULL) {
   12523           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->primary_domain_name");
   12524           0 :                 return -1;
   12525             :         }
   12526           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12527           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12528           0 :                 PyErr_NoMemory();
   12529           0 :                 return -1;
   12530             :         }
   12531           0 :         object->primary_domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   12532           0 :         return 0;
   12533             : }
   12534             : 
   12535           0 : static PyObject *py_netr_DELTA_POLICY_get_sid(PyObject *obj, void *closure)
   12536             : {
   12537           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12538           0 :         PyObject *py_sid;
   12539           0 :         if (object->sid == NULL) {
   12540           0 :                 Py_RETURN_NONE;
   12541             :         }
   12542           0 :         if (object->sid == NULL) {
   12543           0 :                 py_sid = Py_None;
   12544           0 :                 Py_INCREF(py_sid);
   12545             :         } else {
   12546           0 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
   12547             :         }
   12548           0 :         return py_sid;
   12549             : }
   12550             : 
   12551           0 : static int py_netr_DELTA_POLICY_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   12552             : {
   12553           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12554           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
   12555           0 :         if (value == NULL) {
   12556           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sid");
   12557           0 :                 return -1;
   12558             :         }
   12559           0 :         if (value == Py_None) {
   12560           0 :                 object->sid = NULL;
   12561             :         } else {
   12562           0 :                 object->sid = NULL;
   12563           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   12564           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12565           0 :                         PyErr_NoMemory();
   12566           0 :                         return -1;
   12567             :                 }
   12568           0 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
   12569             :         }
   12570           0 :         return 0;
   12571             : }
   12572             : 
   12573           0 : static PyObject *py_netr_DELTA_POLICY_get_quota_limits(PyObject *obj, void *closure)
   12574             : {
   12575           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12576           0 :         PyObject *py_quota_limits;
   12577           0 :         py_quota_limits = pytalloc_reference_ex(&netr_QUOTA_LIMITS_Type, pytalloc_get_mem_ctx(obj), &object->quota_limits);
   12578           0 :         return py_quota_limits;
   12579             : }
   12580             : 
   12581           0 : static int py_netr_DELTA_POLICY_set_quota_limits(PyObject *py_obj, PyObject *value, void *closure)
   12582             : {
   12583           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12584           0 :         if (value == NULL) {
   12585           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->quota_limits");
   12586           0 :                 return -1;
   12587             :         }
   12588           0 :         PY_CHECK_TYPE(&netr_QUOTA_LIMITS_Type, value, return -1;);
   12589           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12590           0 :                 PyErr_NoMemory();
   12591           0 :                 return -1;
   12592             :         }
   12593           0 :         object->quota_limits = *(struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(value);
   12594           0 :         return 0;
   12595             : }
   12596             : 
   12597           0 : static PyObject *py_netr_DELTA_POLICY_get_sequence_num(PyObject *obj, void *closure)
   12598             : {
   12599           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12600           0 :         PyObject *py_sequence_num;
   12601           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(object->sequence_num);
   12602           0 :         return py_sequence_num;
   12603             : }
   12604             : 
   12605           0 : static int py_netr_DELTA_POLICY_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
   12606             : {
   12607           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12608           0 :         if (value == NULL) {
   12609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sequence_num");
   12610           0 :                 return -1;
   12611             :         }
   12612             :         {
   12613           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sequence_num));
   12614           0 :                 if (PyLong_Check(value)) {
   12615           0 :                         unsigned long long test_var;
   12616           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12617           0 :                         if (PyErr_Occurred() != NULL) {
   12618           0 :                                 return -1;
   12619             :                         }
   12620           0 :                         if (test_var > uint_max) {
   12621           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12622             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12623           0 :                                 return -1;
   12624             :                         }
   12625           0 :                         object->sequence_num = test_var;
   12626             :                 } else {
   12627           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12628             :                           PyLong_Type.tp_name);
   12629           0 :                         return -1;
   12630             :                 }
   12631             :         }
   12632           0 :         return 0;
   12633             : }
   12634             : 
   12635           0 : static PyObject *py_netr_DELTA_POLICY_get_db_create_time(PyObject *obj, void *closure)
   12636             : {
   12637           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12638           0 :         PyObject *py_db_create_time;
   12639           0 :         py_db_create_time = PyLong_FromUnsignedLongLong(object->db_create_time);
   12640           0 :         return py_db_create_time;
   12641             : }
   12642             : 
   12643           0 : static int py_netr_DELTA_POLICY_set_db_create_time(PyObject *py_obj, PyObject *value, void *closure)
   12644             : {
   12645           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12646           0 :         if (value == NULL) {
   12647           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->db_create_time");
   12648           0 :                 return -1;
   12649             :         }
   12650             :         {
   12651           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->db_create_time));
   12652           0 :                 if (PyLong_Check(value)) {
   12653           0 :                         unsigned long long test_var;
   12654           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12655           0 :                         if (PyErr_Occurred() != NULL) {
   12656           0 :                                 return -1;
   12657             :                         }
   12658           0 :                         if (test_var > uint_max) {
   12659           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12660             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12661           0 :                                 return -1;
   12662             :                         }
   12663           0 :                         object->db_create_time = test_var;
   12664             :                 } else {
   12665           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12666             :                           PyLong_Type.tp_name);
   12667           0 :                         return -1;
   12668             :                 }
   12669             :         }
   12670           0 :         return 0;
   12671             : }
   12672             : 
   12673           0 : static PyObject *py_netr_DELTA_POLICY_get_SecurityInformation(PyObject *obj, void *closure)
   12674             : {
   12675           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12676           0 :         PyObject *py_SecurityInformation;
   12677           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
   12678           0 :         return py_SecurityInformation;
   12679             : }
   12680             : 
   12681           0 : static int py_netr_DELTA_POLICY_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   12682             : {
   12683           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12684           0 :         if (value == NULL) {
   12685           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
   12686           0 :                 return -1;
   12687             :         }
   12688             :         {
   12689           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   12690           0 :                 if (PyLong_Check(value)) {
   12691           0 :                         unsigned long long test_var;
   12692           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12693           0 :                         if (PyErr_Occurred() != NULL) {
   12694           0 :                                 return -1;
   12695             :                         }
   12696           0 :                         if (test_var > uint_max) {
   12697           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12698             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12699           0 :                                 return -1;
   12700             :                         }
   12701           0 :                         object->SecurityInformation = test_var;
   12702             :                 } else {
   12703           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12704             :                           PyLong_Type.tp_name);
   12705           0 :                         return -1;
   12706             :                 }
   12707             :         }
   12708           0 :         return 0;
   12709             : }
   12710             : 
   12711           0 : static PyObject *py_netr_DELTA_POLICY_get_sdbuf(PyObject *obj, void *closure)
   12712             : {
   12713           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12714           0 :         PyObject *py_sdbuf;
   12715           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   12716           0 :         return py_sdbuf;
   12717             : }
   12718             : 
   12719           0 : static int py_netr_DELTA_POLICY_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   12720             : {
   12721           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12722           0 :         if (value == NULL) {
   12723           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
   12724           0 :                 return -1;
   12725             :         }
   12726           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   12727           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12728           0 :                 PyErr_NoMemory();
   12729           0 :                 return -1;
   12730             :         }
   12731           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   12732           0 :         return 0;
   12733             : }
   12734             : 
   12735           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown1(PyObject *obj, void *closure)
   12736             : {
   12737           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12738           0 :         PyObject *py_unknown1;
   12739           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   12740           0 :         return py_unknown1;
   12741             : }
   12742             : 
   12743           0 : static int py_netr_DELTA_POLICY_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   12744             : {
   12745           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12746           0 :         if (value == NULL) {
   12747           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   12748           0 :                 return -1;
   12749             :         }
   12750           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12751           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12752           0 :                 PyErr_NoMemory();
   12753           0 :                 return -1;
   12754             :         }
   12755           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12756           0 :         return 0;
   12757             : }
   12758             : 
   12759           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown2(PyObject *obj, void *closure)
   12760             : {
   12761           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12762           0 :         PyObject *py_unknown2;
   12763           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   12764           0 :         return py_unknown2;
   12765             : }
   12766             : 
   12767           0 : static int py_netr_DELTA_POLICY_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   12768             : {
   12769           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12770           0 :         if (value == NULL) {
   12771           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   12772           0 :                 return -1;
   12773             :         }
   12774           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12775           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12776           0 :                 PyErr_NoMemory();
   12777           0 :                 return -1;
   12778             :         }
   12779           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12780           0 :         return 0;
   12781             : }
   12782             : 
   12783           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown3(PyObject *obj, void *closure)
   12784             : {
   12785           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12786           0 :         PyObject *py_unknown3;
   12787           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   12788           0 :         return py_unknown3;
   12789             : }
   12790             : 
   12791           0 : static int py_netr_DELTA_POLICY_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   12792             : {
   12793           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12794           0 :         if (value == NULL) {
   12795           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   12796           0 :                 return -1;
   12797             :         }
   12798           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12799           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12800           0 :                 PyErr_NoMemory();
   12801           0 :                 return -1;
   12802             :         }
   12803           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12804           0 :         return 0;
   12805             : }
   12806             : 
   12807           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown4(PyObject *obj, void *closure)
   12808             : {
   12809           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12810           0 :         PyObject *py_unknown4;
   12811           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   12812           0 :         return py_unknown4;
   12813             : }
   12814             : 
   12815           0 : static int py_netr_DELTA_POLICY_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   12816             : {
   12817           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12818           0 :         if (value == NULL) {
   12819           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   12820           0 :                 return -1;
   12821             :         }
   12822           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12823           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12824           0 :                 PyErr_NoMemory();
   12825           0 :                 return -1;
   12826             :         }
   12827           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12828           0 :         return 0;
   12829             : }
   12830             : 
   12831           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown5(PyObject *obj, void *closure)
   12832             : {
   12833           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12834           0 :         PyObject *py_unknown5;
   12835           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
   12836           0 :         return py_unknown5;
   12837             : }
   12838             : 
   12839           0 : static int py_netr_DELTA_POLICY_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   12840             : {
   12841           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12842           0 :         if (value == NULL) {
   12843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
   12844           0 :                 return -1;
   12845             :         }
   12846             :         {
   12847           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   12848           0 :                 if (PyLong_Check(value)) {
   12849           0 :                         unsigned long long test_var;
   12850           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12851           0 :                         if (PyErr_Occurred() != NULL) {
   12852           0 :                                 return -1;
   12853             :                         }
   12854           0 :                         if (test_var > uint_max) {
   12855           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12856             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12857           0 :                                 return -1;
   12858             :                         }
   12859           0 :                         object->unknown5 = test_var;
   12860             :                 } else {
   12861           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12862             :                           PyLong_Type.tp_name);
   12863           0 :                         return -1;
   12864             :                 }
   12865             :         }
   12866           0 :         return 0;
   12867             : }
   12868             : 
   12869           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown6(PyObject *obj, void *closure)
   12870             : {
   12871           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12872           0 :         PyObject *py_unknown6;
   12873           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
   12874           0 :         return py_unknown6;
   12875             : }
   12876             : 
   12877           0 : static int py_netr_DELTA_POLICY_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   12878             : {
   12879           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12880           0 :         if (value == NULL) {
   12881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
   12882           0 :                 return -1;
   12883             :         }
   12884             :         {
   12885           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   12886           0 :                 if (PyLong_Check(value)) {
   12887           0 :                         unsigned long long test_var;
   12888           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12889           0 :                         if (PyErr_Occurred() != NULL) {
   12890           0 :                                 return -1;
   12891             :                         }
   12892           0 :                         if (test_var > uint_max) {
   12893           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12894             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12895           0 :                                 return -1;
   12896             :                         }
   12897           0 :                         object->unknown6 = test_var;
   12898             :                 } else {
   12899           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12900             :                           PyLong_Type.tp_name);
   12901           0 :                         return -1;
   12902             :                 }
   12903             :         }
   12904           0 :         return 0;
   12905             : }
   12906             : 
   12907           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown7(PyObject *obj, void *closure)
   12908             : {
   12909           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12910           0 :         PyObject *py_unknown7;
   12911           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
   12912           0 :         return py_unknown7;
   12913             : }
   12914             : 
   12915           0 : static int py_netr_DELTA_POLICY_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   12916             : {
   12917           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12918           0 :         if (value == NULL) {
   12919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
   12920           0 :                 return -1;
   12921             :         }
   12922             :         {
   12923           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   12924           0 :                 if (PyLong_Check(value)) {
   12925           0 :                         unsigned long long test_var;
   12926           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12927           0 :                         if (PyErr_Occurred() != NULL) {
   12928           0 :                                 return -1;
   12929             :                         }
   12930           0 :                         if (test_var > uint_max) {
   12931           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12932             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12933           0 :                                 return -1;
   12934             :                         }
   12935           0 :                         object->unknown7 = test_var;
   12936             :                 } else {
   12937           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12938             :                           PyLong_Type.tp_name);
   12939           0 :                         return -1;
   12940             :                 }
   12941             :         }
   12942           0 :         return 0;
   12943             : }
   12944             : 
   12945           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown8(PyObject *obj, void *closure)
   12946             : {
   12947           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
   12948           0 :         PyObject *py_unknown8;
   12949           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
   12950           0 :         return py_unknown8;
   12951             : }
   12952             : 
   12953           0 : static int py_netr_DELTA_POLICY_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   12954             : {
   12955           0 :         struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
   12956           0 :         if (value == NULL) {
   12957           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
   12958           0 :                 return -1;
   12959             :         }
   12960             :         {
   12961           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   12962           0 :                 if (PyLong_Check(value)) {
   12963           0 :                         unsigned long long test_var;
   12964           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12965           0 :                         if (PyErr_Occurred() != NULL) {
   12966           0 :                                 return -1;
   12967             :                         }
   12968           0 :                         if (test_var > uint_max) {
   12969           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12970             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12971           0 :                                 return -1;
   12972             :                         }
   12973           0 :                         object->unknown8 = test_var;
   12974             :                 } else {
   12975           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12976             :                           PyLong_Type.tp_name);
   12977           0 :                         return -1;
   12978             :                 }
   12979             :         }
   12980           0 :         return 0;
   12981             : }
   12982             : 
   12983             : static PyGetSetDef py_netr_DELTA_POLICY_getsetters[] = {
   12984             :         {
   12985             :                 .name = discard_const_p(char, "maxlogsize"),
   12986             :                 .get = py_netr_DELTA_POLICY_get_maxlogsize,
   12987             :                 .set = py_netr_DELTA_POLICY_set_maxlogsize,
   12988             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12989             :         },
   12990             :         {
   12991             :                 .name = discard_const_p(char, "auditretentionperiod"),
   12992             :                 .get = py_netr_DELTA_POLICY_get_auditretentionperiod,
   12993             :                 .set = py_netr_DELTA_POLICY_set_auditretentionperiod,
   12994             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   12995             :         },
   12996             :         {
   12997             :                 .name = discard_const_p(char, "auditingmode"),
   12998             :                 .get = py_netr_DELTA_POLICY_get_auditingmode,
   12999             :                 .set = py_netr_DELTA_POLICY_set_auditingmode,
   13000             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   13001             :         },
   13002             :         {
   13003             :                 .name = discard_const_p(char, "maxauditeventcount"),
   13004             :                 .get = py_netr_DELTA_POLICY_get_maxauditeventcount,
   13005             :                 .set = py_netr_DELTA_POLICY_set_maxauditeventcount,
   13006             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13007             :         },
   13008             :         {
   13009             :                 .name = discard_const_p(char, "eventauditoptions"),
   13010             :                 .get = py_netr_DELTA_POLICY_get_eventauditoptions,
   13011             :                 .set = py_netr_DELTA_POLICY_set_eventauditoptions,
   13012             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13013             :         },
   13014             :         {
   13015             :                 .name = discard_const_p(char, "primary_domain_name"),
   13016             :                 .get = py_netr_DELTA_POLICY_get_primary_domain_name,
   13017             :                 .set = py_netr_DELTA_POLICY_set_primary_domain_name,
   13018             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13019             :         },
   13020             :         {
   13021             :                 .name = discard_const_p(char, "sid"),
   13022             :                 .get = py_netr_DELTA_POLICY_get_sid,
   13023             :                 .set = py_netr_DELTA_POLICY_set_sid,
   13024             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
   13025             :         },
   13026             :         {
   13027             :                 .name = discard_const_p(char, "quota_limits"),
   13028             :                 .get = py_netr_DELTA_POLICY_get_quota_limits,
   13029             :                 .set = py_netr_DELTA_POLICY_set_quota_limits,
   13030             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_QUOTA_LIMITS")
   13031             :         },
   13032             :         {
   13033             :                 .name = discard_const_p(char, "sequence_num"),
   13034             :                 .get = py_netr_DELTA_POLICY_get_sequence_num,
   13035             :                 .set = py_netr_DELTA_POLICY_set_sequence_num,
   13036             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   13037             :         },
   13038             :         {
   13039             :                 .name = discard_const_p(char, "db_create_time"),
   13040             :                 .get = py_netr_DELTA_POLICY_get_db_create_time,
   13041             :                 .set = py_netr_DELTA_POLICY_set_db_create_time,
   13042             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   13043             :         },
   13044             :         {
   13045             :                 .name = discard_const_p(char, "SecurityInformation"),
   13046             :                 .get = py_netr_DELTA_POLICY_get_SecurityInformation,
   13047             :                 .set = py_netr_DELTA_POLICY_set_SecurityInformation,
   13048             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13049             :         },
   13050             :         {
   13051             :                 .name = discard_const_p(char, "sdbuf"),
   13052             :                 .get = py_netr_DELTA_POLICY_get_sdbuf,
   13053             :                 .set = py_netr_DELTA_POLICY_set_sdbuf,
   13054             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   13055             :         },
   13056             :         {
   13057             :                 .name = discard_const_p(char, "unknown1"),
   13058             :                 .get = py_netr_DELTA_POLICY_get_unknown1,
   13059             :                 .set = py_netr_DELTA_POLICY_set_unknown1,
   13060             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13061             :         },
   13062             :         {
   13063             :                 .name = discard_const_p(char, "unknown2"),
   13064             :                 .get = py_netr_DELTA_POLICY_get_unknown2,
   13065             :                 .set = py_netr_DELTA_POLICY_set_unknown2,
   13066             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13067             :         },
   13068             :         {
   13069             :                 .name = discard_const_p(char, "unknown3"),
   13070             :                 .get = py_netr_DELTA_POLICY_get_unknown3,
   13071             :                 .set = py_netr_DELTA_POLICY_set_unknown3,
   13072             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13073             :         },
   13074             :         {
   13075             :                 .name = discard_const_p(char, "unknown4"),
   13076             :                 .get = py_netr_DELTA_POLICY_get_unknown4,
   13077             :                 .set = py_netr_DELTA_POLICY_set_unknown4,
   13078             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13079             :         },
   13080             :         {
   13081             :                 .name = discard_const_p(char, "unknown5"),
   13082             :                 .get = py_netr_DELTA_POLICY_get_unknown5,
   13083             :                 .set = py_netr_DELTA_POLICY_set_unknown5,
   13084             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13085             :         },
   13086             :         {
   13087             :                 .name = discard_const_p(char, "unknown6"),
   13088             :                 .get = py_netr_DELTA_POLICY_get_unknown6,
   13089             :                 .set = py_netr_DELTA_POLICY_set_unknown6,
   13090             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13091             :         },
   13092             :         {
   13093             :                 .name = discard_const_p(char, "unknown7"),
   13094             :                 .get = py_netr_DELTA_POLICY_get_unknown7,
   13095             :                 .set = py_netr_DELTA_POLICY_set_unknown7,
   13096             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13097             :         },
   13098             :         {
   13099             :                 .name = discard_const_p(char, "unknown8"),
   13100             :                 .get = py_netr_DELTA_POLICY_get_unknown8,
   13101             :                 .set = py_netr_DELTA_POLICY_set_unknown8,
   13102             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13103             :         },
   13104             :         { .name = NULL }
   13105             : };
   13106             : 
   13107           0 : static PyObject *py_netr_DELTA_POLICY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13108             : {
   13109           0 :         return pytalloc_new(struct netr_DELTA_POLICY, type);
   13110             : }
   13111             : 
   13112             : 
   13113             : static PyTypeObject netr_DELTA_POLICY_Type = {
   13114             :         PyVarObject_HEAD_INIT(NULL, 0)
   13115             :         .tp_name = "netlogon.netr_DELTA_POLICY",
   13116             :         .tp_getset = py_netr_DELTA_POLICY_getsetters,
   13117             :         .tp_methods = NULL,
   13118             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13119             :         .tp_new = py_netr_DELTA_POLICY_new,
   13120             : };
   13121             : 
   13122             : 
   13123           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_domain_name(PyObject *obj, void *closure)
   13124             : {
   13125           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13126           0 :         PyObject *py_domain_name;
   13127           0 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
   13128           0 :         return py_domain_name;
   13129             : }
   13130             : 
   13131           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   13132             : {
   13133           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13134           0 :         if (value == NULL) {
   13135           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_name");
   13136           0 :                 return -1;
   13137             :         }
   13138           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13139           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13140           0 :                 PyErr_NoMemory();
   13141           0 :                 return -1;
   13142             :         }
   13143           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   13144           0 :         return 0;
   13145             : }
   13146             : 
   13147           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_num_controllers(PyObject *obj, void *closure)
   13148             : {
   13149           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13150           0 :         PyObject *py_num_controllers;
   13151           0 :         py_num_controllers = PyLong_FromUnsignedLongLong((uint32_t)(object->num_controllers));
   13152           0 :         return py_num_controllers;
   13153             : }
   13154             : 
   13155           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_num_controllers(PyObject *py_obj, PyObject *value, void *closure)
   13156             : {
   13157           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13158           0 :         if (value == NULL) {
   13159           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_controllers");
   13160           0 :                 return -1;
   13161             :         }
   13162             :         {
   13163           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_controllers));
   13164           0 :                 if (PyLong_Check(value)) {
   13165           0 :                         unsigned long long test_var;
   13166           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13167           0 :                         if (PyErr_Occurred() != NULL) {
   13168           0 :                                 return -1;
   13169             :                         }
   13170           0 :                         if (test_var > uint_max) {
   13171           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13172             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13173           0 :                                 return -1;
   13174             :                         }
   13175           0 :                         object->num_controllers = test_var;
   13176             :                 } else {
   13177           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13178             :                           PyLong_Type.tp_name);
   13179           0 :                         return -1;
   13180             :                 }
   13181             :         }
   13182           0 :         return 0;
   13183             : }
   13184             : 
   13185           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_controller_names(PyObject *obj, void *closure)
   13186             : {
   13187           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13188           0 :         PyObject *py_controller_names;
   13189           0 :         if (object->controller_names == NULL) {
   13190           0 :                 Py_RETURN_NONE;
   13191             :         }
   13192           0 :         if (object->controller_names == NULL) {
   13193           0 :                 py_controller_names = Py_None;
   13194           0 :                 Py_INCREF(py_controller_names);
   13195             :         } else {
   13196           0 :                 py_controller_names = PyList_New(object->num_controllers);
   13197           0 :                 if (py_controller_names == NULL) {
   13198           0 :                         return NULL;
   13199             :                 }
   13200             :                 {
   13201             :                         int controller_names_cntr_1;
   13202           0 :                         for (controller_names_cntr_1 = 0; controller_names_cntr_1 < (object->num_controllers); controller_names_cntr_1++) {
   13203           0 :                                 PyObject *py_controller_names_1;
   13204           0 :                                 py_controller_names_1 = pytalloc_reference_ex(lsa_String_Type, object->controller_names, &(object->controller_names)[controller_names_cntr_1]);
   13205           0 :                                 PyList_SetItem(py_controller_names, controller_names_cntr_1, py_controller_names_1);
   13206             :                         }
   13207             :                 }
   13208             :         }
   13209           0 :         return py_controller_names;
   13210             : }
   13211             : 
   13212           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_controller_names(PyObject *py_obj, PyObject *value, void *closure)
   13213             : {
   13214           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13215           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->controller_names));
   13216           0 :         if (value == NULL) {
   13217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->controller_names");
   13218           0 :                 return -1;
   13219             :         }
   13220           0 :         if (value == Py_None) {
   13221           0 :                 object->controller_names = NULL;
   13222             :         } else {
   13223           0 :                 object->controller_names = NULL;
   13224           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13225             :                 {
   13226           0 :                         int controller_names_cntr_1;
   13227           0 :                         object->controller_names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->controller_names, PyList_GET_SIZE(value));
   13228           0 :                         if (!object->controller_names) { return -1; }
   13229           0 :                         talloc_set_name_const(object->controller_names, "ARRAY: object->controller_names");
   13230           0 :                         for (controller_names_cntr_1 = 0; controller_names_cntr_1 < PyList_GET_SIZE(value); controller_names_cntr_1++) {
   13231           0 :                                 if (PyList_GET_ITEM(value, controller_names_cntr_1) == NULL) {
   13232           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->controller_names)[controller_names_cntr_1]");
   13233           0 :                                         return -1;
   13234             :                                 }
   13235           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, controller_names_cntr_1), return -1;);
   13236           0 :                                 if (talloc_reference(object->controller_names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, controller_names_cntr_1))) == NULL) {
   13237           0 :                                         PyErr_NoMemory();
   13238           0 :                                         return -1;
   13239             :                                 }
   13240           0 :                                 (object->controller_names)[controller_names_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, controller_names_cntr_1));
   13241             :                         }
   13242             :                 }
   13243             :         }
   13244           0 :         return 0;
   13245             : }
   13246             : 
   13247           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_SecurityInformation(PyObject *obj, void *closure)
   13248             : {
   13249           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13250           0 :         PyObject *py_SecurityInformation;
   13251           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
   13252           0 :         return py_SecurityInformation;
   13253             : }
   13254             : 
   13255           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   13256             : {
   13257           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13258           0 :         if (value == NULL) {
   13259           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
   13260           0 :                 return -1;
   13261             :         }
   13262             :         {
   13263           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   13264           0 :                 if (PyLong_Check(value)) {
   13265           0 :                         unsigned long long test_var;
   13266           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13267           0 :                         if (PyErr_Occurred() != NULL) {
   13268           0 :                                 return -1;
   13269             :                         }
   13270           0 :                         if (test_var > uint_max) {
   13271           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13272             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13273           0 :                                 return -1;
   13274             :                         }
   13275           0 :                         object->SecurityInformation = test_var;
   13276             :                 } else {
   13277           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13278             :                           PyLong_Type.tp_name);
   13279           0 :                         return -1;
   13280             :                 }
   13281             :         }
   13282           0 :         return 0;
   13283             : }
   13284             : 
   13285           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_sdbuf(PyObject *obj, void *closure)
   13286             : {
   13287           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13288           0 :         PyObject *py_sdbuf;
   13289           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   13290           0 :         return py_sdbuf;
   13291             : }
   13292             : 
   13293           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   13294             : {
   13295           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13296           0 :         if (value == NULL) {
   13297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
   13298           0 :                 return -1;
   13299             :         }
   13300           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   13301           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13302           0 :                 PyErr_NoMemory();
   13303           0 :                 return -1;
   13304             :         }
   13305           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   13306           0 :         return 0;
   13307             : }
   13308             : 
   13309           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown1(PyObject *obj, void *closure)
   13310             : {
   13311           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13312           0 :         PyObject *py_unknown1;
   13313           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   13314           0 :         return py_unknown1;
   13315             : }
   13316             : 
   13317           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   13318             : {
   13319           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13320           0 :         if (value == NULL) {
   13321           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   13322           0 :                 return -1;
   13323             :         }
   13324           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13325           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13326           0 :                 PyErr_NoMemory();
   13327           0 :                 return -1;
   13328             :         }
   13329           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13330           0 :         return 0;
   13331             : }
   13332             : 
   13333           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown2(PyObject *obj, void *closure)
   13334             : {
   13335           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13336           0 :         PyObject *py_unknown2;
   13337           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   13338           0 :         return py_unknown2;
   13339             : }
   13340             : 
   13341           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   13342             : {
   13343           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13344           0 :         if (value == NULL) {
   13345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   13346           0 :                 return -1;
   13347             :         }
   13348           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13349           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13350           0 :                 PyErr_NoMemory();
   13351           0 :                 return -1;
   13352             :         }
   13353           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13354           0 :         return 0;
   13355             : }
   13356             : 
   13357           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown3(PyObject *obj, void *closure)
   13358             : {
   13359           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13360           0 :         PyObject *py_unknown3;
   13361           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   13362           0 :         return py_unknown3;
   13363             : }
   13364             : 
   13365           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   13366             : {
   13367           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13368           0 :         if (value == NULL) {
   13369           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   13370           0 :                 return -1;
   13371             :         }
   13372           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13373           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13374           0 :                 PyErr_NoMemory();
   13375           0 :                 return -1;
   13376             :         }
   13377           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13378           0 :         return 0;
   13379             : }
   13380             : 
   13381           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown4(PyObject *obj, void *closure)
   13382             : {
   13383           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13384           0 :         PyObject *py_unknown4;
   13385           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   13386           0 :         return py_unknown4;
   13387             : }
   13388             : 
   13389           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   13390             : {
   13391           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13392           0 :         if (value == NULL) {
   13393           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   13394           0 :                 return -1;
   13395             :         }
   13396           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13397           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13398           0 :                 PyErr_NoMemory();
   13399           0 :                 return -1;
   13400             :         }
   13401           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13402           0 :         return 0;
   13403             : }
   13404             : 
   13405           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_posix_offset(PyObject *obj, void *closure)
   13406             : {
   13407           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13408           0 :         PyObject *py_posix_offset;
   13409           0 :         py_posix_offset = PyLong_FromUnsignedLongLong((uint32_t)(object->posix_offset));
   13410           0 :         return py_posix_offset;
   13411             : }
   13412             : 
   13413           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_posix_offset(PyObject *py_obj, PyObject *value, void *closure)
   13414             : {
   13415           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13416           0 :         if (value == NULL) {
   13417           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->posix_offset");
   13418           0 :                 return -1;
   13419             :         }
   13420             :         {
   13421           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->posix_offset));
   13422           0 :                 if (PyLong_Check(value)) {
   13423           0 :                         unsigned long long test_var;
   13424           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13425           0 :                         if (PyErr_Occurred() != NULL) {
   13426           0 :                                 return -1;
   13427             :                         }
   13428           0 :                         if (test_var > uint_max) {
   13429           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13430             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13431           0 :                                 return -1;
   13432             :                         }
   13433           0 :                         object->posix_offset = test_var;
   13434             :                 } else {
   13435           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13436             :                           PyLong_Type.tp_name);
   13437           0 :                         return -1;
   13438             :                 }
   13439             :         }
   13440           0 :         return 0;
   13441             : }
   13442             : 
   13443           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown6(PyObject *obj, void *closure)
   13444             : {
   13445           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13446           0 :         PyObject *py_unknown6;
   13447           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
   13448           0 :         return py_unknown6;
   13449             : }
   13450             : 
   13451           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   13452             : {
   13453           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13454           0 :         if (value == NULL) {
   13455           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
   13456           0 :                 return -1;
   13457             :         }
   13458             :         {
   13459           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   13460           0 :                 if (PyLong_Check(value)) {
   13461           0 :                         unsigned long long test_var;
   13462           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13463           0 :                         if (PyErr_Occurred() != NULL) {
   13464           0 :                                 return -1;
   13465             :                         }
   13466           0 :                         if (test_var > uint_max) {
   13467           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13468             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13469           0 :                                 return -1;
   13470             :                         }
   13471           0 :                         object->unknown6 = test_var;
   13472             :                 } else {
   13473           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13474             :                           PyLong_Type.tp_name);
   13475           0 :                         return -1;
   13476             :                 }
   13477             :         }
   13478           0 :         return 0;
   13479             : }
   13480             : 
   13481           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown7(PyObject *obj, void *closure)
   13482             : {
   13483           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13484           0 :         PyObject *py_unknown7;
   13485           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
   13486           0 :         return py_unknown7;
   13487             : }
   13488             : 
   13489           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   13490             : {
   13491           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13492           0 :         if (value == NULL) {
   13493           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
   13494           0 :                 return -1;
   13495             :         }
   13496             :         {
   13497           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   13498           0 :                 if (PyLong_Check(value)) {
   13499           0 :                         unsigned long long test_var;
   13500           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13501           0 :                         if (PyErr_Occurred() != NULL) {
   13502           0 :                                 return -1;
   13503             :                         }
   13504           0 :                         if (test_var > uint_max) {
   13505           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13506             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13507           0 :                                 return -1;
   13508             :                         }
   13509           0 :                         object->unknown7 = test_var;
   13510             :                 } else {
   13511           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13512             :                           PyLong_Type.tp_name);
   13513           0 :                         return -1;
   13514             :                 }
   13515             :         }
   13516           0 :         return 0;
   13517             : }
   13518             : 
   13519           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown8(PyObject *obj, void *closure)
   13520             : {
   13521           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
   13522           0 :         PyObject *py_unknown8;
   13523           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
   13524           0 :         return py_unknown8;
   13525             : }
   13526             : 
   13527           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   13528             : {
   13529           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
   13530           0 :         if (value == NULL) {
   13531           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
   13532           0 :                 return -1;
   13533             :         }
   13534             :         {
   13535           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   13536           0 :                 if (PyLong_Check(value)) {
   13537           0 :                         unsigned long long test_var;
   13538           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13539           0 :                         if (PyErr_Occurred() != NULL) {
   13540           0 :                                 return -1;
   13541             :                         }
   13542           0 :                         if (test_var > uint_max) {
   13543           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13544             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13545           0 :                                 return -1;
   13546             :                         }
   13547           0 :                         object->unknown8 = test_var;
   13548             :                 } else {
   13549           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13550             :                           PyLong_Type.tp_name);
   13551           0 :                         return -1;
   13552             :                 }
   13553             :         }
   13554           0 :         return 0;
   13555             : }
   13556             : 
   13557             : static PyGetSetDef py_netr_DELTA_TRUSTED_DOMAIN_getsetters[] = {
   13558             :         {
   13559             :                 .name = discard_const_p(char, "domain_name"),
   13560             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_domain_name,
   13561             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_domain_name,
   13562             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13563             :         },
   13564             :         {
   13565             :                 .name = discard_const_p(char, "num_controllers"),
   13566             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_num_controllers,
   13567             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_num_controllers,
   13568             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13569             :         },
   13570             :         {
   13571             :                 .name = discard_const_p(char, "controller_names"),
   13572             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_controller_names,
   13573             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_controller_names,
   13574             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13575             :         },
   13576             :         {
   13577             :                 .name = discard_const_p(char, "SecurityInformation"),
   13578             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_SecurityInformation,
   13579             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_SecurityInformation,
   13580             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13581             :         },
   13582             :         {
   13583             :                 .name = discard_const_p(char, "sdbuf"),
   13584             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_sdbuf,
   13585             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_sdbuf,
   13586             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   13587             :         },
   13588             :         {
   13589             :                 .name = discard_const_p(char, "unknown1"),
   13590             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown1,
   13591             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown1,
   13592             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13593             :         },
   13594             :         {
   13595             :                 .name = discard_const_p(char, "unknown2"),
   13596             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown2,
   13597             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown2,
   13598             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13599             :         },
   13600             :         {
   13601             :                 .name = discard_const_p(char, "unknown3"),
   13602             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown3,
   13603             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown3,
   13604             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13605             :         },
   13606             :         {
   13607             :                 .name = discard_const_p(char, "unknown4"),
   13608             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown4,
   13609             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown4,
   13610             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13611             :         },
   13612             :         {
   13613             :                 .name = discard_const_p(char, "posix_offset"),
   13614             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_posix_offset,
   13615             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_posix_offset,
   13616             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13617             :         },
   13618             :         {
   13619             :                 .name = discard_const_p(char, "unknown6"),
   13620             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown6,
   13621             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown6,
   13622             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13623             :         },
   13624             :         {
   13625             :                 .name = discard_const_p(char, "unknown7"),
   13626             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown7,
   13627             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown7,
   13628             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13629             :         },
   13630             :         {
   13631             :                 .name = discard_const_p(char, "unknown8"),
   13632             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown8,
   13633             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown8,
   13634             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13635             :         },
   13636             :         { .name = NULL }
   13637             : };
   13638             : 
   13639           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13640             : {
   13641           0 :         return pytalloc_new(struct netr_DELTA_TRUSTED_DOMAIN, type);
   13642             : }
   13643             : 
   13644             : 
   13645             : static PyTypeObject netr_DELTA_TRUSTED_DOMAIN_Type = {
   13646             :         PyVarObject_HEAD_INIT(NULL, 0)
   13647             :         .tp_name = "netlogon.netr_DELTA_TRUSTED_DOMAIN",
   13648             :         .tp_getset = py_netr_DELTA_TRUSTED_DOMAIN_getsetters,
   13649             :         .tp_methods = NULL,
   13650             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13651             :         .tp_new = py_netr_DELTA_TRUSTED_DOMAIN_new,
   13652             : };
   13653             : 
   13654             : 
   13655           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_entries(PyObject *obj, void *closure)
   13656             : {
   13657           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   13658           0 :         PyObject *py_privilege_entries;
   13659           0 :         py_privilege_entries = PyLong_FromUnsignedLongLong((uint32_t)(object->privilege_entries));
   13660           0 :         return py_privilege_entries;
   13661             : }
   13662             : 
   13663           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_entries(PyObject *py_obj, PyObject *value, void *closure)
   13664             : {
   13665           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   13666           0 :         if (value == NULL) {
   13667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->privilege_entries");
   13668           0 :                 return -1;
   13669             :         }
   13670             :         {
   13671           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_entries));
   13672           0 :                 if (PyLong_Check(value)) {
   13673           0 :                         unsigned long long test_var;
   13674           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13675           0 :                         if (PyErr_Occurred() != NULL) {
   13676           0 :                                 return -1;
   13677             :                         }
   13678           0 :                         if (test_var > uint_max) {
   13679           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13680             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13681           0 :                                 return -1;
   13682             :                         }
   13683           0 :                         object->privilege_entries = test_var;
   13684             :                 } else {
   13685           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13686             :                           PyLong_Type.tp_name);
   13687           0 :                         return -1;
   13688             :                 }
   13689             :         }
   13690           0 :         return 0;
   13691             : }
   13692             : 
   13693           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_control(PyObject *obj, void *closure)
   13694             : {
   13695           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   13696           0 :         PyObject *py_privilege_control;
   13697           0 :         py_privilege_control = PyLong_FromUnsignedLongLong((uint32_t)(object->privilege_control));
   13698           0 :         return py_privilege_control;
   13699             : }
   13700             : 
   13701           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_control(PyObject *py_obj, PyObject *value, void *closure)
   13702             : {
   13703           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   13704           0 :         if (value == NULL) {
   13705           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->privilege_control");
   13706           0 :                 return -1;
   13707             :         }
   13708             :         {
   13709           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_control));
   13710           0 :                 if (PyLong_Check(value)) {
   13711           0 :                         unsigned long long test_var;
   13712           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13713           0 :                         if (PyErr_Occurred() != NULL) {
   13714           0 :                                 return -1;
   13715             :                         }
   13716           0 :                         if (test_var > uint_max) {
   13717           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13718             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13719           0 :                                 return -1;
   13720             :                         }
   13721           0 :                         object->privilege_control = test_var;
   13722             :                 } else {
   13723           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13724             :                           PyLong_Type.tp_name);
   13725           0 :                         return -1;
   13726             :                 }
   13727             :         }
   13728           0 :         return 0;
   13729             : }
   13730             : 
   13731           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_attrib(PyObject *obj, void *closure)
   13732             : {
   13733           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   13734           0 :         PyObject *py_privilege_attrib;
   13735           0 :         if (object->privilege_attrib == NULL) {
   13736           0 :                 Py_RETURN_NONE;
   13737             :         }
   13738           0 :         if (object->privilege_attrib == NULL) {
   13739           0 :                 py_privilege_attrib = Py_None;
   13740           0 :                 Py_INCREF(py_privilege_attrib);
   13741             :         } else {
   13742           0 :                 py_privilege_attrib = PyList_New(object->privilege_entries);
   13743           0 :                 if (py_privilege_attrib == NULL) {
   13744           0 :                         return NULL;
   13745             :                 }
   13746             :                 {
   13747             :                         int privilege_attrib_cntr_1;
   13748           0 :                         for (privilege_attrib_cntr_1 = 0; privilege_attrib_cntr_1 < (object->privilege_entries); privilege_attrib_cntr_1++) {
   13749           0 :                                 PyObject *py_privilege_attrib_1;
   13750           0 :                                 py_privilege_attrib_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->privilege_attrib)[privilege_attrib_cntr_1]));
   13751           0 :                                 PyList_SetItem(py_privilege_attrib, privilege_attrib_cntr_1, py_privilege_attrib_1);
   13752             :                         }
   13753             :                 }
   13754             :         }
   13755           0 :         return py_privilege_attrib;
   13756             : }
   13757             : 
   13758           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_attrib(PyObject *py_obj, PyObject *value, void *closure)
   13759             : {
   13760           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   13761           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->privilege_attrib));
   13762           0 :         if (value == NULL) {
   13763           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->privilege_attrib");
   13764           0 :                 return -1;
   13765             :         }
   13766           0 :         if (value == Py_None) {
   13767           0 :                 object->privilege_attrib = NULL;
   13768             :         } else {
   13769           0 :                 object->privilege_attrib = NULL;
   13770           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13771             :                 {
   13772           0 :                         int privilege_attrib_cntr_1;
   13773           0 :                         object->privilege_attrib = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->privilege_attrib, PyList_GET_SIZE(value));
   13774           0 :                         if (!object->privilege_attrib) { return -1; }
   13775           0 :                         talloc_set_name_const(object->privilege_attrib, "ARRAY: object->privilege_attrib");
   13776           0 :                         for (privilege_attrib_cntr_1 = 0; privilege_attrib_cntr_1 < PyList_GET_SIZE(value); privilege_attrib_cntr_1++) {
   13777           0 :                                 if (PyList_GET_ITEM(value, privilege_attrib_cntr_1) == NULL) {
   13778           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->privilege_attrib)[privilege_attrib_cntr_1]");
   13779           0 :                                         return -1;
   13780             :                                 }
   13781             :                                 {
   13782           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->privilege_attrib)[privilege_attrib_cntr_1]));
   13783           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, privilege_attrib_cntr_1))) {
   13784           0 :                                                 unsigned long long test_var;
   13785           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, privilege_attrib_cntr_1));
   13786           0 :                                                 if (PyErr_Occurred() != NULL) {
   13787           0 :                                                         return -1;
   13788             :                                                 }
   13789           0 :                                                 if (test_var > uint_max) {
   13790           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13791             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   13792           0 :                                                         return -1;
   13793             :                                                 }
   13794           0 :                                                 (object->privilege_attrib)[privilege_attrib_cntr_1] = test_var;
   13795             :                                         } else {
   13796           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   13797             :                                                   PyLong_Type.tp_name);
   13798           0 :                                                 return -1;
   13799             :                                         }
   13800             :                                 }
   13801             :                         }
   13802             :                 }
   13803             :         }
   13804           0 :         return 0;
   13805             : }
   13806             : 
   13807           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_name(PyObject *obj, void *closure)
   13808             : {
   13809           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   13810           0 :         PyObject *py_privilege_name;
   13811           0 :         if (object->privilege_name == NULL) {
   13812           0 :                 Py_RETURN_NONE;
   13813             :         }
   13814           0 :         if (object->privilege_name == NULL) {
   13815           0 :                 py_privilege_name = Py_None;
   13816           0 :                 Py_INCREF(py_privilege_name);
   13817             :         } else {
   13818           0 :                 py_privilege_name = PyList_New(object->privilege_entries);
   13819           0 :                 if (py_privilege_name == NULL) {
   13820           0 :                         return NULL;
   13821             :                 }
   13822             :                 {
   13823             :                         int privilege_name_cntr_1;
   13824           0 :                         for (privilege_name_cntr_1 = 0; privilege_name_cntr_1 < (object->privilege_entries); privilege_name_cntr_1++) {
   13825           0 :                                 PyObject *py_privilege_name_1;
   13826           0 :                                 py_privilege_name_1 = pytalloc_reference_ex(lsa_String_Type, object->privilege_name, &(object->privilege_name)[privilege_name_cntr_1]);
   13827           0 :                                 PyList_SetItem(py_privilege_name, privilege_name_cntr_1, py_privilege_name_1);
   13828             :                         }
   13829             :                 }
   13830             :         }
   13831           0 :         return py_privilege_name;
   13832             : }
   13833             : 
   13834           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_name(PyObject *py_obj, PyObject *value, void *closure)
   13835             : {
   13836           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   13837           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->privilege_name));
   13838           0 :         if (value == NULL) {
   13839           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->privilege_name");
   13840           0 :                 return -1;
   13841             :         }
   13842           0 :         if (value == Py_None) {
   13843           0 :                 object->privilege_name = NULL;
   13844             :         } else {
   13845           0 :                 object->privilege_name = NULL;
   13846           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13847             :                 {
   13848           0 :                         int privilege_name_cntr_1;
   13849           0 :                         object->privilege_name = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->privilege_name, PyList_GET_SIZE(value));
   13850           0 :                         if (!object->privilege_name) { return -1; }
   13851           0 :                         talloc_set_name_const(object->privilege_name, "ARRAY: object->privilege_name");
   13852           0 :                         for (privilege_name_cntr_1 = 0; privilege_name_cntr_1 < PyList_GET_SIZE(value); privilege_name_cntr_1++) {
   13853           0 :                                 if (PyList_GET_ITEM(value, privilege_name_cntr_1) == NULL) {
   13854           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->privilege_name)[privilege_name_cntr_1]");
   13855           0 :                                         return -1;
   13856             :                                 }
   13857           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, privilege_name_cntr_1), return -1;);
   13858           0 :                                 if (talloc_reference(object->privilege_name, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, privilege_name_cntr_1))) == NULL) {
   13859           0 :                                         PyErr_NoMemory();
   13860           0 :                                         return -1;
   13861             :                                 }
   13862           0 :                                 (object->privilege_name)[privilege_name_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, privilege_name_cntr_1));
   13863             :                         }
   13864             :                 }
   13865             :         }
   13866           0 :         return 0;
   13867             : }
   13868             : 
   13869           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_quotalimits(PyObject *obj, void *closure)
   13870             : {
   13871           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   13872           0 :         PyObject *py_quotalimits;
   13873           0 :         py_quotalimits = pytalloc_reference_ex(&netr_QUOTA_LIMITS_Type, pytalloc_get_mem_ctx(obj), &object->quotalimits);
   13874           0 :         return py_quotalimits;
   13875             : }
   13876             : 
   13877           0 : static int py_netr_DELTA_ACCOUNT_set_quotalimits(PyObject *py_obj, PyObject *value, void *closure)
   13878             : {
   13879           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   13880           0 :         if (value == NULL) {
   13881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->quotalimits");
   13882           0 :                 return -1;
   13883             :         }
   13884           0 :         PY_CHECK_TYPE(&netr_QUOTA_LIMITS_Type, value, return -1;);
   13885           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13886           0 :                 PyErr_NoMemory();
   13887           0 :                 return -1;
   13888             :         }
   13889           0 :         object->quotalimits = *(struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(value);
   13890           0 :         return 0;
   13891             : }
   13892             : 
   13893           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_system_flags(PyObject *obj, void *closure)
   13894             : {
   13895           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   13896           0 :         PyObject *py_system_flags;
   13897           0 :         py_system_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->system_flags));
   13898           0 :         return py_system_flags;
   13899             : }
   13900             : 
   13901           0 : static int py_netr_DELTA_ACCOUNT_set_system_flags(PyObject *py_obj, PyObject *value, void *closure)
   13902             : {
   13903           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   13904           0 :         if (value == NULL) {
   13905           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->system_flags");
   13906           0 :                 return -1;
   13907             :         }
   13908             :         {
   13909           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->system_flags));
   13910           0 :                 if (PyLong_Check(value)) {
   13911           0 :                         unsigned long long test_var;
   13912           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13913           0 :                         if (PyErr_Occurred() != NULL) {
   13914           0 :                                 return -1;
   13915             :                         }
   13916           0 :                         if (test_var > uint_max) {
   13917           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13918             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13919           0 :                                 return -1;
   13920             :                         }
   13921           0 :                         object->system_flags = test_var;
   13922             :                 } else {
   13923           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13924             :                           PyLong_Type.tp_name);
   13925           0 :                         return -1;
   13926             :                 }
   13927             :         }
   13928           0 :         return 0;
   13929             : }
   13930             : 
   13931           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_SecurityInformation(PyObject *obj, void *closure)
   13932             : {
   13933           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   13934           0 :         PyObject *py_SecurityInformation;
   13935           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
   13936           0 :         return py_SecurityInformation;
   13937             : }
   13938             : 
   13939           0 : static int py_netr_DELTA_ACCOUNT_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   13940             : {
   13941           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   13942           0 :         if (value == NULL) {
   13943           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
   13944           0 :                 return -1;
   13945             :         }
   13946             :         {
   13947           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   13948           0 :                 if (PyLong_Check(value)) {
   13949           0 :                         unsigned long long test_var;
   13950           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13951           0 :                         if (PyErr_Occurred() != NULL) {
   13952           0 :                                 return -1;
   13953             :                         }
   13954           0 :                         if (test_var > uint_max) {
   13955           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13956             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13957           0 :                                 return -1;
   13958             :                         }
   13959           0 :                         object->SecurityInformation = test_var;
   13960             :                 } else {
   13961           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13962             :                           PyLong_Type.tp_name);
   13963           0 :                         return -1;
   13964             :                 }
   13965             :         }
   13966           0 :         return 0;
   13967             : }
   13968             : 
   13969           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_sdbuf(PyObject *obj, void *closure)
   13970             : {
   13971           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   13972           0 :         PyObject *py_sdbuf;
   13973           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   13974           0 :         return py_sdbuf;
   13975             : }
   13976             : 
   13977           0 : static int py_netr_DELTA_ACCOUNT_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   13978             : {
   13979           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   13980           0 :         if (value == NULL) {
   13981           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
   13982           0 :                 return -1;
   13983             :         }
   13984           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   13985           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13986           0 :                 PyErr_NoMemory();
   13987           0 :                 return -1;
   13988             :         }
   13989           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   13990           0 :         return 0;
   13991             : }
   13992             : 
   13993           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown1(PyObject *obj, void *closure)
   13994             : {
   13995           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   13996           0 :         PyObject *py_unknown1;
   13997           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   13998           0 :         return py_unknown1;
   13999             : }
   14000             : 
   14001           0 : static int py_netr_DELTA_ACCOUNT_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   14002             : {
   14003           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   14004           0 :         if (value == NULL) {
   14005           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   14006           0 :                 return -1;
   14007             :         }
   14008           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14009           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14010           0 :                 PyErr_NoMemory();
   14011           0 :                 return -1;
   14012             :         }
   14013           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14014           0 :         return 0;
   14015             : }
   14016             : 
   14017           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown2(PyObject *obj, void *closure)
   14018             : {
   14019           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   14020           0 :         PyObject *py_unknown2;
   14021           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   14022           0 :         return py_unknown2;
   14023             : }
   14024             : 
   14025           0 : static int py_netr_DELTA_ACCOUNT_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   14026             : {
   14027           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   14028           0 :         if (value == NULL) {
   14029           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   14030           0 :                 return -1;
   14031             :         }
   14032           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14033           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14034           0 :                 PyErr_NoMemory();
   14035           0 :                 return -1;
   14036             :         }
   14037           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14038           0 :         return 0;
   14039             : }
   14040             : 
   14041           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown3(PyObject *obj, void *closure)
   14042             : {
   14043           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   14044           0 :         PyObject *py_unknown3;
   14045           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   14046           0 :         return py_unknown3;
   14047             : }
   14048             : 
   14049           0 : static int py_netr_DELTA_ACCOUNT_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   14050             : {
   14051           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   14052           0 :         if (value == NULL) {
   14053           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   14054           0 :                 return -1;
   14055             :         }
   14056           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14057           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14058           0 :                 PyErr_NoMemory();
   14059           0 :                 return -1;
   14060             :         }
   14061           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14062           0 :         return 0;
   14063             : }
   14064             : 
   14065           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown4(PyObject *obj, void *closure)
   14066             : {
   14067           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   14068           0 :         PyObject *py_unknown4;
   14069           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   14070           0 :         return py_unknown4;
   14071             : }
   14072             : 
   14073           0 : static int py_netr_DELTA_ACCOUNT_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   14074             : {
   14075           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   14076           0 :         if (value == NULL) {
   14077           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   14078           0 :                 return -1;
   14079             :         }
   14080           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14081           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14082           0 :                 PyErr_NoMemory();
   14083           0 :                 return -1;
   14084             :         }
   14085           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14086           0 :         return 0;
   14087             : }
   14088             : 
   14089           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown5(PyObject *obj, void *closure)
   14090             : {
   14091           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   14092           0 :         PyObject *py_unknown5;
   14093           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
   14094           0 :         return py_unknown5;
   14095             : }
   14096             : 
   14097           0 : static int py_netr_DELTA_ACCOUNT_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   14098             : {
   14099           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   14100           0 :         if (value == NULL) {
   14101           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
   14102           0 :                 return -1;
   14103             :         }
   14104             :         {
   14105           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   14106           0 :                 if (PyLong_Check(value)) {
   14107           0 :                         unsigned long long test_var;
   14108           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14109           0 :                         if (PyErr_Occurred() != NULL) {
   14110           0 :                                 return -1;
   14111             :                         }
   14112           0 :                         if (test_var > uint_max) {
   14113           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14114             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14115           0 :                                 return -1;
   14116             :                         }
   14117           0 :                         object->unknown5 = test_var;
   14118             :                 } else {
   14119           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14120             :                           PyLong_Type.tp_name);
   14121           0 :                         return -1;
   14122             :                 }
   14123             :         }
   14124           0 :         return 0;
   14125             : }
   14126             : 
   14127           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown6(PyObject *obj, void *closure)
   14128             : {
   14129           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   14130           0 :         PyObject *py_unknown6;
   14131           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
   14132           0 :         return py_unknown6;
   14133             : }
   14134             : 
   14135           0 : static int py_netr_DELTA_ACCOUNT_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   14136             : {
   14137           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   14138           0 :         if (value == NULL) {
   14139           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
   14140           0 :                 return -1;
   14141             :         }
   14142             :         {
   14143           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   14144           0 :                 if (PyLong_Check(value)) {
   14145           0 :                         unsigned long long test_var;
   14146           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14147           0 :                         if (PyErr_Occurred() != NULL) {
   14148           0 :                                 return -1;
   14149             :                         }
   14150           0 :                         if (test_var > uint_max) {
   14151           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14152             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14153           0 :                                 return -1;
   14154             :                         }
   14155           0 :                         object->unknown6 = test_var;
   14156             :                 } else {
   14157           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14158             :                           PyLong_Type.tp_name);
   14159           0 :                         return -1;
   14160             :                 }
   14161             :         }
   14162           0 :         return 0;
   14163             : }
   14164             : 
   14165           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown7(PyObject *obj, void *closure)
   14166             : {
   14167           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   14168           0 :         PyObject *py_unknown7;
   14169           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
   14170           0 :         return py_unknown7;
   14171             : }
   14172             : 
   14173           0 : static int py_netr_DELTA_ACCOUNT_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   14174             : {
   14175           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   14176           0 :         if (value == NULL) {
   14177           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
   14178           0 :                 return -1;
   14179             :         }
   14180             :         {
   14181           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   14182           0 :                 if (PyLong_Check(value)) {
   14183           0 :                         unsigned long long test_var;
   14184           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14185           0 :                         if (PyErr_Occurred() != NULL) {
   14186           0 :                                 return -1;
   14187             :                         }
   14188           0 :                         if (test_var > uint_max) {
   14189           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14190             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14191           0 :                                 return -1;
   14192             :                         }
   14193           0 :                         object->unknown7 = test_var;
   14194             :                 } else {
   14195           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14196             :                           PyLong_Type.tp_name);
   14197           0 :                         return -1;
   14198             :                 }
   14199             :         }
   14200           0 :         return 0;
   14201             : }
   14202             : 
   14203           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown8(PyObject *obj, void *closure)
   14204             : {
   14205           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
   14206           0 :         PyObject *py_unknown8;
   14207           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
   14208           0 :         return py_unknown8;
   14209             : }
   14210             : 
   14211           0 : static int py_netr_DELTA_ACCOUNT_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   14212             : {
   14213           0 :         struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
   14214           0 :         if (value == NULL) {
   14215           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
   14216           0 :                 return -1;
   14217             :         }
   14218             :         {
   14219           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   14220           0 :                 if (PyLong_Check(value)) {
   14221           0 :                         unsigned long long test_var;
   14222           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14223           0 :                         if (PyErr_Occurred() != NULL) {
   14224           0 :                                 return -1;
   14225             :                         }
   14226           0 :                         if (test_var > uint_max) {
   14227           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14228             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14229           0 :                                 return -1;
   14230             :                         }
   14231           0 :                         object->unknown8 = test_var;
   14232             :                 } else {
   14233           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14234             :                           PyLong_Type.tp_name);
   14235           0 :                         return -1;
   14236             :                 }
   14237             :         }
   14238           0 :         return 0;
   14239             : }
   14240             : 
   14241             : static PyGetSetDef py_netr_DELTA_ACCOUNT_getsetters[] = {
   14242             :         {
   14243             :                 .name = discard_const_p(char, "privilege_entries"),
   14244             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_entries,
   14245             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_entries,
   14246             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14247             :         },
   14248             :         {
   14249             :                 .name = discard_const_p(char, "privilege_control"),
   14250             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_control,
   14251             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_control,
   14252             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14253             :         },
   14254             :         {
   14255             :                 .name = discard_const_p(char, "privilege_attrib"),
   14256             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_attrib,
   14257             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_attrib,
   14258             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14259             :         },
   14260             :         {
   14261             :                 .name = discard_const_p(char, "privilege_name"),
   14262             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_name,
   14263             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_name,
   14264             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14265             :         },
   14266             :         {
   14267             :                 .name = discard_const_p(char, "quotalimits"),
   14268             :                 .get = py_netr_DELTA_ACCOUNT_get_quotalimits,
   14269             :                 .set = py_netr_DELTA_ACCOUNT_set_quotalimits,
   14270             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_QUOTA_LIMITS")
   14271             :         },
   14272             :         {
   14273             :                 .name = discard_const_p(char, "system_flags"),
   14274             :                 .get = py_netr_DELTA_ACCOUNT_get_system_flags,
   14275             :                 .set = py_netr_DELTA_ACCOUNT_set_system_flags,
   14276             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14277             :         },
   14278             :         {
   14279             :                 .name = discard_const_p(char, "SecurityInformation"),
   14280             :                 .get = py_netr_DELTA_ACCOUNT_get_SecurityInformation,
   14281             :                 .set = py_netr_DELTA_ACCOUNT_set_SecurityInformation,
   14282             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14283             :         },
   14284             :         {
   14285             :                 .name = discard_const_p(char, "sdbuf"),
   14286             :                 .get = py_netr_DELTA_ACCOUNT_get_sdbuf,
   14287             :                 .set = py_netr_DELTA_ACCOUNT_set_sdbuf,
   14288             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   14289             :         },
   14290             :         {
   14291             :                 .name = discard_const_p(char, "unknown1"),
   14292             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown1,
   14293             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown1,
   14294             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14295             :         },
   14296             :         {
   14297             :                 .name = discard_const_p(char, "unknown2"),
   14298             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown2,
   14299             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown2,
   14300             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14301             :         },
   14302             :         {
   14303             :                 .name = discard_const_p(char, "unknown3"),
   14304             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown3,
   14305             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown3,
   14306             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14307             :         },
   14308             :         {
   14309             :                 .name = discard_const_p(char, "unknown4"),
   14310             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown4,
   14311             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown4,
   14312             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14313             :         },
   14314             :         {
   14315             :                 .name = discard_const_p(char, "unknown5"),
   14316             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown5,
   14317             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown5,
   14318             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14319             :         },
   14320             :         {
   14321             :                 .name = discard_const_p(char, "unknown6"),
   14322             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown6,
   14323             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown6,
   14324             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14325             :         },
   14326             :         {
   14327             :                 .name = discard_const_p(char, "unknown7"),
   14328             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown7,
   14329             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown7,
   14330             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14331             :         },
   14332             :         {
   14333             :                 .name = discard_const_p(char, "unknown8"),
   14334             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown8,
   14335             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown8,
   14336             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14337             :         },
   14338             :         { .name = NULL }
   14339             : };
   14340             : 
   14341           0 : static PyObject *py_netr_DELTA_ACCOUNT_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14342             : {
   14343           0 :         return pytalloc_new(struct netr_DELTA_ACCOUNT, type);
   14344             : }
   14345             : 
   14346             : 
   14347             : static PyTypeObject netr_DELTA_ACCOUNT_Type = {
   14348             :         PyVarObject_HEAD_INIT(NULL, 0)
   14349             :         .tp_name = "netlogon.netr_DELTA_ACCOUNT",
   14350             :         .tp_getset = py_netr_DELTA_ACCOUNT_getsetters,
   14351             :         .tp_methods = NULL,
   14352             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14353             :         .tp_new = py_netr_DELTA_ACCOUNT_new,
   14354             : };
   14355             : 
   14356             : 
   14357           0 : static PyObject *py_netr_CIPHER_VALUE_get_len(PyObject *obj, void *closure)
   14358             : {
   14359           0 :         struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(obj);
   14360           0 :         PyObject *py_len;
   14361           0 :         py_len = PyLong_FromUnsignedLongLong((uint32_t)(object->len));
   14362           0 :         return py_len;
   14363             : }
   14364             : 
   14365           0 : static int py_netr_CIPHER_VALUE_set_len(PyObject *py_obj, PyObject *value, void *closure)
   14366             : {
   14367           0 :         struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(py_obj);
   14368           0 :         if (value == NULL) {
   14369           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->len");
   14370           0 :                 return -1;
   14371             :         }
   14372             :         {
   14373           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->len));
   14374           0 :                 if (PyLong_Check(value)) {
   14375           0 :                         unsigned long long test_var;
   14376           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14377           0 :                         if (PyErr_Occurred() != NULL) {
   14378           0 :                                 return -1;
   14379             :                         }
   14380           0 :                         if (test_var > uint_max) {
   14381           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14382             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14383           0 :                                 return -1;
   14384             :                         }
   14385           0 :                         object->len = test_var;
   14386             :                 } else {
   14387           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14388             :                           PyLong_Type.tp_name);
   14389           0 :                         return -1;
   14390             :                 }
   14391             :         }
   14392           0 :         return 0;
   14393             : }
   14394             : 
   14395           0 : static PyObject *py_netr_CIPHER_VALUE_get_maxlen(PyObject *obj, void *closure)
   14396             : {
   14397           0 :         struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(obj);
   14398           0 :         PyObject *py_maxlen;
   14399           0 :         py_maxlen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxlen));
   14400           0 :         return py_maxlen;
   14401             : }
   14402             : 
   14403           0 : static int py_netr_CIPHER_VALUE_set_maxlen(PyObject *py_obj, PyObject *value, void *closure)
   14404             : {
   14405           0 :         struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(py_obj);
   14406           0 :         if (value == NULL) {
   14407           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxlen");
   14408           0 :                 return -1;
   14409             :         }
   14410             :         {
   14411           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlen));
   14412           0 :                 if (PyLong_Check(value)) {
   14413           0 :                         unsigned long long test_var;
   14414           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14415           0 :                         if (PyErr_Occurred() != NULL) {
   14416           0 :                                 return -1;
   14417             :                         }
   14418           0 :                         if (test_var > uint_max) {
   14419           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14420             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14421           0 :                                 return -1;
   14422             :                         }
   14423           0 :                         object->maxlen = test_var;
   14424             :                 } else {
   14425           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14426             :                           PyLong_Type.tp_name);
   14427           0 :                         return -1;
   14428             :                 }
   14429             :         }
   14430           0 :         return 0;
   14431             : }
   14432             : 
   14433           0 : static PyObject *py_netr_CIPHER_VALUE_get_cipher_data(PyObject *obj, void *closure)
   14434             : {
   14435           0 :         struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(obj);
   14436           0 :         PyObject *py_cipher_data;
   14437           0 :         if (object->cipher_data == NULL) {
   14438           0 :                 Py_RETURN_NONE;
   14439             :         }
   14440           0 :         if (object->cipher_data == NULL) {
   14441           0 :                 py_cipher_data = Py_None;
   14442           0 :                 Py_INCREF(py_cipher_data);
   14443             :         } else {
   14444           0 :                 py_cipher_data = PyList_New(object->len);
   14445           0 :                 if (py_cipher_data == NULL) {
   14446           0 :                         return NULL;
   14447             :                 }
   14448             :                 {
   14449             :                         int cipher_data_cntr_1;
   14450           0 :                         for (cipher_data_cntr_1 = 0; cipher_data_cntr_1 < (object->len); cipher_data_cntr_1++) {
   14451           0 :                                 PyObject *py_cipher_data_1;
   14452           0 :                                 py_cipher_data_1 = PyLong_FromLong((uint16_t)((object->cipher_data)[cipher_data_cntr_1]));
   14453           0 :                                 PyList_SetItem(py_cipher_data, cipher_data_cntr_1, py_cipher_data_1);
   14454             :                         }
   14455             :                 }
   14456             :         }
   14457           0 :         return py_cipher_data;
   14458             : }
   14459             : 
   14460           0 : static int py_netr_CIPHER_VALUE_set_cipher_data(PyObject *py_obj, PyObject *value, void *closure)
   14461             : {
   14462           0 :         struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(py_obj);
   14463           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->cipher_data));
   14464           0 :         if (value == NULL) {
   14465           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->cipher_data");
   14466           0 :                 return -1;
   14467             :         }
   14468           0 :         if (value == Py_None) {
   14469           0 :                 object->cipher_data = NULL;
   14470             :         } else {
   14471           0 :                 object->cipher_data = NULL;
   14472           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   14473             :                 {
   14474           0 :                         int cipher_data_cntr_1;
   14475           0 :                         object->cipher_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cipher_data, PyList_GET_SIZE(value));
   14476           0 :                         if (!object->cipher_data) { return -1; }
   14477           0 :                         talloc_set_name_const(object->cipher_data, "ARRAY: object->cipher_data");
   14478           0 :                         for (cipher_data_cntr_1 = 0; cipher_data_cntr_1 < PyList_GET_SIZE(value); cipher_data_cntr_1++) {
   14479           0 :                                 if (PyList_GET_ITEM(value, cipher_data_cntr_1) == NULL) {
   14480           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->cipher_data)[cipher_data_cntr_1]");
   14481           0 :                                         return -1;
   14482             :                                 }
   14483             :                                 {
   14484           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->cipher_data)[cipher_data_cntr_1]));
   14485           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, cipher_data_cntr_1))) {
   14486           0 :                                                 unsigned long long test_var;
   14487           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, cipher_data_cntr_1));
   14488           0 :                                                 if (PyErr_Occurred() != NULL) {
   14489           0 :                                                         return -1;
   14490             :                                                 }
   14491           0 :                                                 if (test_var > uint_max) {
   14492           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14493             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   14494           0 :                                                         return -1;
   14495             :                                                 }
   14496           0 :                                                 (object->cipher_data)[cipher_data_cntr_1] = test_var;
   14497             :                                         } else {
   14498           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   14499             :                                                   PyLong_Type.tp_name);
   14500           0 :                                                 return -1;
   14501             :                                         }
   14502             :                                 }
   14503             :                         }
   14504             :                 }
   14505             :         }
   14506           0 :         return 0;
   14507             : }
   14508             : 
   14509             : static PyGetSetDef py_netr_CIPHER_VALUE_getsetters[] = {
   14510             :         {
   14511             :                 .name = discard_const_p(char, "len"),
   14512             :                 .get = py_netr_CIPHER_VALUE_get_len,
   14513             :                 .set = py_netr_CIPHER_VALUE_set_len,
   14514             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14515             :         },
   14516             :         {
   14517             :                 .name = discard_const_p(char, "maxlen"),
   14518             :                 .get = py_netr_CIPHER_VALUE_get_maxlen,
   14519             :                 .set = py_netr_CIPHER_VALUE_set_maxlen,
   14520             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14521             :         },
   14522             :         {
   14523             :                 .name = discard_const_p(char, "cipher_data"),
   14524             :                 .get = py_netr_CIPHER_VALUE_get_cipher_data,
   14525             :                 .set = py_netr_CIPHER_VALUE_set_cipher_data,
   14526             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14527             :         },
   14528             :         { .name = NULL }
   14529             : };
   14530             : 
   14531           0 : static PyObject *py_netr_CIPHER_VALUE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14532             : {
   14533           0 :         return pytalloc_new(struct netr_CIPHER_VALUE, type);
   14534             : }
   14535             : 
   14536             : 
   14537             : static PyTypeObject netr_CIPHER_VALUE_Type = {
   14538             :         PyVarObject_HEAD_INIT(NULL, 0)
   14539             :         .tp_name = "netlogon.netr_CIPHER_VALUE",
   14540             :         .tp_getset = py_netr_CIPHER_VALUE_getsetters,
   14541             :         .tp_methods = NULL,
   14542             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14543             :         .tp_new = py_netr_CIPHER_VALUE_new,
   14544             : };
   14545             : 
   14546             : 
   14547           0 : static PyObject *py_netr_DELTA_SECRET_get_current_cipher(PyObject *obj, void *closure)
   14548             : {
   14549           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14550           0 :         PyObject *py_current_cipher;
   14551           0 :         py_current_cipher = pytalloc_reference_ex(&netr_CIPHER_VALUE_Type, pytalloc_get_mem_ctx(obj), &object->current_cipher);
   14552           0 :         return py_current_cipher;
   14553             : }
   14554             : 
   14555           0 : static int py_netr_DELTA_SECRET_set_current_cipher(PyObject *py_obj, PyObject *value, void *closure)
   14556             : {
   14557           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14558           0 :         if (value == NULL) {
   14559           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->current_cipher");
   14560           0 :                 return -1;
   14561             :         }
   14562           0 :         PY_CHECK_TYPE(&netr_CIPHER_VALUE_Type, value, return -1;);
   14563           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14564           0 :                 PyErr_NoMemory();
   14565           0 :                 return -1;
   14566             :         }
   14567           0 :         object->current_cipher = *(struct netr_CIPHER_VALUE *)pytalloc_get_ptr(value);
   14568           0 :         return 0;
   14569             : }
   14570             : 
   14571           0 : static PyObject *py_netr_DELTA_SECRET_get_current_cipher_set_time(PyObject *obj, void *closure)
   14572             : {
   14573           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14574           0 :         PyObject *py_current_cipher_set_time;
   14575           0 :         py_current_cipher_set_time = PyLong_FromUnsignedLongLong(object->current_cipher_set_time);
   14576           0 :         return py_current_cipher_set_time;
   14577             : }
   14578             : 
   14579           0 : static int py_netr_DELTA_SECRET_set_current_cipher_set_time(PyObject *py_obj, PyObject *value, void *closure)
   14580             : {
   14581           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14582           0 :         if (value == NULL) {
   14583           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->current_cipher_set_time");
   14584           0 :                 return -1;
   14585             :         }
   14586             :         {
   14587           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_cipher_set_time));
   14588           0 :                 if (PyLong_Check(value)) {
   14589           0 :                         unsigned long long test_var;
   14590           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14591           0 :                         if (PyErr_Occurred() != NULL) {
   14592           0 :                                 return -1;
   14593             :                         }
   14594           0 :                         if (test_var > uint_max) {
   14595           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14596             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14597           0 :                                 return -1;
   14598             :                         }
   14599           0 :                         object->current_cipher_set_time = test_var;
   14600             :                 } else {
   14601           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14602             :                           PyLong_Type.tp_name);
   14603           0 :                         return -1;
   14604             :                 }
   14605             :         }
   14606           0 :         return 0;
   14607             : }
   14608             : 
   14609           0 : static PyObject *py_netr_DELTA_SECRET_get_old_cipher(PyObject *obj, void *closure)
   14610             : {
   14611           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14612           0 :         PyObject *py_old_cipher;
   14613           0 :         py_old_cipher = pytalloc_reference_ex(&netr_CIPHER_VALUE_Type, pytalloc_get_mem_ctx(obj), &object->old_cipher);
   14614           0 :         return py_old_cipher;
   14615             : }
   14616             : 
   14617           0 : static int py_netr_DELTA_SECRET_set_old_cipher(PyObject *py_obj, PyObject *value, void *closure)
   14618             : {
   14619           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14620           0 :         if (value == NULL) {
   14621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->old_cipher");
   14622           0 :                 return -1;
   14623             :         }
   14624           0 :         PY_CHECK_TYPE(&netr_CIPHER_VALUE_Type, value, return -1;);
   14625           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14626           0 :                 PyErr_NoMemory();
   14627           0 :                 return -1;
   14628             :         }
   14629           0 :         object->old_cipher = *(struct netr_CIPHER_VALUE *)pytalloc_get_ptr(value);
   14630           0 :         return 0;
   14631             : }
   14632             : 
   14633           0 : static PyObject *py_netr_DELTA_SECRET_get_old_cipher_set_time(PyObject *obj, void *closure)
   14634             : {
   14635           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14636           0 :         PyObject *py_old_cipher_set_time;
   14637           0 :         py_old_cipher_set_time = PyLong_FromUnsignedLongLong(object->old_cipher_set_time);
   14638           0 :         return py_old_cipher_set_time;
   14639             : }
   14640             : 
   14641           0 : static int py_netr_DELTA_SECRET_set_old_cipher_set_time(PyObject *py_obj, PyObject *value, void *closure)
   14642             : {
   14643           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14644           0 :         if (value == NULL) {
   14645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->old_cipher_set_time");
   14646           0 :                 return -1;
   14647             :         }
   14648             :         {
   14649           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->old_cipher_set_time));
   14650           0 :                 if (PyLong_Check(value)) {
   14651           0 :                         unsigned long long test_var;
   14652           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14653           0 :                         if (PyErr_Occurred() != NULL) {
   14654           0 :                                 return -1;
   14655             :                         }
   14656           0 :                         if (test_var > uint_max) {
   14657           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14658             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14659           0 :                                 return -1;
   14660             :                         }
   14661           0 :                         object->old_cipher_set_time = test_var;
   14662             :                 } else {
   14663           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14664             :                           PyLong_Type.tp_name);
   14665           0 :                         return -1;
   14666             :                 }
   14667             :         }
   14668           0 :         return 0;
   14669             : }
   14670             : 
   14671           0 : static PyObject *py_netr_DELTA_SECRET_get_SecurityInformation(PyObject *obj, void *closure)
   14672             : {
   14673           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14674           0 :         PyObject *py_SecurityInformation;
   14675           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
   14676           0 :         return py_SecurityInformation;
   14677             : }
   14678             : 
   14679           0 : static int py_netr_DELTA_SECRET_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   14680             : {
   14681           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14682           0 :         if (value == NULL) {
   14683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
   14684           0 :                 return -1;
   14685             :         }
   14686             :         {
   14687           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   14688           0 :                 if (PyLong_Check(value)) {
   14689           0 :                         unsigned long long test_var;
   14690           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14691           0 :                         if (PyErr_Occurred() != NULL) {
   14692           0 :                                 return -1;
   14693             :                         }
   14694           0 :                         if (test_var > uint_max) {
   14695           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14696             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14697           0 :                                 return -1;
   14698             :                         }
   14699           0 :                         object->SecurityInformation = test_var;
   14700             :                 } else {
   14701           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14702             :                           PyLong_Type.tp_name);
   14703           0 :                         return -1;
   14704             :                 }
   14705             :         }
   14706           0 :         return 0;
   14707             : }
   14708             : 
   14709           0 : static PyObject *py_netr_DELTA_SECRET_get_sdbuf(PyObject *obj, void *closure)
   14710             : {
   14711           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14712           0 :         PyObject *py_sdbuf;
   14713           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   14714           0 :         return py_sdbuf;
   14715             : }
   14716             : 
   14717           0 : static int py_netr_DELTA_SECRET_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   14718             : {
   14719           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14720           0 :         if (value == NULL) {
   14721           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
   14722           0 :                 return -1;
   14723             :         }
   14724           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   14725           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14726           0 :                 PyErr_NoMemory();
   14727           0 :                 return -1;
   14728             :         }
   14729           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   14730           0 :         return 0;
   14731             : }
   14732             : 
   14733           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown1(PyObject *obj, void *closure)
   14734             : {
   14735           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14736           0 :         PyObject *py_unknown1;
   14737           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   14738           0 :         return py_unknown1;
   14739             : }
   14740             : 
   14741           0 : static int py_netr_DELTA_SECRET_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   14742             : {
   14743           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14744           0 :         if (value == NULL) {
   14745           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   14746           0 :                 return -1;
   14747             :         }
   14748           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14749           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14750           0 :                 PyErr_NoMemory();
   14751           0 :                 return -1;
   14752             :         }
   14753           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14754           0 :         return 0;
   14755             : }
   14756             : 
   14757           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown2(PyObject *obj, void *closure)
   14758             : {
   14759           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14760           0 :         PyObject *py_unknown2;
   14761           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   14762           0 :         return py_unknown2;
   14763             : }
   14764             : 
   14765           0 : static int py_netr_DELTA_SECRET_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   14766             : {
   14767           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14768           0 :         if (value == NULL) {
   14769           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   14770           0 :                 return -1;
   14771             :         }
   14772           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14773           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14774           0 :                 PyErr_NoMemory();
   14775           0 :                 return -1;
   14776             :         }
   14777           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14778           0 :         return 0;
   14779             : }
   14780             : 
   14781           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown3(PyObject *obj, void *closure)
   14782             : {
   14783           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14784           0 :         PyObject *py_unknown3;
   14785           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   14786           0 :         return py_unknown3;
   14787             : }
   14788             : 
   14789           0 : static int py_netr_DELTA_SECRET_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   14790             : {
   14791           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14792           0 :         if (value == NULL) {
   14793           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   14794           0 :                 return -1;
   14795             :         }
   14796           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14797           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14798           0 :                 PyErr_NoMemory();
   14799           0 :                 return -1;
   14800             :         }
   14801           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14802           0 :         return 0;
   14803             : }
   14804             : 
   14805           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown4(PyObject *obj, void *closure)
   14806             : {
   14807           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14808           0 :         PyObject *py_unknown4;
   14809           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   14810           0 :         return py_unknown4;
   14811             : }
   14812             : 
   14813           0 : static int py_netr_DELTA_SECRET_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   14814             : {
   14815           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14816           0 :         if (value == NULL) {
   14817           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   14818           0 :                 return -1;
   14819             :         }
   14820           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14821           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14822           0 :                 PyErr_NoMemory();
   14823           0 :                 return -1;
   14824             :         }
   14825           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14826           0 :         return 0;
   14827             : }
   14828             : 
   14829           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown5(PyObject *obj, void *closure)
   14830             : {
   14831           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14832           0 :         PyObject *py_unknown5;
   14833           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
   14834           0 :         return py_unknown5;
   14835             : }
   14836             : 
   14837           0 : static int py_netr_DELTA_SECRET_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   14838             : {
   14839           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14840           0 :         if (value == NULL) {
   14841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
   14842           0 :                 return -1;
   14843             :         }
   14844             :         {
   14845           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   14846           0 :                 if (PyLong_Check(value)) {
   14847           0 :                         unsigned long long test_var;
   14848           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14849           0 :                         if (PyErr_Occurred() != NULL) {
   14850           0 :                                 return -1;
   14851             :                         }
   14852           0 :                         if (test_var > uint_max) {
   14853           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14854             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14855           0 :                                 return -1;
   14856             :                         }
   14857           0 :                         object->unknown5 = test_var;
   14858             :                 } else {
   14859           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14860             :                           PyLong_Type.tp_name);
   14861           0 :                         return -1;
   14862             :                 }
   14863             :         }
   14864           0 :         return 0;
   14865             : }
   14866             : 
   14867           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown6(PyObject *obj, void *closure)
   14868             : {
   14869           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14870           0 :         PyObject *py_unknown6;
   14871           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
   14872           0 :         return py_unknown6;
   14873             : }
   14874             : 
   14875           0 : static int py_netr_DELTA_SECRET_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   14876             : {
   14877           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14878           0 :         if (value == NULL) {
   14879           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
   14880           0 :                 return -1;
   14881             :         }
   14882             :         {
   14883           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   14884           0 :                 if (PyLong_Check(value)) {
   14885           0 :                         unsigned long long test_var;
   14886           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14887           0 :                         if (PyErr_Occurred() != NULL) {
   14888           0 :                                 return -1;
   14889             :                         }
   14890           0 :                         if (test_var > uint_max) {
   14891           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14892             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14893           0 :                                 return -1;
   14894             :                         }
   14895           0 :                         object->unknown6 = test_var;
   14896             :                 } else {
   14897           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14898             :                           PyLong_Type.tp_name);
   14899           0 :                         return -1;
   14900             :                 }
   14901             :         }
   14902           0 :         return 0;
   14903             : }
   14904             : 
   14905           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown7(PyObject *obj, void *closure)
   14906             : {
   14907           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14908           0 :         PyObject *py_unknown7;
   14909           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
   14910           0 :         return py_unknown7;
   14911             : }
   14912             : 
   14913           0 : static int py_netr_DELTA_SECRET_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   14914             : {
   14915           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14916           0 :         if (value == NULL) {
   14917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
   14918           0 :                 return -1;
   14919             :         }
   14920             :         {
   14921           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   14922           0 :                 if (PyLong_Check(value)) {
   14923           0 :                         unsigned long long test_var;
   14924           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14925           0 :                         if (PyErr_Occurred() != NULL) {
   14926           0 :                                 return -1;
   14927             :                         }
   14928           0 :                         if (test_var > uint_max) {
   14929           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14930             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14931           0 :                                 return -1;
   14932             :                         }
   14933           0 :                         object->unknown7 = test_var;
   14934             :                 } else {
   14935           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14936             :                           PyLong_Type.tp_name);
   14937           0 :                         return -1;
   14938             :                 }
   14939             :         }
   14940           0 :         return 0;
   14941             : }
   14942             : 
   14943           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown8(PyObject *obj, void *closure)
   14944             : {
   14945           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
   14946           0 :         PyObject *py_unknown8;
   14947           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
   14948           0 :         return py_unknown8;
   14949             : }
   14950             : 
   14951           0 : static int py_netr_DELTA_SECRET_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   14952             : {
   14953           0 :         struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
   14954           0 :         if (value == NULL) {
   14955           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
   14956           0 :                 return -1;
   14957             :         }
   14958             :         {
   14959           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   14960           0 :                 if (PyLong_Check(value)) {
   14961           0 :                         unsigned long long test_var;
   14962           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14963           0 :                         if (PyErr_Occurred() != NULL) {
   14964           0 :                                 return -1;
   14965             :                         }
   14966           0 :                         if (test_var > uint_max) {
   14967           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14968             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14969           0 :                                 return -1;
   14970             :                         }
   14971           0 :                         object->unknown8 = test_var;
   14972             :                 } else {
   14973           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14974             :                           PyLong_Type.tp_name);
   14975           0 :                         return -1;
   14976             :                 }
   14977             :         }
   14978           0 :         return 0;
   14979             : }
   14980             : 
   14981             : static PyGetSetDef py_netr_DELTA_SECRET_getsetters[] = {
   14982             :         {
   14983             :                 .name = discard_const_p(char, "current_cipher"),
   14984             :                 .get = py_netr_DELTA_SECRET_get_current_cipher,
   14985             :                 .set = py_netr_DELTA_SECRET_set_current_cipher,
   14986             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CIPHER_VALUE")
   14987             :         },
   14988             :         {
   14989             :                 .name = discard_const_p(char, "current_cipher_set_time"),
   14990             :                 .get = py_netr_DELTA_SECRET_get_current_cipher_set_time,
   14991             :                 .set = py_netr_DELTA_SECRET_set_current_cipher_set_time,
   14992             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   14993             :         },
   14994             :         {
   14995             :                 .name = discard_const_p(char, "old_cipher"),
   14996             :                 .get = py_netr_DELTA_SECRET_get_old_cipher,
   14997             :                 .set = py_netr_DELTA_SECRET_set_old_cipher,
   14998             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CIPHER_VALUE")
   14999             :         },
   15000             :         {
   15001             :                 .name = discard_const_p(char, "old_cipher_set_time"),
   15002             :                 .get = py_netr_DELTA_SECRET_get_old_cipher_set_time,
   15003             :                 .set = py_netr_DELTA_SECRET_set_old_cipher_set_time,
   15004             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   15005             :         },
   15006             :         {
   15007             :                 .name = discard_const_p(char, "SecurityInformation"),
   15008             :                 .get = py_netr_DELTA_SECRET_get_SecurityInformation,
   15009             :                 .set = py_netr_DELTA_SECRET_set_SecurityInformation,
   15010             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15011             :         },
   15012             :         {
   15013             :                 .name = discard_const_p(char, "sdbuf"),
   15014             :                 .get = py_netr_DELTA_SECRET_get_sdbuf,
   15015             :                 .set = py_netr_DELTA_SECRET_set_sdbuf,
   15016             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   15017             :         },
   15018             :         {
   15019             :                 .name = discard_const_p(char, "unknown1"),
   15020             :                 .get = py_netr_DELTA_SECRET_get_unknown1,
   15021             :                 .set = py_netr_DELTA_SECRET_set_unknown1,
   15022             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   15023             :         },
   15024             :         {
   15025             :                 .name = discard_const_p(char, "unknown2"),
   15026             :                 .get = py_netr_DELTA_SECRET_get_unknown2,
   15027             :                 .set = py_netr_DELTA_SECRET_set_unknown2,
   15028             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   15029             :         },
   15030             :         {
   15031             :                 .name = discard_const_p(char, "unknown3"),
   15032             :                 .get = py_netr_DELTA_SECRET_get_unknown3,
   15033             :                 .set = py_netr_DELTA_SECRET_set_unknown3,
   15034             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   15035             :         },
   15036             :         {
   15037             :                 .name = discard_const_p(char, "unknown4"),
   15038             :                 .get = py_netr_DELTA_SECRET_get_unknown4,
   15039             :                 .set = py_netr_DELTA_SECRET_set_unknown4,
   15040             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   15041             :         },
   15042             :         {
   15043             :                 .name = discard_const_p(char, "unknown5"),
   15044             :                 .get = py_netr_DELTA_SECRET_get_unknown5,
   15045             :                 .set = py_netr_DELTA_SECRET_set_unknown5,
   15046             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15047             :         },
   15048             :         {
   15049             :                 .name = discard_const_p(char, "unknown6"),
   15050             :                 .get = py_netr_DELTA_SECRET_get_unknown6,
   15051             :                 .set = py_netr_DELTA_SECRET_set_unknown6,
   15052             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15053             :         },
   15054             :         {
   15055             :                 .name = discard_const_p(char, "unknown7"),
   15056             :                 .get = py_netr_DELTA_SECRET_get_unknown7,
   15057             :                 .set = py_netr_DELTA_SECRET_set_unknown7,
   15058             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15059             :         },
   15060             :         {
   15061             :                 .name = discard_const_p(char, "unknown8"),
   15062             :                 .get = py_netr_DELTA_SECRET_get_unknown8,
   15063             :                 .set = py_netr_DELTA_SECRET_set_unknown8,
   15064             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15065             :         },
   15066             :         { .name = NULL }
   15067             : };
   15068             : 
   15069           0 : static PyObject *py_netr_DELTA_SECRET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15070             : {
   15071           0 :         return pytalloc_new(struct netr_DELTA_SECRET, type);
   15072             : }
   15073             : 
   15074             : 
   15075             : static PyTypeObject netr_DELTA_SECRET_Type = {
   15076             :         PyVarObject_HEAD_INIT(NULL, 0)
   15077             :         .tp_name = "netlogon.netr_DELTA_SECRET",
   15078             :         .tp_getset = py_netr_DELTA_SECRET_getsetters,
   15079             :         .tp_methods = NULL,
   15080             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15081             :         .tp_new = py_netr_DELTA_SECRET_new,
   15082             : };
   15083             : 
   15084           0 : static PyObject *py_import_netr_DELTA_UNION(TALLOC_CTX *mem_ctx, int level, union netr_DELTA_UNION *in)
   15085             : {
   15086           0 :         PyObject *ret;
   15087             : 
   15088           0 :         switch (level) {
   15089           0 :                 case NETR_DELTA_DOMAIN:
   15090           0 :                         if (in->domain == NULL) {
   15091           0 :                                 ret = Py_None;
   15092           0 :                                 Py_INCREF(ret);
   15093             :                         } else {
   15094           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_DOMAIN_Type, in->domain, in->domain);
   15095             :                         }
   15096           0 :                         return ret;
   15097             : 
   15098           0 :                 case NETR_DELTA_GROUP:
   15099           0 :                         if (in->group == NULL) {
   15100           0 :                                 ret = Py_None;
   15101           0 :                                 Py_INCREF(ret);
   15102             :                         } else {
   15103           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_GROUP_Type, in->group, in->group);
   15104             :                         }
   15105           0 :                         return ret;
   15106             : 
   15107           0 :                 case NETR_DELTA_DELETE_GROUP:
   15108           0 :                         ret = Py_None;
   15109           0 :                         Py_INCREF(ret);
   15110           0 :                         return ret;
   15111             : 
   15112           0 :                 case NETR_DELTA_RENAME_GROUP:
   15113           0 :                         if (in->rename_group == NULL) {
   15114           0 :                                 ret = Py_None;
   15115           0 :                                 Py_INCREF(ret);
   15116             :                         } else {
   15117           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_group, in->rename_group);
   15118             :                         }
   15119           0 :                         return ret;
   15120             : 
   15121           0 :                 case NETR_DELTA_USER:
   15122           0 :                         if (in->user == NULL) {
   15123           0 :                                 ret = Py_None;
   15124           0 :                                 Py_INCREF(ret);
   15125             :                         } else {
   15126           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_USER_Type, in->user, in->user);
   15127             :                         }
   15128           0 :                         return ret;
   15129             : 
   15130           0 :                 case NETR_DELTA_DELETE_USER:
   15131           0 :                         ret = Py_None;
   15132           0 :                         Py_INCREF(ret);
   15133           0 :                         return ret;
   15134             : 
   15135           0 :                 case NETR_DELTA_RENAME_USER:
   15136           0 :                         if (in->rename_user == NULL) {
   15137           0 :                                 ret = Py_None;
   15138           0 :                                 Py_INCREF(ret);
   15139             :                         } else {
   15140           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_user, in->rename_user);
   15141             :                         }
   15142           0 :                         return ret;
   15143             : 
   15144           0 :                 case NETR_DELTA_GROUP_MEMBER:
   15145           0 :                         if (in->group_member == NULL) {
   15146           0 :                                 ret = Py_None;
   15147           0 :                                 Py_INCREF(ret);
   15148             :                         } else {
   15149           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_GROUP_MEMBER_Type, in->group_member, in->group_member);
   15150             :                         }
   15151           0 :                         return ret;
   15152             : 
   15153           0 :                 case NETR_DELTA_ALIAS:
   15154           0 :                         if (in->alias == NULL) {
   15155           0 :                                 ret = Py_None;
   15156           0 :                                 Py_INCREF(ret);
   15157             :                         } else {
   15158           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_ALIAS_Type, in->alias, in->alias);
   15159             :                         }
   15160           0 :                         return ret;
   15161             : 
   15162           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15163           0 :                         ret = Py_None;
   15164           0 :                         Py_INCREF(ret);
   15165           0 :                         return ret;
   15166             : 
   15167           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15168           0 :                         if (in->rename_alias == NULL) {
   15169           0 :                                 ret = Py_None;
   15170           0 :                                 Py_INCREF(ret);
   15171             :                         } else {
   15172           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_alias, in->rename_alias);
   15173             :                         }
   15174           0 :                         return ret;
   15175             : 
   15176           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15177           0 :                         if (in->alias_member == NULL) {
   15178           0 :                                 ret = Py_None;
   15179           0 :                                 Py_INCREF(ret);
   15180             :                         } else {
   15181           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_ALIAS_MEMBER_Type, in->alias_member, in->alias_member);
   15182             :                         }
   15183           0 :                         return ret;
   15184             : 
   15185           0 :                 case NETR_DELTA_POLICY:
   15186           0 :                         if (in->policy == NULL) {
   15187           0 :                                 ret = Py_None;
   15188           0 :                                 Py_INCREF(ret);
   15189             :                         } else {
   15190           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_POLICY_Type, in->policy, in->policy);
   15191             :                         }
   15192           0 :                         return ret;
   15193             : 
   15194           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   15195           0 :                         if (in->trusted_domain == NULL) {
   15196           0 :                                 ret = Py_None;
   15197           0 :                                 Py_INCREF(ret);
   15198             :                         } else {
   15199           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_TRUSTED_DOMAIN_Type, in->trusted_domain, in->trusted_domain);
   15200             :                         }
   15201           0 :                         return ret;
   15202             : 
   15203           0 :                 case NETR_DELTA_DELETE_TRUST:
   15204           0 :                         ret = Py_None;
   15205           0 :                         Py_INCREF(ret);
   15206           0 :                         return ret;
   15207             : 
   15208           0 :                 case NETR_DELTA_ACCOUNT:
   15209           0 :                         if (in->account == NULL) {
   15210           0 :                                 ret = Py_None;
   15211           0 :                                 Py_INCREF(ret);
   15212             :                         } else {
   15213           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_ACCOUNT_Type, in->account, in->account);
   15214             :                         }
   15215           0 :                         return ret;
   15216             : 
   15217           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   15218           0 :                         ret = Py_None;
   15219           0 :                         Py_INCREF(ret);
   15220           0 :                         return ret;
   15221             : 
   15222           0 :                 case NETR_DELTA_SECRET:
   15223           0 :                         if (in->secret == NULL) {
   15224           0 :                                 ret = Py_None;
   15225           0 :                                 Py_INCREF(ret);
   15226             :                         } else {
   15227           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_SECRET_Type, in->secret, in->secret);
   15228             :                         }
   15229           0 :                         return ret;
   15230             : 
   15231           0 :                 case NETR_DELTA_DELETE_SECRET:
   15232           0 :                         ret = Py_None;
   15233           0 :                         Py_INCREF(ret);
   15234           0 :                         return ret;
   15235             : 
   15236           0 :                 case NETR_DELTA_DELETE_GROUP2:
   15237           0 :                         if (in->delete_group == NULL) {
   15238           0 :                                 ret = Py_None;
   15239           0 :                                 Py_INCREF(ret);
   15240             :                         } else {
   15241           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_DELETE_USER_Type, in->delete_group, in->delete_group);
   15242             :                         }
   15243           0 :                         return ret;
   15244             : 
   15245           0 :                 case NETR_DELTA_DELETE_USER2:
   15246           0 :                         if (in->delete_user == NULL) {
   15247           0 :                                 ret = Py_None;
   15248           0 :                                 Py_INCREF(ret);
   15249             :                         } else {
   15250           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_DELETE_USER_Type, in->delete_user, in->delete_user);
   15251             :                         }
   15252           0 :                         return ret;
   15253             : 
   15254           0 :                 case NETR_DELTA_MODIFY_COUNT:
   15255           0 :                         if (in->modified_count == NULL) {
   15256           0 :                                 ret = Py_None;
   15257           0 :                                 Py_INCREF(ret);
   15258             :                         } else {
   15259           0 :                                 ret = PyLong_FromUnsignedLongLong(*in->modified_count);
   15260             :                         }
   15261           0 :                         return ret;
   15262             : 
   15263           0 :                 default:
   15264           0 :                         ret = Py_None;
   15265           0 :                         Py_INCREF(ret);
   15266           0 :                         return ret;
   15267             : 
   15268             :         }
   15269             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   15270             :         return NULL;
   15271             : }
   15272             : 
   15273           0 : static union netr_DELTA_UNION *py_export_netr_DELTA_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   15274             : {
   15275           0 :         union netr_DELTA_UNION *ret = talloc_zero(mem_ctx, union netr_DELTA_UNION);
   15276           0 :         switch (level) {
   15277           0 :                 case NETR_DELTA_DOMAIN:
   15278           0 :                         if (in == NULL) {
   15279           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
   15280           0 :                                 talloc_free(ret); return NULL;
   15281             :                         }
   15282           0 :                         if (in == Py_None) {
   15283           0 :                                 ret->domain = NULL;
   15284             :                         } else {
   15285           0 :                                 ret->domain = NULL;
   15286           0 :                                 PY_CHECK_TYPE(&netr_DELTA_DOMAIN_Type, in, talloc_free(ret); return NULL;);
   15287           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15288           0 :                                         PyErr_NoMemory();
   15289           0 :                                         talloc_free(ret); return NULL;
   15290             :                                 }
   15291           0 :                                 ret->domain = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(in);
   15292             :                         }
   15293           0 :                         break;
   15294             : 
   15295           0 :                 case NETR_DELTA_GROUP:
   15296           0 :                         if (in == NULL) {
   15297           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->group");
   15298           0 :                                 talloc_free(ret); return NULL;
   15299             :                         }
   15300           0 :                         if (in == Py_None) {
   15301           0 :                                 ret->group = NULL;
   15302             :                         } else {
   15303           0 :                                 ret->group = NULL;
   15304           0 :                                 PY_CHECK_TYPE(&netr_DELTA_GROUP_Type, in, talloc_free(ret); return NULL;);
   15305           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15306           0 :                                         PyErr_NoMemory();
   15307           0 :                                         talloc_free(ret); return NULL;
   15308             :                                 }
   15309           0 :                                 ret->group = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(in);
   15310             :                         }
   15311           0 :                         break;
   15312             : 
   15313           0 :                 case NETR_DELTA_DELETE_GROUP:
   15314           0 :                         break;
   15315             : 
   15316           0 :                 case NETR_DELTA_RENAME_GROUP:
   15317           0 :                         if (in == NULL) {
   15318           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rename_group");
   15319           0 :                                 talloc_free(ret); return NULL;
   15320             :                         }
   15321           0 :                         if (in == Py_None) {
   15322           0 :                                 ret->rename_group = NULL;
   15323             :                         } else {
   15324           0 :                                 ret->rename_group = NULL;
   15325           0 :                                 PY_CHECK_TYPE(&netr_DELTA_RENAME_Type, in, talloc_free(ret); return NULL;);
   15326           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15327           0 :                                         PyErr_NoMemory();
   15328           0 :                                         talloc_free(ret); return NULL;
   15329             :                                 }
   15330           0 :                                 ret->rename_group = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
   15331             :                         }
   15332           0 :                         break;
   15333             : 
   15334           0 :                 case NETR_DELTA_USER:
   15335           0 :                         if (in == NULL) {
   15336           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->user");
   15337           0 :                                 talloc_free(ret); return NULL;
   15338             :                         }
   15339           0 :                         if (in == Py_None) {
   15340           0 :                                 ret->user = NULL;
   15341             :                         } else {
   15342           0 :                                 ret->user = NULL;
   15343           0 :                                 PY_CHECK_TYPE(&netr_DELTA_USER_Type, in, talloc_free(ret); return NULL;);
   15344           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15345           0 :                                         PyErr_NoMemory();
   15346           0 :                                         talloc_free(ret); return NULL;
   15347             :                                 }
   15348           0 :                                 ret->user = (struct netr_DELTA_USER *)pytalloc_get_ptr(in);
   15349             :                         }
   15350           0 :                         break;
   15351             : 
   15352           0 :                 case NETR_DELTA_DELETE_USER:
   15353           0 :                         break;
   15354             : 
   15355           0 :                 case NETR_DELTA_RENAME_USER:
   15356           0 :                         if (in == NULL) {
   15357           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rename_user");
   15358           0 :                                 talloc_free(ret); return NULL;
   15359             :                         }
   15360           0 :                         if (in == Py_None) {
   15361           0 :                                 ret->rename_user = NULL;
   15362             :                         } else {
   15363           0 :                                 ret->rename_user = NULL;
   15364           0 :                                 PY_CHECK_TYPE(&netr_DELTA_RENAME_Type, in, talloc_free(ret); return NULL;);
   15365           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15366           0 :                                         PyErr_NoMemory();
   15367           0 :                                         talloc_free(ret); return NULL;
   15368             :                                 }
   15369           0 :                                 ret->rename_user = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
   15370             :                         }
   15371           0 :                         break;
   15372             : 
   15373           0 :                 case NETR_DELTA_GROUP_MEMBER:
   15374           0 :                         if (in == NULL) {
   15375           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->group_member");
   15376           0 :                                 talloc_free(ret); return NULL;
   15377             :                         }
   15378           0 :                         if (in == Py_None) {
   15379           0 :                                 ret->group_member = NULL;
   15380             :                         } else {
   15381           0 :                                 ret->group_member = NULL;
   15382           0 :                                 PY_CHECK_TYPE(&netr_DELTA_GROUP_MEMBER_Type, in, talloc_free(ret); return NULL;);
   15383           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15384           0 :                                         PyErr_NoMemory();
   15385           0 :                                         talloc_free(ret); return NULL;
   15386             :                                 }
   15387           0 :                                 ret->group_member = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(in);
   15388             :                         }
   15389           0 :                         break;
   15390             : 
   15391           0 :                 case NETR_DELTA_ALIAS:
   15392           0 :                         if (in == NULL) {
   15393           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->alias");
   15394           0 :                                 talloc_free(ret); return NULL;
   15395             :                         }
   15396           0 :                         if (in == Py_None) {
   15397           0 :                                 ret->alias = NULL;
   15398             :                         } else {
   15399           0 :                                 ret->alias = NULL;
   15400           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ALIAS_Type, in, talloc_free(ret); return NULL;);
   15401           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15402           0 :                                         PyErr_NoMemory();
   15403           0 :                                         talloc_free(ret); return NULL;
   15404             :                                 }
   15405           0 :                                 ret->alias = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(in);
   15406             :                         }
   15407           0 :                         break;
   15408             : 
   15409           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15410           0 :                         break;
   15411             : 
   15412           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15413           0 :                         if (in == NULL) {
   15414           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rename_alias");
   15415           0 :                                 talloc_free(ret); return NULL;
   15416             :                         }
   15417           0 :                         if (in == Py_None) {
   15418           0 :                                 ret->rename_alias = NULL;
   15419             :                         } else {
   15420           0 :                                 ret->rename_alias = NULL;
   15421           0 :                                 PY_CHECK_TYPE(&netr_DELTA_RENAME_Type, in, talloc_free(ret); return NULL;);
   15422           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15423           0 :                                         PyErr_NoMemory();
   15424           0 :                                         talloc_free(ret); return NULL;
   15425             :                                 }
   15426           0 :                                 ret->rename_alias = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
   15427             :                         }
   15428           0 :                         break;
   15429             : 
   15430           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15431           0 :                         if (in == NULL) {
   15432           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->alias_member");
   15433           0 :                                 talloc_free(ret); return NULL;
   15434             :                         }
   15435           0 :                         if (in == Py_None) {
   15436           0 :                                 ret->alias_member = NULL;
   15437             :                         } else {
   15438           0 :                                 ret->alias_member = NULL;
   15439           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ALIAS_MEMBER_Type, in, talloc_free(ret); return NULL;);
   15440           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15441           0 :                                         PyErr_NoMemory();
   15442           0 :                                         talloc_free(ret); return NULL;
   15443             :                                 }
   15444           0 :                                 ret->alias_member = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(in);
   15445             :                         }
   15446           0 :                         break;
   15447             : 
   15448           0 :                 case NETR_DELTA_POLICY:
   15449           0 :                         if (in == NULL) {
   15450           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->policy");
   15451           0 :                                 talloc_free(ret); return NULL;
   15452             :                         }
   15453           0 :                         if (in == Py_None) {
   15454           0 :                                 ret->policy = NULL;
   15455             :                         } else {
   15456           0 :                                 ret->policy = NULL;
   15457           0 :                                 PY_CHECK_TYPE(&netr_DELTA_POLICY_Type, in, talloc_free(ret); return NULL;);
   15458           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15459           0 :                                         PyErr_NoMemory();
   15460           0 :                                         talloc_free(ret); return NULL;
   15461             :                                 }
   15462           0 :                                 ret->policy = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(in);
   15463             :                         }
   15464           0 :                         break;
   15465             : 
   15466           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   15467           0 :                         if (in == NULL) {
   15468           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->trusted_domain");
   15469           0 :                                 talloc_free(ret); return NULL;
   15470             :                         }
   15471           0 :                         if (in == Py_None) {
   15472           0 :                                 ret->trusted_domain = NULL;
   15473             :                         } else {
   15474           0 :                                 ret->trusted_domain = NULL;
   15475           0 :                                 PY_CHECK_TYPE(&netr_DELTA_TRUSTED_DOMAIN_Type, in, talloc_free(ret); return NULL;);
   15476           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15477           0 :                                         PyErr_NoMemory();
   15478           0 :                                         talloc_free(ret); return NULL;
   15479             :                                 }
   15480           0 :                                 ret->trusted_domain = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(in);
   15481             :                         }
   15482           0 :                         break;
   15483             : 
   15484           0 :                 case NETR_DELTA_DELETE_TRUST:
   15485           0 :                         break;
   15486             : 
   15487           0 :                 case NETR_DELTA_ACCOUNT:
   15488           0 :                         if (in == NULL) {
   15489           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->account");
   15490           0 :                                 talloc_free(ret); return NULL;
   15491             :                         }
   15492           0 :                         if (in == Py_None) {
   15493           0 :                                 ret->account = NULL;
   15494             :                         } else {
   15495           0 :                                 ret->account = NULL;
   15496           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ACCOUNT_Type, in, talloc_free(ret); return NULL;);
   15497           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15498           0 :                                         PyErr_NoMemory();
   15499           0 :                                         talloc_free(ret); return NULL;
   15500             :                                 }
   15501           0 :                                 ret->account = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(in);
   15502             :                         }
   15503           0 :                         break;
   15504             : 
   15505           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   15506           0 :                         break;
   15507             : 
   15508           0 :                 case NETR_DELTA_SECRET:
   15509           0 :                         if (in == NULL) {
   15510           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->secret");
   15511           0 :                                 talloc_free(ret); return NULL;
   15512             :                         }
   15513           0 :                         if (in == Py_None) {
   15514           0 :                                 ret->secret = NULL;
   15515             :                         } else {
   15516           0 :                                 ret->secret = NULL;
   15517           0 :                                 PY_CHECK_TYPE(&netr_DELTA_SECRET_Type, in, talloc_free(ret); return NULL;);
   15518           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15519           0 :                                         PyErr_NoMemory();
   15520           0 :                                         talloc_free(ret); return NULL;
   15521             :                                 }
   15522           0 :                                 ret->secret = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(in);
   15523             :                         }
   15524           0 :                         break;
   15525             : 
   15526           0 :                 case NETR_DELTA_DELETE_SECRET:
   15527           0 :                         break;
   15528             : 
   15529           0 :                 case NETR_DELTA_DELETE_GROUP2:
   15530           0 :                         if (in == NULL) {
   15531           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->delete_group");
   15532           0 :                                 talloc_free(ret); return NULL;
   15533             :                         }
   15534           0 :                         if (in == Py_None) {
   15535           0 :                                 ret->delete_group = NULL;
   15536             :                         } else {
   15537           0 :                                 ret->delete_group = NULL;
   15538           0 :                                 PY_CHECK_TYPE(&netr_DELTA_DELETE_USER_Type, in, talloc_free(ret); return NULL;);
   15539           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15540           0 :                                         PyErr_NoMemory();
   15541           0 :                                         talloc_free(ret); return NULL;
   15542             :                                 }
   15543           0 :                                 ret->delete_group = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(in);
   15544             :                         }
   15545           0 :                         break;
   15546             : 
   15547           0 :                 case NETR_DELTA_DELETE_USER2:
   15548           0 :                         if (in == NULL) {
   15549           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->delete_user");
   15550           0 :                                 talloc_free(ret); return NULL;
   15551             :                         }
   15552           0 :                         if (in == Py_None) {
   15553           0 :                                 ret->delete_user = NULL;
   15554             :                         } else {
   15555           0 :                                 ret->delete_user = NULL;
   15556           0 :                                 PY_CHECK_TYPE(&netr_DELTA_DELETE_USER_Type, in, talloc_free(ret); return NULL;);
   15557           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15558           0 :                                         PyErr_NoMemory();
   15559           0 :                                         talloc_free(ret); return NULL;
   15560             :                                 }
   15561           0 :                                 ret->delete_user = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(in);
   15562             :                         }
   15563           0 :                         break;
   15564             : 
   15565           0 :                 case NETR_DELTA_MODIFY_COUNT:
   15566           0 :                         if (in == NULL) {
   15567           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->modified_count");
   15568           0 :                                 talloc_free(ret); return NULL;
   15569             :                         }
   15570           0 :                         if (in == Py_None) {
   15571           0 :                                 ret->modified_count = NULL;
   15572             :                         } else {
   15573           0 :                                 ret->modified_count = talloc_ptrtype(mem_ctx, ret->modified_count);
   15574           0 :                                 if (ret->modified_count == NULL) {
   15575           0 :                                         PyErr_NoMemory();
   15576           0 :                                         talloc_free(ret); return NULL;
   15577             :                                 }
   15578             :                                 {
   15579           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*ret->modified_count));
   15580           0 :                                         if (PyLong_Check(in)) {
   15581           0 :                                                 unsigned long long test_var;
   15582           0 :                                                 test_var = PyLong_AsUnsignedLongLong(in);
   15583           0 :                                                 if (PyErr_Occurred() != NULL) {
   15584           0 :                                                         talloc_free(ret); return NULL;
   15585             :                                                 }
   15586           0 :                                                 if (test_var > uint_max) {
   15587           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15588             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   15589           0 :                                                         talloc_free(ret); return NULL;
   15590             :                                                 }
   15591           0 :                                                 *ret->modified_count = test_var;
   15592             :                                         } else {
   15593           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   15594             :                                                   PyLong_Type.tp_name);
   15595           0 :                                                 talloc_free(ret); return NULL;
   15596             :                                         }
   15597             :                                 }
   15598             :                         }
   15599           0 :                         break;
   15600             : 
   15601           0 :                 default:
   15602           0 :                         break;
   15603             : 
   15604             :         }
   15605             : 
   15606           0 :         return ret;
   15607             : }
   15608             : 
   15609           0 : static PyObject *py_netr_DELTA_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15610             : {
   15611           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   15612           0 :         PyObject *mem_ctx_obj = NULL;
   15613           0 :         TALLOC_CTX *mem_ctx = NULL;
   15614           0 :         int level = 0;
   15615           0 :         PyObject *in_obj = NULL;
   15616           0 :         union netr_DELTA_UNION *in = NULL;
   15617             : 
   15618           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   15619             :                 discard_const_p(char *, kwnames),
   15620             :                 &mem_ctx_obj,
   15621             :                 &level,
   15622             :                 &in_obj)) {
   15623           0 :                 return NULL;
   15624             :         }
   15625           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   15626           0 :         if (mem_ctx == NULL) {
   15627           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   15628           0 :                 return NULL;
   15629             :         }
   15630           0 :         in = (union netr_DELTA_UNION *)pytalloc_get_ptr(in_obj);
   15631           0 :         if (in == NULL) {
   15632           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DELTA_UNION!");
   15633           0 :                 return NULL;
   15634             :         }
   15635             : 
   15636           0 :         return py_import_netr_DELTA_UNION(mem_ctx, level, in);
   15637             : }
   15638             : 
   15639           0 : static PyObject *py_netr_DELTA_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15640             : {
   15641           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   15642           0 :         PyObject *mem_ctx_obj = NULL;
   15643           0 :         TALLOC_CTX *mem_ctx = NULL;
   15644           0 :         int level = 0;
   15645           0 :         PyObject *in = NULL;
   15646           0 :         union netr_DELTA_UNION *out = NULL;
   15647             : 
   15648           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   15649             :                 discard_const_p(char *, kwnames),
   15650             :                 &mem_ctx_obj,
   15651             :                 &level,
   15652             :                 &in)) {
   15653           0 :                 return NULL;
   15654             :         }
   15655           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   15656           0 :         if (mem_ctx == NULL) {
   15657           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   15658           0 :                 return NULL;
   15659             :         }
   15660             : 
   15661           0 :         out = py_export_netr_DELTA_UNION(mem_ctx, level, in);
   15662           0 :         if (out == NULL) {
   15663           0 :                 return NULL;
   15664             :         }
   15665             : 
   15666           0 :         return pytalloc_GenericObject_reference(out);
   15667             : }
   15668             : 
   15669             : static PyMethodDef py_netr_DELTA_UNION_methods[] = {
   15670             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_UNION_import),
   15671             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   15672             :                 "T.__import__(mem_ctx, level, in) => ret." },
   15673             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_UNION_export),
   15674             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   15675             :                 "T.__export__(mem_ctx, level, in) => ret." },
   15676             :         { NULL, NULL, 0, NULL }
   15677             : };
   15678             : 
   15679           0 : static PyObject *py_netr_DELTA_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15680             : {
   15681           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   15682           0 :         return NULL;
   15683             : }
   15684             : 
   15685             : 
   15686             : static PyTypeObject netr_DELTA_UNION_Type = {
   15687             :         PyVarObject_HEAD_INIT(NULL, 0)
   15688             :         .tp_name = "netlogon.netr_DELTA_UNION",
   15689             :         .tp_getset = NULL,
   15690             :         .tp_methods = py_netr_DELTA_UNION_methods,
   15691             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15692             :         .tp_new = py_netr_DELTA_UNION_new,
   15693             : };
   15694             : 
   15695           0 : static PyObject *py_import_netr_DELTA_ID_UNION(TALLOC_CTX *mem_ctx, int level, union netr_DELTA_ID_UNION *in)
   15696             : {
   15697           0 :         PyObject *ret;
   15698             : 
   15699           0 :         switch (level) {
   15700           0 :                 case NETR_DELTA_DOMAIN:
   15701           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15702           0 :                         return ret;
   15703             : 
   15704           0 :                 case NETR_DELTA_GROUP:
   15705           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15706           0 :                         return ret;
   15707             : 
   15708           0 :                 case NETR_DELTA_DELETE_GROUP:
   15709           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15710           0 :                         return ret;
   15711             : 
   15712           0 :                 case NETR_DELTA_RENAME_GROUP:
   15713           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15714           0 :                         return ret;
   15715             : 
   15716           0 :                 case NETR_DELTA_USER:
   15717           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15718           0 :                         return ret;
   15719             : 
   15720           0 :                 case NETR_DELTA_DELETE_USER:
   15721           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15722           0 :                         return ret;
   15723             : 
   15724           0 :                 case NETR_DELTA_RENAME_USER:
   15725           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15726           0 :                         return ret;
   15727             : 
   15728           0 :                 case NETR_DELTA_GROUP_MEMBER:
   15729           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15730           0 :                         return ret;
   15731             : 
   15732           0 :                 case NETR_DELTA_ALIAS:
   15733           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15734           0 :                         return ret;
   15735             : 
   15736           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15737           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15738           0 :                         return ret;
   15739             : 
   15740           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15741           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15742           0 :                         return ret;
   15743             : 
   15744           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15745           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15746           0 :                         return ret;
   15747             : 
   15748           0 :                 case NETR_DELTA_POLICY:
   15749           0 :                         if (in->sid == NULL) {
   15750           0 :                                 ret = Py_None;
   15751           0 :                                 Py_INCREF(ret);
   15752             :                         } else {
   15753           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15754             :                         }
   15755           0 :                         return ret;
   15756             : 
   15757           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   15758           0 :                         if (in->sid == NULL) {
   15759           0 :                                 ret = Py_None;
   15760           0 :                                 Py_INCREF(ret);
   15761             :                         } else {
   15762           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15763             :                         }
   15764           0 :                         return ret;
   15765             : 
   15766           0 :                 case NETR_DELTA_DELETE_TRUST:
   15767           0 :                         if (in->sid == NULL) {
   15768           0 :                                 ret = Py_None;
   15769           0 :                                 Py_INCREF(ret);
   15770             :                         } else {
   15771           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15772             :                         }
   15773           0 :                         return ret;
   15774             : 
   15775           0 :                 case NETR_DELTA_ACCOUNT:
   15776           0 :                         if (in->sid == NULL) {
   15777           0 :                                 ret = Py_None;
   15778           0 :                                 Py_INCREF(ret);
   15779             :                         } else {
   15780           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15781             :                         }
   15782           0 :                         return ret;
   15783             : 
   15784           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   15785           0 :                         if (in->sid == NULL) {
   15786           0 :                                 ret = Py_None;
   15787           0 :                                 Py_INCREF(ret);
   15788             :                         } else {
   15789           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15790             :                         }
   15791           0 :                         return ret;
   15792             : 
   15793           0 :                 case NETR_DELTA_SECRET:
   15794           0 :                         if (in->name == NULL) {
   15795           0 :                                 ret = Py_None;
   15796           0 :                                 Py_INCREF(ret);
   15797             :                         } else {
   15798           0 :                                 if (in->name == NULL) {
   15799           0 :                                         ret = Py_None;
   15800           0 :                                         Py_INCREF(ret);
   15801             :                                 } else {
   15802           0 :                                         ret = PyUnicode_Decode(in->name, strlen(in->name), "utf-8", "ignore");
   15803             :                                 }
   15804             :                         }
   15805           0 :                         return ret;
   15806             : 
   15807           0 :                 case NETR_DELTA_DELETE_SECRET:
   15808           0 :                         if (in->name == NULL) {
   15809           0 :                                 ret = Py_None;
   15810           0 :                                 Py_INCREF(ret);
   15811             :                         } else {
   15812           0 :                                 if (in->name == NULL) {
   15813           0 :                                         ret = Py_None;
   15814           0 :                                         Py_INCREF(ret);
   15815             :                                 } else {
   15816           0 :                                         ret = PyUnicode_Decode(in->name, strlen(in->name), "utf-8", "ignore");
   15817             :                                 }
   15818             :                         }
   15819           0 :                         return ret;
   15820             : 
   15821           0 :                 case NETR_DELTA_DELETE_GROUP2:
   15822           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15823           0 :                         return ret;
   15824             : 
   15825           0 :                 case NETR_DELTA_DELETE_USER2:
   15826           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
   15827           0 :                         return ret;
   15828             : 
   15829           0 :                 case NETR_DELTA_MODIFY_COUNT:
   15830           0 :                         ret = Py_None;
   15831           0 :                         Py_INCREF(ret);
   15832           0 :                         return ret;
   15833             : 
   15834           0 :                 default:
   15835           0 :                         ret = Py_None;
   15836           0 :                         Py_INCREF(ret);
   15837           0 :                         return ret;
   15838             : 
   15839             :         }
   15840             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   15841             :         return NULL;
   15842             : }
   15843             : 
   15844           0 : static union netr_DELTA_ID_UNION *py_export_netr_DELTA_ID_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   15845             : {
   15846           0 :         union netr_DELTA_ID_UNION *ret = talloc_zero(mem_ctx, union netr_DELTA_ID_UNION);
   15847           0 :         switch (level) {
   15848           0 :                 case NETR_DELTA_DOMAIN:
   15849           0 :                         if (in == NULL) {
   15850           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   15851           0 :                                 talloc_free(ret); return NULL;
   15852             :                         }
   15853             :                         {
   15854           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15855           0 :                                 if (PyLong_Check(in)) {
   15856           0 :                                         unsigned long long test_var;
   15857           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15858           0 :                                         if (PyErr_Occurred() != NULL) {
   15859           0 :                                                 talloc_free(ret); return NULL;
   15860             :                                         }
   15861           0 :                                         if (test_var > uint_max) {
   15862           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15863             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15864           0 :                                                 talloc_free(ret); return NULL;
   15865             :                                         }
   15866           0 :                                         ret->rid = test_var;
   15867             :                                 } else {
   15868           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15869             :                                           PyLong_Type.tp_name);
   15870           0 :                                         talloc_free(ret); return NULL;
   15871             :                                 }
   15872             :                         }
   15873           0 :                         break;
   15874             : 
   15875           0 :                 case NETR_DELTA_GROUP:
   15876           0 :                         if (in == NULL) {
   15877           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   15878           0 :                                 talloc_free(ret); return NULL;
   15879             :                         }
   15880             :                         {
   15881           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15882           0 :                                 if (PyLong_Check(in)) {
   15883           0 :                                         unsigned long long test_var;
   15884           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15885           0 :                                         if (PyErr_Occurred() != NULL) {
   15886           0 :                                                 talloc_free(ret); return NULL;
   15887             :                                         }
   15888           0 :                                         if (test_var > uint_max) {
   15889           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15890             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15891           0 :                                                 talloc_free(ret); return NULL;
   15892             :                                         }
   15893           0 :                                         ret->rid = test_var;
   15894             :                                 } else {
   15895           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15896             :                                           PyLong_Type.tp_name);
   15897           0 :                                         talloc_free(ret); return NULL;
   15898             :                                 }
   15899             :                         }
   15900           0 :                         break;
   15901             : 
   15902           0 :                 case NETR_DELTA_DELETE_GROUP:
   15903           0 :                         if (in == NULL) {
   15904           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   15905           0 :                                 talloc_free(ret); return NULL;
   15906             :                         }
   15907             :                         {
   15908           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15909           0 :                                 if (PyLong_Check(in)) {
   15910           0 :                                         unsigned long long test_var;
   15911           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15912           0 :                                         if (PyErr_Occurred() != NULL) {
   15913           0 :                                                 talloc_free(ret); return NULL;
   15914             :                                         }
   15915           0 :                                         if (test_var > uint_max) {
   15916           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15917             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15918           0 :                                                 talloc_free(ret); return NULL;
   15919             :                                         }
   15920           0 :                                         ret->rid = test_var;
   15921             :                                 } else {
   15922           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15923             :                                           PyLong_Type.tp_name);
   15924           0 :                                         talloc_free(ret); return NULL;
   15925             :                                 }
   15926             :                         }
   15927           0 :                         break;
   15928             : 
   15929           0 :                 case NETR_DELTA_RENAME_GROUP:
   15930           0 :                         if (in == NULL) {
   15931           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   15932           0 :                                 talloc_free(ret); return NULL;
   15933             :                         }
   15934             :                         {
   15935           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15936           0 :                                 if (PyLong_Check(in)) {
   15937           0 :                                         unsigned long long test_var;
   15938           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15939           0 :                                         if (PyErr_Occurred() != NULL) {
   15940           0 :                                                 talloc_free(ret); return NULL;
   15941             :                                         }
   15942           0 :                                         if (test_var > uint_max) {
   15943           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15944             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15945           0 :                                                 talloc_free(ret); return NULL;
   15946             :                                         }
   15947           0 :                                         ret->rid = test_var;
   15948             :                                 } else {
   15949           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15950             :                                           PyLong_Type.tp_name);
   15951           0 :                                         talloc_free(ret); return NULL;
   15952             :                                 }
   15953             :                         }
   15954           0 :                         break;
   15955             : 
   15956           0 :                 case NETR_DELTA_USER:
   15957           0 :                         if (in == NULL) {
   15958           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   15959           0 :                                 talloc_free(ret); return NULL;
   15960             :                         }
   15961             :                         {
   15962           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15963           0 :                                 if (PyLong_Check(in)) {
   15964           0 :                                         unsigned long long test_var;
   15965           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15966           0 :                                         if (PyErr_Occurred() != NULL) {
   15967           0 :                                                 talloc_free(ret); return NULL;
   15968             :                                         }
   15969           0 :                                         if (test_var > uint_max) {
   15970           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15971             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15972           0 :                                                 talloc_free(ret); return NULL;
   15973             :                                         }
   15974           0 :                                         ret->rid = test_var;
   15975             :                                 } else {
   15976           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15977             :                                           PyLong_Type.tp_name);
   15978           0 :                                         talloc_free(ret); return NULL;
   15979             :                                 }
   15980             :                         }
   15981           0 :                         break;
   15982             : 
   15983           0 :                 case NETR_DELTA_DELETE_USER:
   15984           0 :                         if (in == NULL) {
   15985           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   15986           0 :                                 talloc_free(ret); return NULL;
   15987             :                         }
   15988             :                         {
   15989           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15990           0 :                                 if (PyLong_Check(in)) {
   15991           0 :                                         unsigned long long test_var;
   15992           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15993           0 :                                         if (PyErr_Occurred() != NULL) {
   15994           0 :                                                 talloc_free(ret); return NULL;
   15995             :                                         }
   15996           0 :                                         if (test_var > uint_max) {
   15997           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15998             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15999           0 :                                                 talloc_free(ret); return NULL;
   16000             :                                         }
   16001           0 :                                         ret->rid = test_var;
   16002             :                                 } else {
   16003           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16004             :                                           PyLong_Type.tp_name);
   16005           0 :                                         talloc_free(ret); return NULL;
   16006             :                                 }
   16007             :                         }
   16008           0 :                         break;
   16009             : 
   16010           0 :                 case NETR_DELTA_RENAME_USER:
   16011           0 :                         if (in == NULL) {
   16012           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   16013           0 :                                 talloc_free(ret); return NULL;
   16014             :                         }
   16015             :                         {
   16016           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16017           0 :                                 if (PyLong_Check(in)) {
   16018           0 :                                         unsigned long long test_var;
   16019           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16020           0 :                                         if (PyErr_Occurred() != NULL) {
   16021           0 :                                                 talloc_free(ret); return NULL;
   16022             :                                         }
   16023           0 :                                         if (test_var > uint_max) {
   16024           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16025             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16026           0 :                                                 talloc_free(ret); return NULL;
   16027             :                                         }
   16028           0 :                                         ret->rid = test_var;
   16029             :                                 } else {
   16030           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16031             :                                           PyLong_Type.tp_name);
   16032           0 :                                         talloc_free(ret); return NULL;
   16033             :                                 }
   16034             :                         }
   16035           0 :                         break;
   16036             : 
   16037           0 :                 case NETR_DELTA_GROUP_MEMBER:
   16038           0 :                         if (in == NULL) {
   16039           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   16040           0 :                                 talloc_free(ret); return NULL;
   16041             :                         }
   16042             :                         {
   16043           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16044           0 :                                 if (PyLong_Check(in)) {
   16045           0 :                                         unsigned long long test_var;
   16046           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16047           0 :                                         if (PyErr_Occurred() != NULL) {
   16048           0 :                                                 talloc_free(ret); return NULL;
   16049             :                                         }
   16050           0 :                                         if (test_var > uint_max) {
   16051           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16052             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16053           0 :                                                 talloc_free(ret); return NULL;
   16054             :                                         }
   16055           0 :                                         ret->rid = test_var;
   16056             :                                 } else {
   16057           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16058             :                                           PyLong_Type.tp_name);
   16059           0 :                                         talloc_free(ret); return NULL;
   16060             :                                 }
   16061             :                         }
   16062           0 :                         break;
   16063             : 
   16064           0 :                 case NETR_DELTA_ALIAS:
   16065           0 :                         if (in == NULL) {
   16066           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   16067           0 :                                 talloc_free(ret); return NULL;
   16068             :                         }
   16069             :                         {
   16070           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16071           0 :                                 if (PyLong_Check(in)) {
   16072           0 :                                         unsigned long long test_var;
   16073           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16074           0 :                                         if (PyErr_Occurred() != NULL) {
   16075           0 :                                                 talloc_free(ret); return NULL;
   16076             :                                         }
   16077           0 :                                         if (test_var > uint_max) {
   16078           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16079             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16080           0 :                                                 talloc_free(ret); return NULL;
   16081             :                                         }
   16082           0 :                                         ret->rid = test_var;
   16083             :                                 } else {
   16084           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16085             :                                           PyLong_Type.tp_name);
   16086           0 :                                         talloc_free(ret); return NULL;
   16087             :                                 }
   16088             :                         }
   16089           0 :                         break;
   16090             : 
   16091           0 :                 case NETR_DELTA_DELETE_ALIAS:
   16092           0 :                         if (in == NULL) {
   16093           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   16094           0 :                                 talloc_free(ret); return NULL;
   16095             :                         }
   16096             :                         {
   16097           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16098           0 :                                 if (PyLong_Check(in)) {
   16099           0 :                                         unsigned long long test_var;
   16100           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16101           0 :                                         if (PyErr_Occurred() != NULL) {
   16102           0 :                                                 talloc_free(ret); return NULL;
   16103             :                                         }
   16104           0 :                                         if (test_var > uint_max) {
   16105           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16106             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16107           0 :                                                 talloc_free(ret); return NULL;
   16108             :                                         }
   16109           0 :                                         ret->rid = test_var;
   16110             :                                 } else {
   16111           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16112             :                                           PyLong_Type.tp_name);
   16113           0 :                                         talloc_free(ret); return NULL;
   16114             :                                 }
   16115             :                         }
   16116           0 :                         break;
   16117             : 
   16118           0 :                 case NETR_DELTA_RENAME_ALIAS:
   16119           0 :                         if (in == NULL) {
   16120           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   16121           0 :                                 talloc_free(ret); return NULL;
   16122             :                         }
   16123             :                         {
   16124           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16125           0 :                                 if (PyLong_Check(in)) {
   16126           0 :                                         unsigned long long test_var;
   16127           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16128           0 :                                         if (PyErr_Occurred() != NULL) {
   16129           0 :                                                 talloc_free(ret); return NULL;
   16130             :                                         }
   16131           0 :                                         if (test_var > uint_max) {
   16132           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16133             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16134           0 :                                                 talloc_free(ret); return NULL;
   16135             :                                         }
   16136           0 :                                         ret->rid = test_var;
   16137             :                                 } else {
   16138           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16139             :                                           PyLong_Type.tp_name);
   16140           0 :                                         talloc_free(ret); return NULL;
   16141             :                                 }
   16142             :                         }
   16143           0 :                         break;
   16144             : 
   16145           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   16146           0 :                         if (in == NULL) {
   16147           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   16148           0 :                                 talloc_free(ret); return NULL;
   16149             :                         }
   16150             :                         {
   16151           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16152           0 :                                 if (PyLong_Check(in)) {
   16153           0 :                                         unsigned long long test_var;
   16154           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16155           0 :                                         if (PyErr_Occurred() != NULL) {
   16156           0 :                                                 talloc_free(ret); return NULL;
   16157             :                                         }
   16158           0 :                                         if (test_var > uint_max) {
   16159           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16160             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16161           0 :                                                 talloc_free(ret); return NULL;
   16162             :                                         }
   16163           0 :                                         ret->rid = test_var;
   16164             :                                 } else {
   16165           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16166             :                                           PyLong_Type.tp_name);
   16167           0 :                                         talloc_free(ret); return NULL;
   16168             :                                 }
   16169             :                         }
   16170           0 :                         break;
   16171             : 
   16172           0 :                 case NETR_DELTA_POLICY:
   16173           0 :                         if (in == NULL) {
   16174           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
   16175           0 :                                 talloc_free(ret); return NULL;
   16176             :                         }
   16177           0 :                         if (in == Py_None) {
   16178           0 :                                 ret->sid = NULL;
   16179             :                         } else {
   16180           0 :                                 ret->sid = NULL;
   16181           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16182           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16183           0 :                                         PyErr_NoMemory();
   16184           0 :                                         talloc_free(ret); return NULL;
   16185             :                                 }
   16186           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16187             :                         }
   16188           0 :                         break;
   16189             : 
   16190           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   16191           0 :                         if (in == NULL) {
   16192           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
   16193           0 :                                 talloc_free(ret); return NULL;
   16194             :                         }
   16195           0 :                         if (in == Py_None) {
   16196           0 :                                 ret->sid = NULL;
   16197             :                         } else {
   16198           0 :                                 ret->sid = NULL;
   16199           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16200           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16201           0 :                                         PyErr_NoMemory();
   16202           0 :                                         talloc_free(ret); return NULL;
   16203             :                                 }
   16204           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16205             :                         }
   16206           0 :                         break;
   16207             : 
   16208           0 :                 case NETR_DELTA_DELETE_TRUST:
   16209           0 :                         if (in == NULL) {
   16210           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
   16211           0 :                                 talloc_free(ret); return NULL;
   16212             :                         }
   16213           0 :                         if (in == Py_None) {
   16214           0 :                                 ret->sid = NULL;
   16215             :                         } else {
   16216           0 :                                 ret->sid = NULL;
   16217           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16218           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16219           0 :                                         PyErr_NoMemory();
   16220           0 :                                         talloc_free(ret); return NULL;
   16221             :                                 }
   16222           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16223             :                         }
   16224           0 :                         break;
   16225             : 
   16226           0 :                 case NETR_DELTA_ACCOUNT:
   16227           0 :                         if (in == NULL) {
   16228           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
   16229           0 :                                 talloc_free(ret); return NULL;
   16230             :                         }
   16231           0 :                         if (in == Py_None) {
   16232           0 :                                 ret->sid = NULL;
   16233             :                         } else {
   16234           0 :                                 ret->sid = NULL;
   16235           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16236           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16237           0 :                                         PyErr_NoMemory();
   16238           0 :                                         talloc_free(ret); return NULL;
   16239             :                                 }
   16240           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16241             :                         }
   16242           0 :                         break;
   16243             : 
   16244           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   16245           0 :                         if (in == NULL) {
   16246           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
   16247           0 :                                 talloc_free(ret); return NULL;
   16248             :                         }
   16249           0 :                         if (in == Py_None) {
   16250           0 :                                 ret->sid = NULL;
   16251             :                         } else {
   16252           0 :                                 ret->sid = NULL;
   16253           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16254           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16255           0 :                                         PyErr_NoMemory();
   16256           0 :                                         talloc_free(ret); return NULL;
   16257             :                                 }
   16258           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16259             :                         }
   16260           0 :                         break;
   16261             : 
   16262           0 :                 case NETR_DELTA_SECRET:
   16263           0 :                         if (in == NULL) {
   16264           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
   16265           0 :                                 talloc_free(ret); return NULL;
   16266             :                         }
   16267           0 :                         if (in == Py_None) {
   16268           0 :                                 ret->name = NULL;
   16269             :                         } else {
   16270           0 :                                 ret->name = NULL;
   16271             :                                 {
   16272           0 :                                         const char *test_str;
   16273           0 :                                         const char *talloc_str;
   16274           0 :                                         PyObject *unicode = NULL;
   16275           0 :                                         if (PyUnicode_Check(in)) {
   16276           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   16277           0 :                                                 if (unicode == NULL) {
   16278           0 :                                                         talloc_free(ret); return NULL;
   16279             :                                                 }
   16280           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   16281           0 :                                         } else if (PyBytes_Check(in)) {
   16282           0 :                                                 test_str = PyBytes_AS_STRING(in);
   16283             :                                         } else {
   16284           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   16285           0 :                                                 talloc_free(ret); return NULL;
   16286             :                                         }
   16287           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   16288           0 :                                         if (unicode != NULL) {
   16289           0 :                                                 Py_DECREF(unicode);
   16290             :                                         }
   16291           0 :                                         if (talloc_str == NULL) {
   16292           0 :                                                 PyErr_NoMemory();
   16293           0 :                                                 talloc_free(ret); return NULL;
   16294             :                                         }
   16295           0 :                                         ret->name = talloc_str;
   16296             :                                 }
   16297             :                         }
   16298           0 :                         break;
   16299             : 
   16300           0 :                 case NETR_DELTA_DELETE_SECRET:
   16301           0 :                         if (in == NULL) {
   16302           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
   16303           0 :                                 talloc_free(ret); return NULL;
   16304             :                         }
   16305           0 :                         if (in == Py_None) {
   16306           0 :                                 ret->name = NULL;
   16307             :                         } else {
   16308           0 :                                 ret->name = NULL;
   16309             :                                 {
   16310           0 :                                         const char *test_str;
   16311           0 :                                         const char *talloc_str;
   16312           0 :                                         PyObject *unicode = NULL;
   16313           0 :                                         if (PyUnicode_Check(in)) {
   16314           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   16315           0 :                                                 if (unicode == NULL) {
   16316           0 :                                                         talloc_free(ret); return NULL;
   16317             :                                                 }
   16318           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   16319           0 :                                         } else if (PyBytes_Check(in)) {
   16320           0 :                                                 test_str = PyBytes_AS_STRING(in);
   16321             :                                         } else {
   16322           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   16323           0 :                                                 talloc_free(ret); return NULL;
   16324             :                                         }
   16325           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   16326           0 :                                         if (unicode != NULL) {
   16327           0 :                                                 Py_DECREF(unicode);
   16328             :                                         }
   16329           0 :                                         if (talloc_str == NULL) {
   16330           0 :                                                 PyErr_NoMemory();
   16331           0 :                                                 talloc_free(ret); return NULL;
   16332             :                                         }
   16333           0 :                                         ret->name = talloc_str;
   16334             :                                 }
   16335             :                         }
   16336           0 :                         break;
   16337             : 
   16338           0 :                 case NETR_DELTA_DELETE_GROUP2:
   16339           0 :                         if (in == NULL) {
   16340           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   16341           0 :                                 talloc_free(ret); return NULL;
   16342             :                         }
   16343             :                         {
   16344           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16345           0 :                                 if (PyLong_Check(in)) {
   16346           0 :                                         unsigned long long test_var;
   16347           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16348           0 :                                         if (PyErr_Occurred() != NULL) {
   16349           0 :                                                 talloc_free(ret); return NULL;
   16350             :                                         }
   16351           0 :                                         if (test_var > uint_max) {
   16352           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16353             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16354           0 :                                                 talloc_free(ret); return NULL;
   16355             :                                         }
   16356           0 :                                         ret->rid = test_var;
   16357             :                                 } else {
   16358           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16359             :                                           PyLong_Type.tp_name);
   16360           0 :                                         talloc_free(ret); return NULL;
   16361             :                                 }
   16362             :                         }
   16363           0 :                         break;
   16364             : 
   16365           0 :                 case NETR_DELTA_DELETE_USER2:
   16366           0 :                         if (in == NULL) {
   16367           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
   16368           0 :                                 talloc_free(ret); return NULL;
   16369             :                         }
   16370             :                         {
   16371           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16372           0 :                                 if (PyLong_Check(in)) {
   16373           0 :                                         unsigned long long test_var;
   16374           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16375           0 :                                         if (PyErr_Occurred() != NULL) {
   16376           0 :                                                 talloc_free(ret); return NULL;
   16377             :                                         }
   16378           0 :                                         if (test_var > uint_max) {
   16379           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16380             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16381           0 :                                                 talloc_free(ret); return NULL;
   16382             :                                         }
   16383           0 :                                         ret->rid = test_var;
   16384             :                                 } else {
   16385           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16386             :                                           PyLong_Type.tp_name);
   16387           0 :                                         talloc_free(ret); return NULL;
   16388             :                                 }
   16389             :                         }
   16390           0 :                         break;
   16391             : 
   16392           0 :                 case NETR_DELTA_MODIFY_COUNT:
   16393           0 :                         break;
   16394             : 
   16395           0 :                 default:
   16396           0 :                         break;
   16397             : 
   16398             :         }
   16399             : 
   16400           0 :         return ret;
   16401             : }
   16402             : 
   16403           0 : static PyObject *py_netr_DELTA_ID_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16404             : {
   16405           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16406           0 :         PyObject *mem_ctx_obj = NULL;
   16407           0 :         TALLOC_CTX *mem_ctx = NULL;
   16408           0 :         int level = 0;
   16409           0 :         PyObject *in_obj = NULL;
   16410           0 :         union netr_DELTA_ID_UNION *in = NULL;
   16411             : 
   16412           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   16413             :                 discard_const_p(char *, kwnames),
   16414             :                 &mem_ctx_obj,
   16415             :                 &level,
   16416             :                 &in_obj)) {
   16417           0 :                 return NULL;
   16418             :         }
   16419           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16420           0 :         if (mem_ctx == NULL) {
   16421           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16422           0 :                 return NULL;
   16423             :         }
   16424           0 :         in = (union netr_DELTA_ID_UNION *)pytalloc_get_ptr(in_obj);
   16425           0 :         if (in == NULL) {
   16426           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DELTA_ID_UNION!");
   16427           0 :                 return NULL;
   16428             :         }
   16429             : 
   16430           0 :         return py_import_netr_DELTA_ID_UNION(mem_ctx, level, in);
   16431             : }
   16432             : 
   16433           0 : static PyObject *py_netr_DELTA_ID_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16434             : {
   16435           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16436           0 :         PyObject *mem_ctx_obj = NULL;
   16437           0 :         TALLOC_CTX *mem_ctx = NULL;
   16438           0 :         int level = 0;
   16439           0 :         PyObject *in = NULL;
   16440           0 :         union netr_DELTA_ID_UNION *out = NULL;
   16441             : 
   16442           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   16443             :                 discard_const_p(char *, kwnames),
   16444             :                 &mem_ctx_obj,
   16445             :                 &level,
   16446             :                 &in)) {
   16447           0 :                 return NULL;
   16448             :         }
   16449           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16450           0 :         if (mem_ctx == NULL) {
   16451           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16452           0 :                 return NULL;
   16453             :         }
   16454             : 
   16455           0 :         out = py_export_netr_DELTA_ID_UNION(mem_ctx, level, in);
   16456           0 :         if (out == NULL) {
   16457           0 :                 return NULL;
   16458             :         }
   16459             : 
   16460           0 :         return pytalloc_GenericObject_reference(out);
   16461             : }
   16462             : 
   16463             : static PyMethodDef py_netr_DELTA_ID_UNION_methods[] = {
   16464             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_ID_UNION_import),
   16465             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16466             :                 "T.__import__(mem_ctx, level, in) => ret." },
   16467             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_ID_UNION_export),
   16468             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16469             :                 "T.__export__(mem_ctx, level, in) => ret." },
   16470             :         { NULL, NULL, 0, NULL }
   16471             : };
   16472             : 
   16473           0 : static PyObject *py_netr_DELTA_ID_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16474             : {
   16475           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   16476           0 :         return NULL;
   16477             : }
   16478             : 
   16479             : 
   16480             : static PyTypeObject netr_DELTA_ID_UNION_Type = {
   16481             :         PyVarObject_HEAD_INIT(NULL, 0)
   16482             :         .tp_name = "netlogon.netr_DELTA_ID_UNION",
   16483             :         .tp_getset = NULL,
   16484             :         .tp_methods = py_netr_DELTA_ID_UNION_methods,
   16485             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16486             :         .tp_new = py_netr_DELTA_ID_UNION_new,
   16487             : };
   16488             : 
   16489             : 
   16490           0 : static PyObject *py_netr_DELTA_ENUM_get_delta_type(PyObject *obj, void *closure)
   16491             : {
   16492           0 :         struct netr_DELTA_ENUM *object = pytalloc_get_ptr(obj);
   16493           0 :         PyObject *py_delta_type;
   16494           0 :         py_delta_type = PyLong_FromLong((uint16_t)(object->delta_type));
   16495           0 :         return py_delta_type;
   16496             : }
   16497             : 
   16498           0 : static int py_netr_DELTA_ENUM_set_delta_type(PyObject *py_obj, PyObject *value, void *closure)
   16499             : {
   16500           0 :         struct netr_DELTA_ENUM *object = pytalloc_get_ptr(py_obj);
   16501           0 :         if (value == NULL) {
   16502           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_type");
   16503           0 :                 return -1;
   16504             :         }
   16505             :         {
   16506           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->delta_type));
   16507           0 :                 if (PyLong_Check(value)) {
   16508           0 :                         unsigned long long test_var;
   16509           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16510           0 :                         if (PyErr_Occurred() != NULL) {
   16511           0 :                                 return -1;
   16512             :                         }
   16513           0 :                         if (test_var > uint_max) {
   16514           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16515             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16516           0 :                                 return -1;
   16517             :                         }
   16518           0 :                         object->delta_type = test_var;
   16519             :                 } else {
   16520           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16521             :                           PyLong_Type.tp_name);
   16522           0 :                         return -1;
   16523             :                 }
   16524             :         }
   16525           0 :         return 0;
   16526             : }
   16527             : 
   16528           0 : static PyObject *py_netr_DELTA_ENUM_get_delta_id_union(PyObject *obj, void *closure)
   16529             : {
   16530           0 :         struct netr_DELTA_ENUM *object = pytalloc_get_ptr(obj);
   16531           0 :         PyObject *py_delta_id_union;
   16532           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");
   16533           0 :         if (py_delta_id_union == NULL) {
   16534           0 :                 return NULL;
   16535             :         }
   16536           0 :         return py_delta_id_union;
   16537             : }
   16538             : 
   16539           0 : static int py_netr_DELTA_ENUM_set_delta_id_union(PyObject *py_obj, PyObject *value, void *closure)
   16540             : {
   16541           0 :         struct netr_DELTA_ENUM *object = pytalloc_get_ptr(py_obj);
   16542           0 :         if (value == NULL) {
   16543           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_id_union");
   16544           0 :                 return -1;
   16545             :         }
   16546             :         {
   16547           0 :                 union netr_DELTA_ID_UNION *delta_id_union_switch_0;
   16548           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");
   16549           0 :                 if (delta_id_union_switch_0 == NULL) {
   16550           0 :                         return -1;
   16551             :                 }
   16552           0 :                 object->delta_id_union = *delta_id_union_switch_0;
   16553             :         }
   16554           0 :         return 0;
   16555             : }
   16556             : 
   16557           0 : static PyObject *py_netr_DELTA_ENUM_get_delta_union(PyObject *obj, void *closure)
   16558             : {
   16559           0 :         struct netr_DELTA_ENUM *object = pytalloc_get_ptr(obj);
   16560           0 :         PyObject *py_delta_union;
   16561           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");
   16562           0 :         if (py_delta_union == NULL) {
   16563           0 :                 return NULL;
   16564             :         }
   16565           0 :         return py_delta_union;
   16566             : }
   16567             : 
   16568           0 : static int py_netr_DELTA_ENUM_set_delta_union(PyObject *py_obj, PyObject *value, void *closure)
   16569             : {
   16570           0 :         struct netr_DELTA_ENUM *object = pytalloc_get_ptr(py_obj);
   16571           0 :         if (value == NULL) {
   16572           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_union");
   16573           0 :                 return -1;
   16574             :         }
   16575             :         {
   16576           0 :                 union netr_DELTA_UNION *delta_union_switch_0;
   16577           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");
   16578           0 :                 if (delta_union_switch_0 == NULL) {
   16579           0 :                         return -1;
   16580             :                 }
   16581           0 :                 object->delta_union = *delta_union_switch_0;
   16582             :         }
   16583           0 :         return 0;
   16584             : }
   16585             : 
   16586             : static PyGetSetDef py_netr_DELTA_ENUM_getsetters[] = {
   16587             :         {
   16588             :                 .name = discard_const_p(char, "delta_type"),
   16589             :                 .get = py_netr_DELTA_ENUM_get_delta_type,
   16590             :                 .set = py_netr_DELTA_ENUM_set_delta_type,
   16591             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DeltaEnum")
   16592             :         },
   16593             :         {
   16594             :                 .name = discard_const_p(char, "delta_id_union"),
   16595             :                 .get = py_netr_DELTA_ENUM_get_delta_id_union,
   16596             :                 .set = py_netr_DELTA_ENUM_set_delta_id_union,
   16597             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ID_UNION")
   16598             :         },
   16599             :         {
   16600             :                 .name = discard_const_p(char, "delta_union"),
   16601             :                 .get = py_netr_DELTA_ENUM_get_delta_union,
   16602             :                 .set = py_netr_DELTA_ENUM_set_delta_union,
   16603             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_UNION")
   16604             :         },
   16605             :         { .name = NULL }
   16606             : };
   16607             : 
   16608           0 : static PyObject *py_netr_DELTA_ENUM_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16609             : {
   16610           0 :         return pytalloc_new(struct netr_DELTA_ENUM, type);
   16611             : }
   16612             : 
   16613             : 
   16614             : static PyTypeObject netr_DELTA_ENUM_Type = {
   16615             :         PyVarObject_HEAD_INIT(NULL, 0)
   16616             :         .tp_name = "netlogon.netr_DELTA_ENUM",
   16617             :         .tp_getset = py_netr_DELTA_ENUM_getsetters,
   16618             :         .tp_methods = NULL,
   16619             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16620             :         .tp_new = py_netr_DELTA_ENUM_new,
   16621             : };
   16622             : 
   16623             : 
   16624           0 : static PyObject *py_netr_DELTA_ENUM_ARRAY_get_num_deltas(PyObject *obj, void *closure)
   16625             : {
   16626           0 :         struct netr_DELTA_ENUM_ARRAY *object = pytalloc_get_ptr(obj);
   16627           0 :         PyObject *py_num_deltas;
   16628           0 :         py_num_deltas = PyLong_FromUnsignedLongLong((uint32_t)(object->num_deltas));
   16629           0 :         return py_num_deltas;
   16630             : }
   16631             : 
   16632           0 : static int py_netr_DELTA_ENUM_ARRAY_set_num_deltas(PyObject *py_obj, PyObject *value, void *closure)
   16633             : {
   16634           0 :         struct netr_DELTA_ENUM_ARRAY *object = pytalloc_get_ptr(py_obj);
   16635           0 :         if (value == NULL) {
   16636           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_deltas");
   16637           0 :                 return -1;
   16638             :         }
   16639             :         {
   16640           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_deltas));
   16641           0 :                 if (PyLong_Check(value)) {
   16642           0 :                         unsigned long long test_var;
   16643           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16644           0 :                         if (PyErr_Occurred() != NULL) {
   16645           0 :                                 return -1;
   16646             :                         }
   16647           0 :                         if (test_var > uint_max) {
   16648           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16649             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16650           0 :                                 return -1;
   16651             :                         }
   16652           0 :                         object->num_deltas = test_var;
   16653             :                 } else {
   16654           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16655             :                           PyLong_Type.tp_name);
   16656           0 :                         return -1;
   16657             :                 }
   16658             :         }
   16659           0 :         return 0;
   16660             : }
   16661             : 
   16662           0 : static PyObject *py_netr_DELTA_ENUM_ARRAY_get_delta_enum(PyObject *obj, void *closure)
   16663             : {
   16664           0 :         struct netr_DELTA_ENUM_ARRAY *object = pytalloc_get_ptr(obj);
   16665           0 :         PyObject *py_delta_enum;
   16666           0 :         if (object->delta_enum == NULL) {
   16667           0 :                 Py_RETURN_NONE;
   16668             :         }
   16669           0 :         if (object->delta_enum == NULL) {
   16670           0 :                 py_delta_enum = Py_None;
   16671           0 :                 Py_INCREF(py_delta_enum);
   16672             :         } else {
   16673           0 :                 py_delta_enum = PyList_New(object->num_deltas);
   16674           0 :                 if (py_delta_enum == NULL) {
   16675           0 :                         return NULL;
   16676             :                 }
   16677             :                 {
   16678             :                         int delta_enum_cntr_1;
   16679           0 :                         for (delta_enum_cntr_1 = 0; delta_enum_cntr_1 < (object->num_deltas); delta_enum_cntr_1++) {
   16680           0 :                                 PyObject *py_delta_enum_1;
   16681           0 :                                 py_delta_enum_1 = pytalloc_reference_ex(&netr_DELTA_ENUM_Type, object->delta_enum, &(object->delta_enum)[delta_enum_cntr_1]);
   16682           0 :                                 PyList_SetItem(py_delta_enum, delta_enum_cntr_1, py_delta_enum_1);
   16683             :                         }
   16684             :                 }
   16685             :         }
   16686           0 :         return py_delta_enum;
   16687             : }
   16688             : 
   16689           0 : static int py_netr_DELTA_ENUM_ARRAY_set_delta_enum(PyObject *py_obj, PyObject *value, void *closure)
   16690             : {
   16691           0 :         struct netr_DELTA_ENUM_ARRAY *object = pytalloc_get_ptr(py_obj);
   16692           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->delta_enum));
   16693           0 :         if (value == NULL) {
   16694           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_enum");
   16695           0 :                 return -1;
   16696             :         }
   16697           0 :         if (value == Py_None) {
   16698           0 :                 object->delta_enum = NULL;
   16699             :         } else {
   16700           0 :                 object->delta_enum = NULL;
   16701           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   16702             :                 {
   16703           0 :                         int delta_enum_cntr_1;
   16704           0 :                         object->delta_enum = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->delta_enum, PyList_GET_SIZE(value));
   16705           0 :                         if (!object->delta_enum) { return -1; }
   16706           0 :                         talloc_set_name_const(object->delta_enum, "ARRAY: object->delta_enum");
   16707           0 :                         for (delta_enum_cntr_1 = 0; delta_enum_cntr_1 < PyList_GET_SIZE(value); delta_enum_cntr_1++) {
   16708           0 :                                 if (PyList_GET_ITEM(value, delta_enum_cntr_1) == NULL) {
   16709           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->delta_enum)[delta_enum_cntr_1]");
   16710           0 :                                         return -1;
   16711             :                                 }
   16712           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ENUM_Type, PyList_GET_ITEM(value, delta_enum_cntr_1), return -1;);
   16713           0 :                                 if (talloc_reference(object->delta_enum, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, delta_enum_cntr_1))) == NULL) {
   16714           0 :                                         PyErr_NoMemory();
   16715           0 :                                         return -1;
   16716             :                                 }
   16717           0 :                                 (object->delta_enum)[delta_enum_cntr_1] = *(struct netr_DELTA_ENUM *)pytalloc_get_ptr(PyList_GET_ITEM(value, delta_enum_cntr_1));
   16718             :                         }
   16719             :                 }
   16720             :         }
   16721           0 :         return 0;
   16722             : }
   16723             : 
   16724             : static PyGetSetDef py_netr_DELTA_ENUM_ARRAY_getsetters[] = {
   16725             :         {
   16726             :                 .name = discard_const_p(char, "num_deltas"),
   16727             :                 .get = py_netr_DELTA_ENUM_ARRAY_get_num_deltas,
   16728             :                 .set = py_netr_DELTA_ENUM_ARRAY_set_num_deltas,
   16729             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16730             :         },
   16731             :         {
   16732             :                 .name = discard_const_p(char, "delta_enum"),
   16733             :                 .get = py_netr_DELTA_ENUM_ARRAY_get_delta_enum,
   16734             :                 .set = py_netr_DELTA_ENUM_ARRAY_set_delta_enum,
   16735             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM")
   16736             :         },
   16737             :         { .name = NULL }
   16738             : };
   16739             : 
   16740           0 : static PyObject *py_netr_DELTA_ENUM_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16741             : {
   16742           0 :         return pytalloc_new(struct netr_DELTA_ENUM_ARRAY, type);
   16743             : }
   16744             : 
   16745             : 
   16746             : static PyTypeObject netr_DELTA_ENUM_ARRAY_Type = {
   16747             :         PyVarObject_HEAD_INIT(NULL, 0)
   16748             :         .tp_name = "netlogon.netr_DELTA_ENUM_ARRAY",
   16749             :         .tp_getset = py_netr_DELTA_ENUM_ARRAY_getsetters,
   16750             :         .tp_methods = NULL,
   16751             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16752             :         .tp_new = py_netr_DELTA_ENUM_ARRAY_new,
   16753             : };
   16754             : 
   16755             : 
   16756           0 : static PyObject *py_netr_UAS_INFO_0_get_computer_name(PyObject *obj, void *closure)
   16757             : {
   16758           0 :         struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(obj);
   16759           0 :         PyObject *py_computer_name;
   16760           0 :         py_computer_name = PyList_New(16);
   16761           0 :         if (py_computer_name == NULL) {
   16762           0 :                 return NULL;
   16763             :         }
   16764             :         {
   16765             :                 int computer_name_cntr_0;
   16766           0 :                 for (computer_name_cntr_0 = 0; computer_name_cntr_0 < (16); computer_name_cntr_0++) {
   16767           0 :                         PyObject *py_computer_name_0;
   16768           0 :                         py_computer_name_0 = PyLong_FromLong((uint16_t)((object->computer_name)[computer_name_cntr_0]));
   16769           0 :                         PyList_SetItem(py_computer_name, computer_name_cntr_0, py_computer_name_0);
   16770             :                 }
   16771             :         }
   16772           0 :         return py_computer_name;
   16773             : }
   16774             : 
   16775           0 : static int py_netr_UAS_INFO_0_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   16776             : {
   16777           0 :         struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(py_obj);
   16778           0 :         if (value == NULL) {
   16779           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->computer_name");
   16780           0 :                 return -1;
   16781             :         }
   16782           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   16783             :         {
   16784           0 :                 int computer_name_cntr_0;
   16785           0 :                 if (ARRAY_SIZE(object->computer_name) != PyList_GET_SIZE(value)) {
   16786           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));
   16787           0 :                         return -1;
   16788             :                 }
   16789           0 :                 for (computer_name_cntr_0 = 0; computer_name_cntr_0 < PyList_GET_SIZE(value); computer_name_cntr_0++) {
   16790           0 :                         if (PyList_GET_ITEM(value, computer_name_cntr_0) == NULL) {
   16791           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->computer_name)[computer_name_cntr_0]");
   16792           0 :                                 return -1;
   16793             :                         }
   16794             :                         {
   16795           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->computer_name)[computer_name_cntr_0]));
   16796           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, computer_name_cntr_0))) {
   16797           0 :                                         unsigned long long test_var;
   16798           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, computer_name_cntr_0));
   16799           0 :                                         if (PyErr_Occurred() != NULL) {
   16800           0 :                                                 return -1;
   16801             :                                         }
   16802           0 :                                         if (test_var > uint_max) {
   16803           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16804             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16805           0 :                                                 return -1;
   16806             :                                         }
   16807           0 :                                         (object->computer_name)[computer_name_cntr_0] = test_var;
   16808             :                                 } else {
   16809           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16810             :                                           PyLong_Type.tp_name);
   16811           0 :                                         return -1;
   16812             :                                 }
   16813             :                         }
   16814             :                 }
   16815             :         }
   16816           0 :         return 0;
   16817             : }
   16818             : 
   16819           0 : static PyObject *py_netr_UAS_INFO_0_get_timecreated(PyObject *obj, void *closure)
   16820             : {
   16821           0 :         struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(obj);
   16822           0 :         PyObject *py_timecreated;
   16823           0 :         py_timecreated = PyLong_FromUnsignedLongLong((uint32_t)(object->timecreated));
   16824           0 :         return py_timecreated;
   16825             : }
   16826             : 
   16827           0 : static int py_netr_UAS_INFO_0_set_timecreated(PyObject *py_obj, PyObject *value, void *closure)
   16828             : {
   16829           0 :         struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(py_obj);
   16830           0 :         if (value == NULL) {
   16831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timecreated");
   16832           0 :                 return -1;
   16833             :         }
   16834             :         {
   16835           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timecreated));
   16836           0 :                 if (PyLong_Check(value)) {
   16837           0 :                         unsigned long long test_var;
   16838           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16839           0 :                         if (PyErr_Occurred() != NULL) {
   16840           0 :                                 return -1;
   16841             :                         }
   16842           0 :                         if (test_var > uint_max) {
   16843           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16844             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16845           0 :                                 return -1;
   16846             :                         }
   16847           0 :                         object->timecreated = test_var;
   16848             :                 } else {
   16849           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16850             :                           PyLong_Type.tp_name);
   16851           0 :                         return -1;
   16852             :                 }
   16853             :         }
   16854           0 :         return 0;
   16855             : }
   16856             : 
   16857           0 : static PyObject *py_netr_UAS_INFO_0_get_serial_number(PyObject *obj, void *closure)
   16858             : {
   16859           0 :         struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(obj);
   16860           0 :         PyObject *py_serial_number;
   16861           0 :         py_serial_number = PyLong_FromUnsignedLongLong((uint32_t)(object->serial_number));
   16862           0 :         return py_serial_number;
   16863             : }
   16864             : 
   16865           0 : static int py_netr_UAS_INFO_0_set_serial_number(PyObject *py_obj, PyObject *value, void *closure)
   16866             : {
   16867           0 :         struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(py_obj);
   16868           0 :         if (value == NULL) {
   16869           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->serial_number");
   16870           0 :                 return -1;
   16871             :         }
   16872             :         {
   16873           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number));
   16874           0 :                 if (PyLong_Check(value)) {
   16875           0 :                         unsigned long long test_var;
   16876           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16877           0 :                         if (PyErr_Occurred() != NULL) {
   16878           0 :                                 return -1;
   16879             :                         }
   16880           0 :                         if (test_var > uint_max) {
   16881           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16882             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16883           0 :                                 return -1;
   16884             :                         }
   16885           0 :                         object->serial_number = test_var;
   16886             :                 } else {
   16887           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16888             :                           PyLong_Type.tp_name);
   16889           0 :                         return -1;
   16890             :                 }
   16891             :         }
   16892           0 :         return 0;
   16893             : }
   16894             : 
   16895             : static PyGetSetDef py_netr_UAS_INFO_0_getsetters[] = {
   16896             :         {
   16897             :                 .name = discard_const_p(char, "computer_name"),
   16898             :                 .get = py_netr_UAS_INFO_0_get_computer_name,
   16899             :                 .set = py_netr_UAS_INFO_0_set_computer_name,
   16900             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16901             :         },
   16902             :         {
   16903             :                 .name = discard_const_p(char, "timecreated"),
   16904             :                 .get = py_netr_UAS_INFO_0_get_timecreated,
   16905             :                 .set = py_netr_UAS_INFO_0_set_timecreated,
   16906             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16907             :         },
   16908             :         {
   16909             :                 .name = discard_const_p(char, "serial_number"),
   16910             :                 .get = py_netr_UAS_INFO_0_get_serial_number,
   16911             :                 .set = py_netr_UAS_INFO_0_set_serial_number,
   16912             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16913             :         },
   16914             :         { .name = NULL }
   16915             : };
   16916             : 
   16917           0 : static PyObject *py_netr_UAS_INFO_0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16918             : {
   16919           0 :         return pytalloc_new(struct netr_UAS_INFO_0, type);
   16920             : }
   16921             : 
   16922             : 
   16923             : static PyTypeObject netr_UAS_INFO_0_Type = {
   16924             :         PyVarObject_HEAD_INIT(NULL, 0)
   16925             :         .tp_name = "netlogon.netr_UAS_INFO_0",
   16926             :         .tp_getset = py_netr_UAS_INFO_0_getsetters,
   16927             :         .tp_methods = NULL,
   16928             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16929             :         .tp_new = py_netr_UAS_INFO_0_new,
   16930             : };
   16931             : 
   16932             : 
   16933           0 : static PyObject *py_netr_AccountBuffer_get_blob(PyObject *obj, void *closure)
   16934             : {
   16935           0 :         struct netr_AccountBuffer *object = pytalloc_get_ptr(obj);
   16936           0 :         PyObject *py_blob;
   16937           0 :         py_blob = PyBytes_FromStringAndSize((char *)(object->blob).data, (object->blob).length);
   16938           0 :         return py_blob;
   16939             : }
   16940             : 
   16941           0 : static int py_netr_AccountBuffer_set_blob(PyObject *py_obj, PyObject *value, void *closure)
   16942             : {
   16943           0 :         struct netr_AccountBuffer *object = pytalloc_get_ptr(py_obj);
   16944           0 :         if (value == NULL) {
   16945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->blob");
   16946           0 :                 return -1;
   16947             :         }
   16948           0 :         object->blob = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   16949           0 :         return 0;
   16950             : }
   16951             : 
   16952             : static PyGetSetDef py_netr_AccountBuffer_getsetters[] = {
   16953             :         {
   16954             :                 .name = discard_const_p(char, "blob"),
   16955             :                 .get = py_netr_AccountBuffer_get_blob,
   16956             :                 .set = py_netr_AccountBuffer_set_blob,
   16957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16958             :         },
   16959             :         { .name = NULL }
   16960             : };
   16961             : 
   16962           0 : static PyObject *py_netr_AccountBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16963             : {
   16964           0 :         return pytalloc_new(struct netr_AccountBuffer, type);
   16965             : }
   16966             : 
   16967             : 
   16968             : static PyTypeObject netr_AccountBuffer_Type = {
   16969             :         PyVarObject_HEAD_INIT(NULL, 0)
   16970             :         .tp_name = "netlogon.netr_AccountBuffer",
   16971             :         .tp_getset = py_netr_AccountBuffer_getsetters,
   16972             :         .tp_methods = NULL,
   16973             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16974             :         .tp_new = py_netr_AccountBuffer_new,
   16975             : };
   16976             : 
   16977             : 
   16978           0 : static PyObject *py_netr_NETLOGON_INFO_1_get_flags(PyObject *obj, void *closure)
   16979             : {
   16980           0 :         struct netr_NETLOGON_INFO_1 *object = pytalloc_get_ptr(obj);
   16981           0 :         PyObject *py_flags;
   16982           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   16983           0 :         return py_flags;
   16984             : }
   16985             : 
   16986           0 : static int py_netr_NETLOGON_INFO_1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   16987             : {
   16988           0 :         struct netr_NETLOGON_INFO_1 *object = pytalloc_get_ptr(py_obj);
   16989           0 :         if (value == NULL) {
   16990           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
   16991           0 :                 return -1;
   16992             :         }
   16993             :         {
   16994           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   16995           0 :                 if (PyLong_Check(value)) {
   16996           0 :                         unsigned long long test_var;
   16997           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16998           0 :                         if (PyErr_Occurred() != NULL) {
   16999           0 :                                 return -1;
   17000             :                         }
   17001           0 :                         if (test_var > uint_max) {
   17002           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17003             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17004           0 :                                 return -1;
   17005             :                         }
   17006           0 :                         object->flags = test_var;
   17007             :                 } else {
   17008           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17009             :                           PyLong_Type.tp_name);
   17010           0 :                         return -1;
   17011             :                 }
   17012             :         }
   17013           0 :         return 0;
   17014             : }
   17015             : 
   17016           0 : static PyObject *py_netr_NETLOGON_INFO_1_get_pdc_connection_status(PyObject *obj, void *closure)
   17017             : {
   17018           0 :         struct netr_NETLOGON_INFO_1 *object = pytalloc_get_ptr(obj);
   17019           0 :         PyObject *py_pdc_connection_status;
   17020           0 :         py_pdc_connection_status = PyErr_FromWERROR(object->pdc_connection_status);
   17021           0 :         return py_pdc_connection_status;
   17022             : }
   17023             : 
   17024           0 : static int py_netr_NETLOGON_INFO_1_set_pdc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
   17025             : {
   17026           0 :         struct netr_NETLOGON_INFO_1 *object = pytalloc_get_ptr(py_obj);
   17027           0 :         if (value == NULL) {
   17028           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pdc_connection_status");
   17029           0 :                 return -1;
   17030             :         }
   17031           0 :         object->pdc_connection_status = W_ERROR(PyLong_AsLong(value));
   17032           0 :         return 0;
   17033             : }
   17034             : 
   17035             : static PyGetSetDef py_netr_NETLOGON_INFO_1_getsetters[] = {
   17036             :         {
   17037             :                 .name = discard_const_p(char, "flags"),
   17038             :                 .get = py_netr_NETLOGON_INFO_1_get_flags,
   17039             :                 .set = py_netr_NETLOGON_INFO_1_set_flags,
   17040             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
   17041             :         },
   17042             :         {
   17043             :                 .name = discard_const_p(char, "pdc_connection_status"),
   17044             :                 .get = py_netr_NETLOGON_INFO_1_get_pdc_connection_status,
   17045             :                 .set = py_netr_NETLOGON_INFO_1_set_pdc_connection_status,
   17046             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   17047             :         },
   17048             :         { .name = NULL }
   17049             : };
   17050             : 
   17051           0 : static PyObject *py_netr_NETLOGON_INFO_1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17052             : {
   17053           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_1, type);
   17054             : }
   17055             : 
   17056             : 
   17057             : static PyTypeObject netr_NETLOGON_INFO_1_Type = {
   17058             :         PyVarObject_HEAD_INIT(NULL, 0)
   17059             :         .tp_name = "netlogon.netr_NETLOGON_INFO_1",
   17060             :         .tp_getset = py_netr_NETLOGON_INFO_1_getsetters,
   17061             :         .tp_methods = NULL,
   17062             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17063             :         .tp_new = py_netr_NETLOGON_INFO_1_new,
   17064             : };
   17065             : 
   17066             : 
   17067          53 : static PyObject *py_netr_NETLOGON_INFO_2_get_flags(PyObject *obj, void *closure)
   17068             : {
   17069          53 :         struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(obj);
   17070           0 :         PyObject *py_flags;
   17071          53 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   17072          53 :         return py_flags;
   17073             : }
   17074             : 
   17075           0 : static int py_netr_NETLOGON_INFO_2_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   17076             : {
   17077           0 :         struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(py_obj);
   17078           0 :         if (value == NULL) {
   17079           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
   17080           0 :                 return -1;
   17081             :         }
   17082             :         {
   17083           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   17084           0 :                 if (PyLong_Check(value)) {
   17085           0 :                         unsigned long long test_var;
   17086           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17087           0 :                         if (PyErr_Occurred() != NULL) {
   17088           0 :                                 return -1;
   17089             :                         }
   17090           0 :                         if (test_var > uint_max) {
   17091           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17092             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17093           0 :                                 return -1;
   17094             :                         }
   17095           0 :                         object->flags = test_var;
   17096             :                 } else {
   17097           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17098             :                           PyLong_Type.tp_name);
   17099           0 :                         return -1;
   17100             :                 }
   17101             :         }
   17102           0 :         return 0;
   17103             : }
   17104             : 
   17105         106 : static PyObject *py_netr_NETLOGON_INFO_2_get_pdc_connection_status(PyObject *obj, void *closure)
   17106             : {
   17107         106 :         struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(obj);
   17108           0 :         PyObject *py_pdc_connection_status;
   17109         106 :         py_pdc_connection_status = PyErr_FromWERROR(object->pdc_connection_status);
   17110         106 :         return py_pdc_connection_status;
   17111             : }
   17112             : 
   17113           0 : static int py_netr_NETLOGON_INFO_2_set_pdc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
   17114             : {
   17115           0 :         struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(py_obj);
   17116           0 :         if (value == NULL) {
   17117           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pdc_connection_status");
   17118           0 :                 return -1;
   17119             :         }
   17120           0 :         object->pdc_connection_status = W_ERROR(PyLong_AsLong(value));
   17121           0 :         return 0;
   17122             : }
   17123             : 
   17124         109 : static PyObject *py_netr_NETLOGON_INFO_2_get_trusted_dc_name(PyObject *obj, void *closure)
   17125             : {
   17126         109 :         struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(obj);
   17127           0 :         PyObject *py_trusted_dc_name;
   17128         109 :         if (object->trusted_dc_name == NULL) {
   17129           0 :                 Py_RETURN_NONE;
   17130             :         }
   17131         109 :         if (object->trusted_dc_name == NULL) {
   17132           0 :                 py_trusted_dc_name = Py_None;
   17133           0 :                 Py_INCREF(py_trusted_dc_name);
   17134             :         } else {
   17135         109 :                 if (object->trusted_dc_name == NULL) {
   17136           0 :                         py_trusted_dc_name = Py_None;
   17137           0 :                         Py_INCREF(py_trusted_dc_name);
   17138             :                 } else {
   17139         109 :                         py_trusted_dc_name = PyUnicode_Decode(object->trusted_dc_name, strlen(object->trusted_dc_name), "utf-8", "ignore");
   17140             :                 }
   17141             :         }
   17142         109 :         return py_trusted_dc_name;
   17143             : }
   17144             : 
   17145           0 : static int py_netr_NETLOGON_INFO_2_set_trusted_dc_name(PyObject *py_obj, PyObject *value, void *closure)
   17146             : {
   17147           0 :         struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(py_obj);
   17148           0 :         if (value == NULL) {
   17149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_dc_name");
   17150           0 :                 return -1;
   17151             :         }
   17152           0 :         if (value == Py_None) {
   17153           0 :                 object->trusted_dc_name = NULL;
   17154             :         } else {
   17155           0 :                 object->trusted_dc_name = NULL;
   17156             :                 {
   17157           0 :                         const char *test_str;
   17158           0 :                         const char *talloc_str;
   17159           0 :                         PyObject *unicode = NULL;
   17160           0 :                         if (PyUnicode_Check(value)) {
   17161           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17162           0 :                                 if (unicode == NULL) {
   17163           0 :                                         return -1;
   17164             :                                 }
   17165           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17166           0 :                         } else if (PyBytes_Check(value)) {
   17167           0 :                                 test_str = PyBytes_AS_STRING(value);
   17168             :                         } else {
   17169           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17170           0 :                                 return -1;
   17171             :                         }
   17172           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17173           0 :                         if (unicode != NULL) {
   17174           0 :                                 Py_DECREF(unicode);
   17175             :                         }
   17176           0 :                         if (talloc_str == NULL) {
   17177           0 :                                 PyErr_NoMemory();
   17178           0 :                                 return -1;
   17179             :                         }
   17180           0 :                         object->trusted_dc_name = talloc_str;
   17181             :                 }
   17182             :         }
   17183           0 :         return 0;
   17184             : }
   17185             : 
   17186         162 : static PyObject *py_netr_NETLOGON_INFO_2_get_tc_connection_status(PyObject *obj, void *closure)
   17187             : {
   17188         162 :         struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(obj);
   17189           0 :         PyObject *py_tc_connection_status;
   17190         162 :         py_tc_connection_status = PyErr_FromWERROR(object->tc_connection_status);
   17191         162 :         return py_tc_connection_status;
   17192             : }
   17193             : 
   17194           0 : static int py_netr_NETLOGON_INFO_2_set_tc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
   17195             : {
   17196           0 :         struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(py_obj);
   17197           0 :         if (value == NULL) {
   17198           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->tc_connection_status");
   17199           0 :                 return -1;
   17200             :         }
   17201           0 :         object->tc_connection_status = W_ERROR(PyLong_AsLong(value));
   17202           0 :         return 0;
   17203             : }
   17204             : 
   17205             : static PyGetSetDef py_netr_NETLOGON_INFO_2_getsetters[] = {
   17206             :         {
   17207             :                 .name = discard_const_p(char, "flags"),
   17208             :                 .get = py_netr_NETLOGON_INFO_2_get_flags,
   17209             :                 .set = py_netr_NETLOGON_INFO_2_set_flags,
   17210             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
   17211             :         },
   17212             :         {
   17213             :                 .name = discard_const_p(char, "pdc_connection_status"),
   17214             :                 .get = py_netr_NETLOGON_INFO_2_get_pdc_connection_status,
   17215             :                 .set = py_netr_NETLOGON_INFO_2_set_pdc_connection_status,
   17216             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   17217             :         },
   17218             :         {
   17219             :                 .name = discard_const_p(char, "trusted_dc_name"),
   17220             :                 .get = py_netr_NETLOGON_INFO_2_get_trusted_dc_name,
   17221             :                 .set = py_netr_NETLOGON_INFO_2_set_trusted_dc_name,
   17222             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17223             :         },
   17224             :         {
   17225             :                 .name = discard_const_p(char, "tc_connection_status"),
   17226             :                 .get = py_netr_NETLOGON_INFO_2_get_tc_connection_status,
   17227             :                 .set = py_netr_NETLOGON_INFO_2_set_tc_connection_status,
   17228             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   17229             :         },
   17230             :         { .name = NULL }
   17231             : };
   17232             : 
   17233           0 : static PyObject *py_netr_NETLOGON_INFO_2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17234             : {
   17235           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_2, type);
   17236             : }
   17237             : 
   17238             : 
   17239             : static PyTypeObject netr_NETLOGON_INFO_2_Type = {
   17240             :         PyVarObject_HEAD_INIT(NULL, 0)
   17241             :         .tp_name = "netlogon.netr_NETLOGON_INFO_2",
   17242             :         .tp_getset = py_netr_NETLOGON_INFO_2_getsetters,
   17243             :         .tp_methods = NULL,
   17244             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17245             :         .tp_new = py_netr_NETLOGON_INFO_2_new,
   17246             : };
   17247             : 
   17248             : 
   17249           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_flags(PyObject *obj, void *closure)
   17250             : {
   17251           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
   17252           0 :         PyObject *py_flags;
   17253           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   17254           0 :         return py_flags;
   17255             : }
   17256             : 
   17257           0 : static int py_netr_NETLOGON_INFO_3_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   17258             : {
   17259           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
   17260           0 :         if (value == NULL) {
   17261           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
   17262           0 :                 return -1;
   17263             :         }
   17264             :         {
   17265           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   17266           0 :                 if (PyLong_Check(value)) {
   17267           0 :                         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->flags = 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_logon_attempts(PyObject *obj, void *closure)
   17288             : {
   17289           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
   17290           0 :         PyObject *py_logon_attempts;
   17291           0 :         py_logon_attempts = PyLong_FromUnsignedLongLong((uint32_t)(object->logon_attempts));
   17292           0 :         return py_logon_attempts;
   17293             : }
   17294             : 
   17295           0 : static int py_netr_NETLOGON_INFO_3_set_logon_attempts(PyObject *py_obj, PyObject *value, void *closure)
   17296             : {
   17297           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
   17298           0 :         if (value == NULL) {
   17299           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_attempts");
   17300           0 :                 return -1;
   17301             :         }
   17302             :         {
   17303           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_attempts));
   17304           0 :                 if (PyLong_Check(value)) {
   17305           0 :                         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->logon_attempts = 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_unknown1(PyObject *obj, void *closure)
   17326             : {
   17327           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
   17328           0 :         PyObject *py_unknown1;
   17329           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
   17330           0 :         return py_unknown1;
   17331             : }
   17332             : 
   17333           0 : static int py_netr_NETLOGON_INFO_3_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   17334             : {
   17335           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
   17336           0 :         if (value == NULL) {
   17337           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   17338           0 :                 return -1;
   17339             :         }
   17340             :         {
   17341           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   17342           0 :                 if (PyLong_Check(value)) {
   17343           0 :                         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->unknown1 = 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           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown2(PyObject *obj, void *closure)
   17364             : {
   17365           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
   17366           0 :         PyObject *py_unknown2;
   17367           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown2));
   17368           0 :         return py_unknown2;
   17369             : }
   17370             : 
   17371           0 : static int py_netr_NETLOGON_INFO_3_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   17372             : {
   17373           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
   17374           0 :         if (value == NULL) {
   17375           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   17376           0 :                 return -1;
   17377             :         }
   17378             :         {
   17379           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   17380           0 :                 if (PyLong_Check(value)) {
   17381           0 :                         unsigned long long test_var;
   17382           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17383           0 :                         if (PyErr_Occurred() != NULL) {
   17384           0 :                                 return -1;
   17385             :                         }
   17386           0 :                         if (test_var > uint_max) {
   17387           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17388             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17389           0 :                                 return -1;
   17390             :                         }
   17391           0 :                         object->unknown2 = test_var;
   17392             :                 } else {
   17393           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17394             :                           PyLong_Type.tp_name);
   17395           0 :                         return -1;
   17396             :                 }
   17397             :         }
   17398           0 :         return 0;
   17399             : }
   17400             : 
   17401           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown3(PyObject *obj, void *closure)
   17402             : {
   17403           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
   17404           0 :         PyObject *py_unknown3;
   17405           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown3));
   17406           0 :         return py_unknown3;
   17407             : }
   17408             : 
   17409           0 : static int py_netr_NETLOGON_INFO_3_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   17410             : {
   17411           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
   17412           0 :         if (value == NULL) {
   17413           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   17414           0 :                 return -1;
   17415             :         }
   17416             :         {
   17417           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   17418           0 :                 if (PyLong_Check(value)) {
   17419           0 :                         unsigned long long test_var;
   17420           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17421           0 :                         if (PyErr_Occurred() != NULL) {
   17422           0 :                                 return -1;
   17423             :                         }
   17424           0 :                         if (test_var > uint_max) {
   17425           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17426             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17427           0 :                                 return -1;
   17428             :                         }
   17429           0 :                         object->unknown3 = test_var;
   17430             :                 } else {
   17431           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17432             :                           PyLong_Type.tp_name);
   17433           0 :                         return -1;
   17434             :                 }
   17435             :         }
   17436           0 :         return 0;
   17437             : }
   17438             : 
   17439           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown4(PyObject *obj, void *closure)
   17440             : {
   17441           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
   17442           0 :         PyObject *py_unknown4;
   17443           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown4));
   17444           0 :         return py_unknown4;
   17445             : }
   17446             : 
   17447           0 : static int py_netr_NETLOGON_INFO_3_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   17448             : {
   17449           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
   17450           0 :         if (value == NULL) {
   17451           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
   17452           0 :                 return -1;
   17453             :         }
   17454             :         {
   17455           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   17456           0 :                 if (PyLong_Check(value)) {
   17457           0 :                         unsigned long long test_var;
   17458           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17459           0 :                         if (PyErr_Occurred() != NULL) {
   17460           0 :                                 return -1;
   17461             :                         }
   17462           0 :                         if (test_var > uint_max) {
   17463           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17464             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17465           0 :                                 return -1;
   17466             :                         }
   17467           0 :                         object->unknown4 = test_var;
   17468             :                 } else {
   17469           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17470             :                           PyLong_Type.tp_name);
   17471           0 :                         return -1;
   17472             :                 }
   17473             :         }
   17474           0 :         return 0;
   17475             : }
   17476             : 
   17477           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown5(PyObject *obj, void *closure)
   17478             : {
   17479           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
   17480           0 :         PyObject *py_unknown5;
   17481           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
   17482           0 :         return py_unknown5;
   17483             : }
   17484             : 
   17485           0 : static int py_netr_NETLOGON_INFO_3_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   17486             : {
   17487           0 :         struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
   17488           0 :         if (value == NULL) {
   17489           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
   17490           0 :                 return -1;
   17491             :         }
   17492             :         {
   17493           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   17494           0 :                 if (PyLong_Check(value)) {
   17495           0 :                         unsigned long long test_var;
   17496           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17497           0 :                         if (PyErr_Occurred() != NULL) {
   17498           0 :                                 return -1;
   17499             :                         }
   17500           0 :                         if (test_var > uint_max) {
   17501           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17502             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17503           0 :                                 return -1;
   17504             :                         }
   17505           0 :                         object->unknown5 = test_var;
   17506             :                 } else {
   17507           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17508             :                           PyLong_Type.tp_name);
   17509           0 :                         return -1;
   17510             :                 }
   17511             :         }
   17512           0 :         return 0;
   17513             : }
   17514             : 
   17515             : static PyGetSetDef py_netr_NETLOGON_INFO_3_getsetters[] = {
   17516             :         {
   17517             :                 .name = discard_const_p(char, "flags"),
   17518             :                 .get = py_netr_NETLOGON_INFO_3_get_flags,
   17519             :                 .set = py_netr_NETLOGON_INFO_3_set_flags,
   17520             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
   17521             :         },
   17522             :         {
   17523             :                 .name = discard_const_p(char, "logon_attempts"),
   17524             :                 .get = py_netr_NETLOGON_INFO_3_get_logon_attempts,
   17525             :                 .set = py_netr_NETLOGON_INFO_3_set_logon_attempts,
   17526             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17527             :         },
   17528             :         {
   17529             :                 .name = discard_const_p(char, "unknown1"),
   17530             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown1,
   17531             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown1,
   17532             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17533             :         },
   17534             :         {
   17535             :                 .name = discard_const_p(char, "unknown2"),
   17536             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown2,
   17537             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown2,
   17538             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17539             :         },
   17540             :         {
   17541             :                 .name = discard_const_p(char, "unknown3"),
   17542             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown3,
   17543             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown3,
   17544             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17545             :         },
   17546             :         {
   17547             :                 .name = discard_const_p(char, "unknown4"),
   17548             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown4,
   17549             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown4,
   17550             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17551             :         },
   17552             :         {
   17553             :                 .name = discard_const_p(char, "unknown5"),
   17554             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown5,
   17555             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown5,
   17556             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17557             :         },
   17558             :         { .name = NULL }
   17559             : };
   17560             : 
   17561           0 : static PyObject *py_netr_NETLOGON_INFO_3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17562             : {
   17563           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_3, type);
   17564             : }
   17565             : 
   17566             : 
   17567             : static PyTypeObject netr_NETLOGON_INFO_3_Type = {
   17568             :         PyVarObject_HEAD_INIT(NULL, 0)
   17569             :         .tp_name = "netlogon.netr_NETLOGON_INFO_3",
   17570             :         .tp_getset = py_netr_NETLOGON_INFO_3_getsetters,
   17571             :         .tp_methods = NULL,
   17572             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17573             :         .tp_new = py_netr_NETLOGON_INFO_3_new,
   17574             : };
   17575             : 
   17576             : 
   17577           0 : static PyObject *py_netr_NETLOGON_INFO_4_get_trusted_dc_name(PyObject *obj, void *closure)
   17578             : {
   17579           0 :         struct netr_NETLOGON_INFO_4 *object = pytalloc_get_ptr(obj);
   17580           0 :         PyObject *py_trusted_dc_name;
   17581           0 :         if (object->trusted_dc_name == NULL) {
   17582           0 :                 Py_RETURN_NONE;
   17583             :         }
   17584           0 :         if (object->trusted_dc_name == NULL) {
   17585           0 :                 py_trusted_dc_name = Py_None;
   17586           0 :                 Py_INCREF(py_trusted_dc_name);
   17587             :         } else {
   17588           0 :                 if (object->trusted_dc_name == NULL) {
   17589           0 :                         py_trusted_dc_name = Py_None;
   17590           0 :                         Py_INCREF(py_trusted_dc_name);
   17591             :                 } else {
   17592           0 :                         py_trusted_dc_name = PyUnicode_Decode(object->trusted_dc_name, strlen(object->trusted_dc_name), "utf-8", "ignore");
   17593             :                 }
   17594             :         }
   17595           0 :         return py_trusted_dc_name;
   17596             : }
   17597             : 
   17598           0 : static int py_netr_NETLOGON_INFO_4_set_trusted_dc_name(PyObject *py_obj, PyObject *value, void *closure)
   17599             : {
   17600           0 :         struct netr_NETLOGON_INFO_4 *object = pytalloc_get_ptr(py_obj);
   17601           0 :         if (value == NULL) {
   17602           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_dc_name");
   17603           0 :                 return -1;
   17604             :         }
   17605           0 :         if (value == Py_None) {
   17606           0 :                 object->trusted_dc_name = NULL;
   17607             :         } else {
   17608           0 :                 object->trusted_dc_name = NULL;
   17609             :                 {
   17610           0 :                         const char *test_str;
   17611           0 :                         const char *talloc_str;
   17612           0 :                         PyObject *unicode = NULL;
   17613           0 :                         if (PyUnicode_Check(value)) {
   17614           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17615           0 :                                 if (unicode == NULL) {
   17616           0 :                                         return -1;
   17617             :                                 }
   17618           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17619           0 :                         } else if (PyBytes_Check(value)) {
   17620           0 :                                 test_str = PyBytes_AS_STRING(value);
   17621             :                         } else {
   17622           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17623           0 :                                 return -1;
   17624             :                         }
   17625           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17626           0 :                         if (unicode != NULL) {
   17627           0 :                                 Py_DECREF(unicode);
   17628             :                         }
   17629           0 :                         if (talloc_str == NULL) {
   17630           0 :                                 PyErr_NoMemory();
   17631           0 :                                 return -1;
   17632             :                         }
   17633           0 :                         object->trusted_dc_name = talloc_str;
   17634             :                 }
   17635             :         }
   17636           0 :         return 0;
   17637             : }
   17638             : 
   17639           0 : static PyObject *py_netr_NETLOGON_INFO_4_get_trusted_domain_name(PyObject *obj, void *closure)
   17640             : {
   17641           0 :         struct netr_NETLOGON_INFO_4 *object = pytalloc_get_ptr(obj);
   17642           0 :         PyObject *py_trusted_domain_name;
   17643           0 :         if (object->trusted_domain_name == NULL) {
   17644           0 :                 Py_RETURN_NONE;
   17645             :         }
   17646           0 :         if (object->trusted_domain_name == NULL) {
   17647           0 :                 py_trusted_domain_name = Py_None;
   17648           0 :                 Py_INCREF(py_trusted_domain_name);
   17649             :         } else {
   17650           0 :                 if (object->trusted_domain_name == NULL) {
   17651           0 :                         py_trusted_domain_name = Py_None;
   17652           0 :                         Py_INCREF(py_trusted_domain_name);
   17653             :                 } else {
   17654           0 :                         py_trusted_domain_name = PyUnicode_Decode(object->trusted_domain_name, strlen(object->trusted_domain_name), "utf-8", "ignore");
   17655             :                 }
   17656             :         }
   17657           0 :         return py_trusted_domain_name;
   17658             : }
   17659             : 
   17660           0 : static int py_netr_NETLOGON_INFO_4_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   17661             : {
   17662           0 :         struct netr_NETLOGON_INFO_4 *object = pytalloc_get_ptr(py_obj);
   17663           0 :         if (value == NULL) {
   17664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_domain_name");
   17665           0 :                 return -1;
   17666             :         }
   17667           0 :         if (value == Py_None) {
   17668           0 :                 object->trusted_domain_name = NULL;
   17669             :         } else {
   17670           0 :                 object->trusted_domain_name = NULL;
   17671             :                 {
   17672           0 :                         const char *test_str;
   17673           0 :                         const char *talloc_str;
   17674           0 :                         PyObject *unicode = NULL;
   17675           0 :                         if (PyUnicode_Check(value)) {
   17676           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17677           0 :                                 if (unicode == NULL) {
   17678           0 :                                         return -1;
   17679             :                                 }
   17680           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17681           0 :                         } else if (PyBytes_Check(value)) {
   17682           0 :                                 test_str = PyBytes_AS_STRING(value);
   17683             :                         } else {
   17684           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17685           0 :                                 return -1;
   17686             :                         }
   17687           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17688           0 :                         if (unicode != NULL) {
   17689           0 :                                 Py_DECREF(unicode);
   17690             :                         }
   17691           0 :                         if (talloc_str == NULL) {
   17692           0 :                                 PyErr_NoMemory();
   17693           0 :                                 return -1;
   17694             :                         }
   17695           0 :                         object->trusted_domain_name = talloc_str;
   17696             :                 }
   17697             :         }
   17698           0 :         return 0;
   17699             : }
   17700             : 
   17701             : static PyGetSetDef py_netr_NETLOGON_INFO_4_getsetters[] = {
   17702             :         {
   17703             :                 .name = discard_const_p(char, "trusted_dc_name"),
   17704             :                 .get = py_netr_NETLOGON_INFO_4_get_trusted_dc_name,
   17705             :                 .set = py_netr_NETLOGON_INFO_4_set_trusted_dc_name,
   17706             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17707             :         },
   17708             :         {
   17709             :                 .name = discard_const_p(char, "trusted_domain_name"),
   17710             :                 .get = py_netr_NETLOGON_INFO_4_get_trusted_domain_name,
   17711             :                 .set = py_netr_NETLOGON_INFO_4_set_trusted_domain_name,
   17712             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17713             :         },
   17714             :         { .name = NULL }
   17715             : };
   17716             : 
   17717           0 : static PyObject *py_netr_NETLOGON_INFO_4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17718             : {
   17719           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_4, type);
   17720             : }
   17721             : 
   17722             : 
   17723             : static PyTypeObject netr_NETLOGON_INFO_4_Type = {
   17724             :         PyVarObject_HEAD_INIT(NULL, 0)
   17725             :         .tp_name = "netlogon.netr_NETLOGON_INFO_4",
   17726             :         .tp_getset = py_netr_NETLOGON_INFO_4_getsetters,
   17727             :         .tp_methods = NULL,
   17728             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17729             :         .tp_new = py_netr_NETLOGON_INFO_4_new,
   17730             : };
   17731             : 
   17732          81 : static PyObject *py_import_netr_CONTROL_QUERY_INFORMATION(TALLOC_CTX *mem_ctx, int level, union netr_CONTROL_QUERY_INFORMATION *in)
   17733             : {
   17734           0 :         PyObject *ret;
   17735             : 
   17736          81 :         switch (level) {
   17737           0 :                 case 1:
   17738           0 :                         if (in->info1 == NULL) {
   17739           0 :                                 ret = Py_None;
   17740           0 :                                 Py_INCREF(ret);
   17741             :                         } else {
   17742           0 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_1_Type, in->info1, in->info1);
   17743             :                         }
   17744           0 :                         return ret;
   17745             : 
   17746          81 :                 case 2:
   17747          81 :                         if (in->info2 == NULL) {
   17748           0 :                                 ret = Py_None;
   17749           0 :                                 Py_INCREF(ret);
   17750             :                         } else {
   17751          81 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_2_Type, in->info2, in->info2);
   17752             :                         }
   17753          81 :                         return ret;
   17754             : 
   17755           0 :                 case 3:
   17756           0 :                         if (in->info3 == NULL) {
   17757           0 :                                 ret = Py_None;
   17758           0 :                                 Py_INCREF(ret);
   17759             :                         } else {
   17760           0 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_3_Type, in->info3, in->info3);
   17761             :                         }
   17762           0 :                         return ret;
   17763             : 
   17764           0 :                 case 4:
   17765           0 :                         if (in->info4 == NULL) {
   17766           0 :                                 ret = Py_None;
   17767           0 :                                 Py_INCREF(ret);
   17768             :                         } else {
   17769           0 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_4_Type, in->info4, in->info4);
   17770             :                         }
   17771           0 :                         return ret;
   17772             : 
   17773           0 :                 default:
   17774           0 :                         ret = Py_None;
   17775           0 :                         Py_INCREF(ret);
   17776           0 :                         return ret;
   17777             : 
   17778             :         }
   17779             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   17780             :         return NULL;
   17781             : }
   17782             : 
   17783           0 : static union netr_CONTROL_QUERY_INFORMATION *py_export_netr_CONTROL_QUERY_INFORMATION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   17784             : {
   17785           0 :         union netr_CONTROL_QUERY_INFORMATION *ret = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   17786           0 :         switch (level) {
   17787           0 :                 case 1:
   17788           0 :                         if (in == NULL) {
   17789           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1");
   17790           0 :                                 talloc_free(ret); return NULL;
   17791             :                         }
   17792           0 :                         if (in == Py_None) {
   17793           0 :                                 ret->info1 = NULL;
   17794             :                         } else {
   17795           0 :                                 ret->info1 = NULL;
   17796           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_1_Type, in, talloc_free(ret); return NULL;);
   17797           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17798           0 :                                         PyErr_NoMemory();
   17799           0 :                                         talloc_free(ret); return NULL;
   17800             :                                 }
   17801           0 :                                 ret->info1 = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(in);
   17802             :                         }
   17803           0 :                         break;
   17804             : 
   17805           0 :                 case 2:
   17806           0 :                         if (in == NULL) {
   17807           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info2");
   17808           0 :                                 talloc_free(ret); return NULL;
   17809             :                         }
   17810           0 :                         if (in == Py_None) {
   17811           0 :                                 ret->info2 = NULL;
   17812             :                         } else {
   17813           0 :                                 ret->info2 = NULL;
   17814           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_2_Type, in, talloc_free(ret); return NULL;);
   17815           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17816           0 :                                         PyErr_NoMemory();
   17817           0 :                                         talloc_free(ret); return NULL;
   17818             :                                 }
   17819           0 :                                 ret->info2 = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(in);
   17820             :                         }
   17821           0 :                         break;
   17822             : 
   17823           0 :                 case 3:
   17824           0 :                         if (in == NULL) {
   17825           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info3");
   17826           0 :                                 talloc_free(ret); return NULL;
   17827             :                         }
   17828           0 :                         if (in == Py_None) {
   17829           0 :                                 ret->info3 = NULL;
   17830             :                         } else {
   17831           0 :                                 ret->info3 = NULL;
   17832           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_3_Type, in, talloc_free(ret); return NULL;);
   17833           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17834           0 :                                         PyErr_NoMemory();
   17835           0 :                                         talloc_free(ret); return NULL;
   17836             :                                 }
   17837           0 :                                 ret->info3 = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(in);
   17838             :                         }
   17839           0 :                         break;
   17840             : 
   17841           0 :                 case 4:
   17842           0 :                         if (in == NULL) {
   17843           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info4");
   17844           0 :                                 talloc_free(ret); return NULL;
   17845             :                         }
   17846           0 :                         if (in == Py_None) {
   17847           0 :                                 ret->info4 = NULL;
   17848             :                         } else {
   17849           0 :                                 ret->info4 = NULL;
   17850           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_4_Type, in, talloc_free(ret); return NULL;);
   17851           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17852           0 :                                         PyErr_NoMemory();
   17853           0 :                                         talloc_free(ret); return NULL;
   17854             :                                 }
   17855           0 :                                 ret->info4 = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(in);
   17856             :                         }
   17857           0 :                         break;
   17858             : 
   17859           0 :                 default:
   17860           0 :                         break;
   17861             : 
   17862             :         }
   17863             : 
   17864           0 :         return ret;
   17865             : }
   17866             : 
   17867          81 : static PyObject *py_netr_CONTROL_QUERY_INFORMATION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17868             : {
   17869          81 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17870          81 :         PyObject *mem_ctx_obj = NULL;
   17871          81 :         TALLOC_CTX *mem_ctx = NULL;
   17872          81 :         int level = 0;
   17873          81 :         PyObject *in_obj = NULL;
   17874          81 :         union netr_CONTROL_QUERY_INFORMATION *in = NULL;
   17875             : 
   17876          81 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   17877             :                 discard_const_p(char *, kwnames),
   17878             :                 &mem_ctx_obj,
   17879             :                 &level,
   17880             :                 &in_obj)) {
   17881           0 :                 return NULL;
   17882             :         }
   17883          81 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17884          81 :         if (mem_ctx == NULL) {
   17885           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17886           0 :                 return NULL;
   17887             :         }
   17888          81 :         in = (union netr_CONTROL_QUERY_INFORMATION *)pytalloc_get_ptr(in_obj);
   17889          81 :         if (in == NULL) {
   17890           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_CONTROL_QUERY_INFORMATION!");
   17891           0 :                 return NULL;
   17892             :         }
   17893             : 
   17894          81 :         return py_import_netr_CONTROL_QUERY_INFORMATION(mem_ctx, level, in);
   17895             : }
   17896             : 
   17897           0 : static PyObject *py_netr_CONTROL_QUERY_INFORMATION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17898             : {
   17899           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17900           0 :         PyObject *mem_ctx_obj = NULL;
   17901           0 :         TALLOC_CTX *mem_ctx = NULL;
   17902           0 :         int level = 0;
   17903           0 :         PyObject *in = NULL;
   17904           0 :         union netr_CONTROL_QUERY_INFORMATION *out = NULL;
   17905             : 
   17906           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   17907             :                 discard_const_p(char *, kwnames),
   17908             :                 &mem_ctx_obj,
   17909             :                 &level,
   17910             :                 &in)) {
   17911           0 :                 return NULL;
   17912             :         }
   17913           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17914           0 :         if (mem_ctx == NULL) {
   17915           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17916           0 :                 return NULL;
   17917             :         }
   17918             : 
   17919           0 :         out = py_export_netr_CONTROL_QUERY_INFORMATION(mem_ctx, level, in);
   17920           0 :         if (out == NULL) {
   17921           0 :                 return NULL;
   17922             :         }
   17923             : 
   17924           0 :         return pytalloc_GenericObject_reference(out);
   17925             : }
   17926             : 
   17927             : static PyMethodDef py_netr_CONTROL_QUERY_INFORMATION_methods[] = {
   17928             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_QUERY_INFORMATION_import),
   17929             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17930             :                 "T.__import__(mem_ctx, level, in) => ret." },
   17931             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_QUERY_INFORMATION_export),
   17932             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17933             :                 "T.__export__(mem_ctx, level, in) => ret." },
   17934             :         { NULL, NULL, 0, NULL }
   17935             : };
   17936             : 
   17937           0 : static PyObject *py_netr_CONTROL_QUERY_INFORMATION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17938             : {
   17939           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   17940           0 :         return NULL;
   17941             : }
   17942             : 
   17943             : 
   17944             : static PyTypeObject netr_CONTROL_QUERY_INFORMATION_Type = {
   17945             :         PyVarObject_HEAD_INIT(NULL, 0)
   17946             :         .tp_name = "netlogon.netr_CONTROL_QUERY_INFORMATION",
   17947             :         .tp_getset = NULL,
   17948             :         .tp_methods = py_netr_CONTROL_QUERY_INFORMATION_methods,
   17949             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17950             :         .tp_new = py_netr_CONTROL_QUERY_INFORMATION_new,
   17951             : };
   17952             : 
   17953           0 : static PyObject *py_import_netr_CONTROL_DATA_INFORMATION(TALLOC_CTX *mem_ctx, int level, union netr_CONTROL_DATA_INFORMATION *in)
   17954             : {
   17955           0 :         PyObject *ret;
   17956             : 
   17957           0 :         switch (level) {
   17958           0 :                 case NETLOGON_CONTROL_REDISCOVER:
   17959           0 :                         if (in->domain == NULL) {
   17960           0 :                                 ret = Py_None;
   17961           0 :                                 Py_INCREF(ret);
   17962             :                         } else {
   17963           0 :                                 if (in->domain == NULL) {
   17964           0 :                                         ret = Py_None;
   17965           0 :                                         Py_INCREF(ret);
   17966             :                                 } else {
   17967           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17968             :                                 }
   17969             :                         }
   17970           0 :                         return ret;
   17971             : 
   17972           0 :                 case NETLOGON_CONTROL_TC_QUERY:
   17973           0 :                         if (in->domain == NULL) {
   17974           0 :                                 ret = Py_None;
   17975           0 :                                 Py_INCREF(ret);
   17976             :                         } else {
   17977           0 :                                 if (in->domain == NULL) {
   17978           0 :                                         ret = Py_None;
   17979           0 :                                         Py_INCREF(ret);
   17980             :                                 } else {
   17981           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17982             :                                 }
   17983             :                         }
   17984           0 :                         return ret;
   17985             : 
   17986           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
   17987           0 :                         if (in->domain == NULL) {
   17988           0 :                                 ret = Py_None;
   17989           0 :                                 Py_INCREF(ret);
   17990             :                         } else {
   17991           0 :                                 if (in->domain == NULL) {
   17992           0 :                                         ret = Py_None;
   17993           0 :                                         Py_INCREF(ret);
   17994             :                                 } else {
   17995           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17996             :                                 }
   17997             :                         }
   17998           0 :                         return ret;
   17999             : 
   18000           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD:
   18001           0 :                         if (in->domain == NULL) {
   18002           0 :                                 ret = Py_None;
   18003           0 :                                 Py_INCREF(ret);
   18004             :                         } else {
   18005           0 :                                 if (in->domain == NULL) {
   18006           0 :                                         ret = Py_None;
   18007           0 :                                         Py_INCREF(ret);
   18008             :                                 } else {
   18009           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   18010             :                                 }
   18011             :                         }
   18012           0 :                         return ret;
   18013             : 
   18014           0 :                 case NETLOGON_CONTROL_TC_VERIFY:
   18015           0 :                         if (in->domain == NULL) {
   18016           0 :                                 ret = Py_None;
   18017           0 :                                 Py_INCREF(ret);
   18018             :                         } else {
   18019           0 :                                 if (in->domain == NULL) {
   18020           0 :                                         ret = Py_None;
   18021           0 :                                         Py_INCREF(ret);
   18022             :                                 } else {
   18023           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   18024             :                                 }
   18025             :                         }
   18026           0 :                         return ret;
   18027             : 
   18028           0 :                 case NETLOGON_CONTROL_FIND_USER:
   18029           0 :                         if (in->user == NULL) {
   18030           0 :                                 ret = Py_None;
   18031           0 :                                 Py_INCREF(ret);
   18032             :                         } else {
   18033           0 :                                 if (in->user == NULL) {
   18034           0 :                                         ret = Py_None;
   18035           0 :                                         Py_INCREF(ret);
   18036             :                                 } else {
   18037           0 :                                         ret = PyUnicode_Decode(in->user, strlen(in->user), "utf-8", "ignore");
   18038             :                                 }
   18039             :                         }
   18040           0 :                         return ret;
   18041             : 
   18042           0 :                 case NETLOGON_CONTROL_SET_DBFLAG:
   18043           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->debug_level));
   18044           0 :                         return ret;
   18045             : 
   18046           0 :                 default:
   18047           0 :                         ret = Py_None;
   18048           0 :                         Py_INCREF(ret);
   18049           0 :                         return ret;
   18050             : 
   18051             :         }
   18052             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   18053             :         return NULL;
   18054             : }
   18055             : 
   18056          81 : static union netr_CONTROL_DATA_INFORMATION *py_export_netr_CONTROL_DATA_INFORMATION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   18057             : {
   18058          81 :         union netr_CONTROL_DATA_INFORMATION *ret = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   18059          81 :         switch (level) {
   18060          28 :                 case NETLOGON_CONTROL_REDISCOVER:
   18061          28 :                         if (in == NULL) {
   18062           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
   18063           0 :                                 talloc_free(ret); return NULL;
   18064             :                         }
   18065          28 :                         if (in == Py_None) {
   18066           0 :                                 ret->domain = NULL;
   18067             :                         } else {
   18068          28 :                                 ret->domain = NULL;
   18069             :                                 {
   18070           0 :                                         const char *test_str;
   18071           0 :                                         const char *talloc_str;
   18072          28 :                                         PyObject *unicode = NULL;
   18073          28 :                                         if (PyUnicode_Check(in)) {
   18074          28 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18075          28 :                                                 if (unicode == NULL) {
   18076           0 :                                                         talloc_free(ret); return NULL;
   18077             :                                                 }
   18078          28 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18079           0 :                                         } else if (PyBytes_Check(in)) {
   18080           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18081             :                                         } else {
   18082           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18083           0 :                                                 talloc_free(ret); return NULL;
   18084             :                                         }
   18085          28 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18086          28 :                                         if (unicode != NULL) {
   18087          14 :                                                 Py_DECREF(unicode);
   18088             :                                         }
   18089          28 :                                         if (talloc_str == NULL) {
   18090           0 :                                                 PyErr_NoMemory();
   18091           0 :                                                 talloc_free(ret); return NULL;
   18092             :                                         }
   18093          28 :                                         ret->domain = talloc_str;
   18094             :                                 }
   18095             :                         }
   18096          28 :                         break;
   18097             : 
   18098           0 :                 case NETLOGON_CONTROL_TC_QUERY:
   18099           0 :                         if (in == NULL) {
   18100           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
   18101           0 :                                 talloc_free(ret); return NULL;
   18102             :                         }
   18103           0 :                         if (in == Py_None) {
   18104           0 :                                 ret->domain = NULL;
   18105             :                         } else {
   18106           0 :                                 ret->domain = NULL;
   18107             :                                 {
   18108           0 :                                         const char *test_str;
   18109           0 :                                         const char *talloc_str;
   18110           0 :                                         PyObject *unicode = NULL;
   18111           0 :                                         if (PyUnicode_Check(in)) {
   18112           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18113           0 :                                                 if (unicode == NULL) {
   18114           0 :                                                         talloc_free(ret); return NULL;
   18115             :                                                 }
   18116           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18117           0 :                                         } else if (PyBytes_Check(in)) {
   18118           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18119             :                                         } else {
   18120           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18121           0 :                                                 talloc_free(ret); return NULL;
   18122             :                                         }
   18123           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18124           0 :                                         if (unicode != NULL) {
   18125           0 :                                                 Py_DECREF(unicode);
   18126             :                                         }
   18127           0 :                                         if (talloc_str == NULL) {
   18128           0 :                                                 PyErr_NoMemory();
   18129           0 :                                                 talloc_free(ret); return NULL;
   18130             :                                         }
   18131           0 :                                         ret->domain = talloc_str;
   18132             :                                 }
   18133             :                         }
   18134           0 :                         break;
   18135             : 
   18136           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
   18137           0 :                         if (in == NULL) {
   18138           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
   18139           0 :                                 talloc_free(ret); return NULL;
   18140             :                         }
   18141           0 :                         if (in == Py_None) {
   18142           0 :                                 ret->domain = NULL;
   18143             :                         } else {
   18144           0 :                                 ret->domain = NULL;
   18145             :                                 {
   18146           0 :                                         const char *test_str;
   18147           0 :                                         const char *talloc_str;
   18148           0 :                                         PyObject *unicode = NULL;
   18149           0 :                                         if (PyUnicode_Check(in)) {
   18150           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18151           0 :                                                 if (unicode == NULL) {
   18152           0 :                                                         talloc_free(ret); return NULL;
   18153             :                                                 }
   18154           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18155           0 :                                         } else if (PyBytes_Check(in)) {
   18156           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18157             :                                         } else {
   18158           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18159           0 :                                                 talloc_free(ret); return NULL;
   18160             :                                         }
   18161           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18162           0 :                                         if (unicode != NULL) {
   18163           0 :                                                 Py_DECREF(unicode);
   18164             :                                         }
   18165           0 :                                         if (talloc_str == NULL) {
   18166           0 :                                                 PyErr_NoMemory();
   18167           0 :                                                 talloc_free(ret); return NULL;
   18168             :                                         }
   18169           0 :                                         ret->domain = talloc_str;
   18170             :                                 }
   18171             :                         }
   18172           0 :                         break;
   18173             : 
   18174           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD:
   18175           0 :                         if (in == NULL) {
   18176           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
   18177           0 :                                 talloc_free(ret); return NULL;
   18178             :                         }
   18179           0 :                         if (in == Py_None) {
   18180           0 :                                 ret->domain = NULL;
   18181             :                         } else {
   18182           0 :                                 ret->domain = NULL;
   18183             :                                 {
   18184           0 :                                         const char *test_str;
   18185           0 :                                         const char *talloc_str;
   18186           0 :                                         PyObject *unicode = NULL;
   18187           0 :                                         if (PyUnicode_Check(in)) {
   18188           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18189           0 :                                                 if (unicode == NULL) {
   18190           0 :                                                         talloc_free(ret); return NULL;
   18191             :                                                 }
   18192           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18193           0 :                                         } else if (PyBytes_Check(in)) {
   18194           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18195             :                                         } else {
   18196           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18197           0 :                                                 talloc_free(ret); return NULL;
   18198             :                                         }
   18199           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18200           0 :                                         if (unicode != NULL) {
   18201           0 :                                                 Py_DECREF(unicode);
   18202             :                                         }
   18203           0 :                                         if (talloc_str == NULL) {
   18204           0 :                                                 PyErr_NoMemory();
   18205           0 :                                                 talloc_free(ret); return NULL;
   18206             :                                         }
   18207           0 :                                         ret->domain = talloc_str;
   18208             :                                 }
   18209             :                         }
   18210           0 :                         break;
   18211             : 
   18212          53 :                 case NETLOGON_CONTROL_TC_VERIFY:
   18213          53 :                         if (in == NULL) {
   18214           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
   18215           0 :                                 talloc_free(ret); return NULL;
   18216             :                         }
   18217          53 :                         if (in == Py_None) {
   18218           0 :                                 ret->domain = NULL;
   18219             :                         } else {
   18220          53 :                                 ret->domain = NULL;
   18221             :                                 {
   18222           0 :                                         const char *test_str;
   18223           0 :                                         const char *talloc_str;
   18224          53 :                                         PyObject *unicode = NULL;
   18225          53 :                                         if (PyUnicode_Check(in)) {
   18226          53 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18227          53 :                                                 if (unicode == NULL) {
   18228           0 :                                                         talloc_free(ret); return NULL;
   18229             :                                                 }
   18230          53 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18231           0 :                                         } else if (PyBytes_Check(in)) {
   18232           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18233             :                                         } else {
   18234           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18235           0 :                                                 talloc_free(ret); return NULL;
   18236             :                                         }
   18237          53 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18238          53 :                                         if (unicode != NULL) {
   18239          27 :                                                 Py_DECREF(unicode);
   18240             :                                         }
   18241          53 :                                         if (talloc_str == NULL) {
   18242           0 :                                                 PyErr_NoMemory();
   18243           0 :                                                 talloc_free(ret); return NULL;
   18244             :                                         }
   18245          53 :                                         ret->domain = talloc_str;
   18246             :                                 }
   18247             :                         }
   18248          53 :                         break;
   18249             : 
   18250           0 :                 case NETLOGON_CONTROL_FIND_USER:
   18251           0 :                         if (in == NULL) {
   18252           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->user");
   18253           0 :                                 talloc_free(ret); return NULL;
   18254             :                         }
   18255           0 :                         if (in == Py_None) {
   18256           0 :                                 ret->user = NULL;
   18257             :                         } else {
   18258           0 :                                 ret->user = NULL;
   18259             :                                 {
   18260           0 :                                         const char *test_str;
   18261           0 :                                         const char *talloc_str;
   18262           0 :                                         PyObject *unicode = NULL;
   18263           0 :                                         if (PyUnicode_Check(in)) {
   18264           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18265           0 :                                                 if (unicode == NULL) {
   18266           0 :                                                         talloc_free(ret); return NULL;
   18267             :                                                 }
   18268           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18269           0 :                                         } else if (PyBytes_Check(in)) {
   18270           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18271             :                                         } else {
   18272           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18273           0 :                                                 talloc_free(ret); return NULL;
   18274             :                                         }
   18275           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18276           0 :                                         if (unicode != NULL) {
   18277           0 :                                                 Py_DECREF(unicode);
   18278             :                                         }
   18279           0 :                                         if (talloc_str == NULL) {
   18280           0 :                                                 PyErr_NoMemory();
   18281           0 :                                                 talloc_free(ret); return NULL;
   18282             :                                         }
   18283           0 :                                         ret->user = talloc_str;
   18284             :                                 }
   18285             :                         }
   18286           0 :                         break;
   18287             : 
   18288           0 :                 case NETLOGON_CONTROL_SET_DBFLAG:
   18289           0 :                         if (in == NULL) {
   18290           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->debug_level");
   18291           0 :                                 talloc_free(ret); return NULL;
   18292             :                         }
   18293             :                         {
   18294           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->debug_level));
   18295           0 :                                 if (PyLong_Check(in)) {
   18296           0 :                                         unsigned long long test_var;
   18297           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   18298           0 :                                         if (PyErr_Occurred() != NULL) {
   18299           0 :                                                 talloc_free(ret); return NULL;
   18300             :                                         }
   18301           0 :                                         if (test_var > uint_max) {
   18302           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18303             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   18304           0 :                                                 talloc_free(ret); return NULL;
   18305             :                                         }
   18306           0 :                                         ret->debug_level = test_var;
   18307             :                                 } else {
   18308           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18309             :                                           PyLong_Type.tp_name);
   18310           0 :                                         talloc_free(ret); return NULL;
   18311             :                                 }
   18312             :                         }
   18313           0 :                         break;
   18314             : 
   18315           0 :                 default:
   18316           0 :                         break;
   18317             : 
   18318             :         }
   18319             : 
   18320          81 :         return ret;
   18321             : }
   18322             : 
   18323           0 : static PyObject *py_netr_CONTROL_DATA_INFORMATION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18324             : {
   18325           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18326           0 :         PyObject *mem_ctx_obj = NULL;
   18327           0 :         TALLOC_CTX *mem_ctx = NULL;
   18328           0 :         int level = 0;
   18329           0 :         PyObject *in_obj = NULL;
   18330           0 :         union netr_CONTROL_DATA_INFORMATION *in = NULL;
   18331             : 
   18332           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   18333             :                 discard_const_p(char *, kwnames),
   18334             :                 &mem_ctx_obj,
   18335             :                 &level,
   18336             :                 &in_obj)) {
   18337           0 :                 return NULL;
   18338             :         }
   18339           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18340           0 :         if (mem_ctx == NULL) {
   18341           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18342           0 :                 return NULL;
   18343             :         }
   18344           0 :         in = (union netr_CONTROL_DATA_INFORMATION *)pytalloc_get_ptr(in_obj);
   18345           0 :         if (in == NULL) {
   18346           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_CONTROL_DATA_INFORMATION!");
   18347           0 :                 return NULL;
   18348             :         }
   18349             : 
   18350           0 :         return py_import_netr_CONTROL_DATA_INFORMATION(mem_ctx, level, in);
   18351             : }
   18352             : 
   18353          81 : static PyObject *py_netr_CONTROL_DATA_INFORMATION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18354             : {
   18355          81 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18356          81 :         PyObject *mem_ctx_obj = NULL;
   18357          81 :         TALLOC_CTX *mem_ctx = NULL;
   18358          81 :         int level = 0;
   18359          81 :         PyObject *in = NULL;
   18360          81 :         union netr_CONTROL_DATA_INFORMATION *out = NULL;
   18361             : 
   18362          81 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   18363             :                 discard_const_p(char *, kwnames),
   18364             :                 &mem_ctx_obj,
   18365             :                 &level,
   18366             :                 &in)) {
   18367           0 :                 return NULL;
   18368             :         }
   18369          81 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18370          81 :         if (mem_ctx == NULL) {
   18371           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18372           0 :                 return NULL;
   18373             :         }
   18374             : 
   18375          81 :         out = py_export_netr_CONTROL_DATA_INFORMATION(mem_ctx, level, in);
   18376          81 :         if (out == NULL) {
   18377           0 :                 return NULL;
   18378             :         }
   18379             : 
   18380          81 :         return pytalloc_GenericObject_reference(out);
   18381             : }
   18382             : 
   18383             : static PyMethodDef py_netr_CONTROL_DATA_INFORMATION_methods[] = {
   18384             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_DATA_INFORMATION_import),
   18385             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18386             :                 "T.__import__(mem_ctx, level, in) => ret." },
   18387             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_DATA_INFORMATION_export),
   18388             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18389             :                 "T.__export__(mem_ctx, level, in) => ret." },
   18390             :         { NULL, NULL, 0, NULL }
   18391             : };
   18392             : 
   18393           0 : static PyObject *py_netr_CONTROL_DATA_INFORMATION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18394             : {
   18395           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   18396           0 :         return NULL;
   18397             : }
   18398             : 
   18399             : 
   18400             : static PyTypeObject netr_CONTROL_DATA_INFORMATION_Type = {
   18401             :         PyVarObject_HEAD_INIT(NULL, 0)
   18402             :         .tp_name = "netlogon.netr_CONTROL_DATA_INFORMATION",
   18403             :         .tp_getset = NULL,
   18404             :         .tp_methods = py_netr_CONTROL_DATA_INFORMATION_methods,
   18405             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18406             :         .tp_new = py_netr_CONTROL_DATA_INFORMATION_new,
   18407             : };
   18408             : 
   18409           0 : static PyObject *py_import_netr_ChangeLogObject(TALLOC_CTX *mem_ctx, int level, union netr_ChangeLogObject *in)
   18410             : {
   18411           0 :         PyObject *ret;
   18412             : 
   18413           0 :         switch (level) {
   18414           0 :                 case NETR_CHANGELOG_SID_INCLUDED:
   18415           0 :                         ret = pytalloc_reference_ex(dom_sid_Type, mem_ctx, &in->object_sid);
   18416           0 :                         return ret;
   18417             : 
   18418           0 :                 case NETR_CHANGELOG_NAME_INCLUDED:
   18419           0 :                         ret = PyString_FromStringOrNULL(in->object_name);
   18420           0 :                         return ret;
   18421             : 
   18422           0 :                 default:
   18423           0 :                         ret = Py_None;
   18424           0 :                         Py_INCREF(ret);
   18425           0 :                         return ret;
   18426             : 
   18427             :         }
   18428             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   18429             :         return NULL;
   18430             : }
   18431             : 
   18432           0 : static union netr_ChangeLogObject *py_export_netr_ChangeLogObject(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   18433             : {
   18434           0 :         union netr_ChangeLogObject *ret = talloc_zero(mem_ctx, union netr_ChangeLogObject);
   18435           0 :         switch (level) {
   18436           0 :                 case NETR_CHANGELOG_SID_INCLUDED:
   18437           0 :                         if (in == NULL) {
   18438           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->object_sid");
   18439           0 :                                 talloc_free(ret); return NULL;
   18440             :                         }
   18441           0 :                         PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   18442           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   18443           0 :                                 PyErr_NoMemory();
   18444           0 :                                 talloc_free(ret); return NULL;
   18445             :                         }
   18446           0 :                         ret->object_sid = *(struct dom_sid *)pytalloc_get_ptr(in);
   18447           0 :                         break;
   18448             : 
   18449           0 :                 case NETR_CHANGELOG_NAME_INCLUDED:
   18450           0 :                         if (in == NULL) {
   18451           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->object_name");
   18452           0 :                                 talloc_free(ret); return NULL;
   18453             :                         }
   18454             :                         {
   18455           0 :                                 const char *test_str;
   18456           0 :                                 const char *talloc_str;
   18457           0 :                                 PyObject *unicode = NULL;
   18458           0 :                                 if (PyUnicode_Check(in)) {
   18459           0 :                                         unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18460           0 :                                         if (unicode == NULL) {
   18461           0 :                                                 talloc_free(ret); return NULL;
   18462             :                                         }
   18463           0 :                                         test_str = PyBytes_AS_STRING(unicode);
   18464           0 :                                 } else if (PyBytes_Check(in)) {
   18465           0 :                                         test_str = PyBytes_AS_STRING(in);
   18466             :                                 } else {
   18467           0 :                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18468           0 :                                         talloc_free(ret); return NULL;
   18469             :                                 }
   18470           0 :                                 talloc_str = talloc_strdup(mem_ctx, test_str);
   18471           0 :                                 if (unicode != NULL) {
   18472           0 :                                         Py_DECREF(unicode);
   18473             :                                 }
   18474           0 :                                 if (talloc_str == NULL) {
   18475           0 :                                         PyErr_NoMemory();
   18476           0 :                                         talloc_free(ret); return NULL;
   18477             :                                 }
   18478           0 :                                 ret->object_name = talloc_str;
   18479             :                         }
   18480           0 :                         break;
   18481             : 
   18482           0 :                 default:
   18483           0 :                         break;
   18484             : 
   18485             :         }
   18486             : 
   18487           0 :         return ret;
   18488             : }
   18489             : 
   18490           0 : static PyObject *py_netr_ChangeLogObject_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18491             : {
   18492           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18493           0 :         PyObject *mem_ctx_obj = NULL;
   18494           0 :         TALLOC_CTX *mem_ctx = NULL;
   18495           0 :         int level = 0;
   18496           0 :         PyObject *in_obj = NULL;
   18497           0 :         union netr_ChangeLogObject *in = NULL;
   18498             : 
   18499           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   18500             :                 discard_const_p(char *, kwnames),
   18501             :                 &mem_ctx_obj,
   18502             :                 &level,
   18503             :                 &in_obj)) {
   18504           0 :                 return NULL;
   18505             :         }
   18506           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18507           0 :         if (mem_ctx == NULL) {
   18508           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18509           0 :                 return NULL;
   18510             :         }
   18511           0 :         in = (union netr_ChangeLogObject *)pytalloc_get_ptr(in_obj);
   18512           0 :         if (in == NULL) {
   18513           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_ChangeLogObject!");
   18514           0 :                 return NULL;
   18515             :         }
   18516             : 
   18517           0 :         return py_import_netr_ChangeLogObject(mem_ctx, level, in);
   18518             : }
   18519             : 
   18520           0 : static PyObject *py_netr_ChangeLogObject_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18521             : {
   18522           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18523           0 :         PyObject *mem_ctx_obj = NULL;
   18524           0 :         TALLOC_CTX *mem_ctx = NULL;
   18525           0 :         int level = 0;
   18526           0 :         PyObject *in = NULL;
   18527           0 :         union netr_ChangeLogObject *out = NULL;
   18528             : 
   18529           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   18530             :                 discard_const_p(char *, kwnames),
   18531             :                 &mem_ctx_obj,
   18532             :                 &level,
   18533             :                 &in)) {
   18534           0 :                 return NULL;
   18535             :         }
   18536           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18537           0 :         if (mem_ctx == NULL) {
   18538           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18539           0 :                 return NULL;
   18540             :         }
   18541             : 
   18542           0 :         out = py_export_netr_ChangeLogObject(mem_ctx, level, in);
   18543           0 :         if (out == NULL) {
   18544           0 :                 return NULL;
   18545             :         }
   18546             : 
   18547           0 :         return pytalloc_GenericObject_reference(out);
   18548             : }
   18549             : 
   18550             : static PyMethodDef py_netr_ChangeLogObject_methods[] = {
   18551             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogObject_import),
   18552             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18553             :                 "T.__import__(mem_ctx, level, in) => ret." },
   18554             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogObject_export),
   18555             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18556             :                 "T.__export__(mem_ctx, level, in) => ret." },
   18557             :         { NULL, NULL, 0, NULL }
   18558             : };
   18559             : 
   18560           0 : static PyObject *py_netr_ChangeLogObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18561             : {
   18562           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   18563           0 :         return NULL;
   18564             : }
   18565             : 
   18566             : 
   18567             : static PyTypeObject netr_ChangeLogObject_Type = {
   18568             :         PyVarObject_HEAD_INIT(NULL, 0)
   18569             :         .tp_name = "netlogon.netr_ChangeLogObject",
   18570             :         .tp_getset = NULL,
   18571             :         .tp_methods = py_netr_ChangeLogObject_methods,
   18572             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18573             :         .tp_new = py_netr_ChangeLogObject_new,
   18574             : };
   18575             : 
   18576             : 
   18577           0 : static PyObject *py_netr_ChangeLogEntry_get_serial_number1(PyObject *obj, void *closure)
   18578             : {
   18579           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
   18580           0 :         PyObject *py_serial_number1;
   18581           0 :         py_serial_number1 = PyLong_FromUnsignedLongLong((uint32_t)(object->serial_number1));
   18582           0 :         return py_serial_number1;
   18583             : }
   18584             : 
   18585           0 : static int py_netr_ChangeLogEntry_set_serial_number1(PyObject *py_obj, PyObject *value, void *closure)
   18586             : {
   18587           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18588           0 :         if (value == NULL) {
   18589           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->serial_number1");
   18590           0 :                 return -1;
   18591             :         }
   18592             :         {
   18593           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number1));
   18594           0 :                 if (PyLong_Check(value)) {
   18595           0 :                         unsigned long long test_var;
   18596           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18597           0 :                         if (PyErr_Occurred() != NULL) {
   18598           0 :                                 return -1;
   18599             :                         }
   18600           0 :                         if (test_var > uint_max) {
   18601           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18602             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18603           0 :                                 return -1;
   18604             :                         }
   18605           0 :                         object->serial_number1 = test_var;
   18606             :                 } else {
   18607           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18608             :                           PyLong_Type.tp_name);
   18609           0 :                         return -1;
   18610             :                 }
   18611             :         }
   18612           0 :         return 0;
   18613             : }
   18614             : 
   18615           0 : static PyObject *py_netr_ChangeLogEntry_get_serial_number2(PyObject *obj, void *closure)
   18616             : {
   18617           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
   18618           0 :         PyObject *py_serial_number2;
   18619           0 :         py_serial_number2 = PyLong_FromUnsignedLongLong((uint32_t)(object->serial_number2));
   18620           0 :         return py_serial_number2;
   18621             : }
   18622             : 
   18623           0 : static int py_netr_ChangeLogEntry_set_serial_number2(PyObject *py_obj, PyObject *value, void *closure)
   18624             : {
   18625           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18626           0 :         if (value == NULL) {
   18627           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->serial_number2");
   18628           0 :                 return -1;
   18629             :         }
   18630             :         {
   18631           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number2));
   18632           0 :                 if (PyLong_Check(value)) {
   18633           0 :                         unsigned long long test_var;
   18634           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18635           0 :                         if (PyErr_Occurred() != NULL) {
   18636           0 :                                 return -1;
   18637             :                         }
   18638           0 :                         if (test_var > uint_max) {
   18639           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18640             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18641           0 :                                 return -1;
   18642             :                         }
   18643           0 :                         object->serial_number2 = test_var;
   18644             :                 } else {
   18645           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18646             :                           PyLong_Type.tp_name);
   18647           0 :                         return -1;
   18648             :                 }
   18649             :         }
   18650           0 :         return 0;
   18651             : }
   18652             : 
   18653           0 : static PyObject *py_netr_ChangeLogEntry_get_object_rid(PyObject *obj, void *closure)
   18654             : {
   18655           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
   18656           0 :         PyObject *py_object_rid;
   18657           0 :         py_object_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->object_rid));
   18658           0 :         return py_object_rid;
   18659             : }
   18660             : 
   18661           0 : static int py_netr_ChangeLogEntry_set_object_rid(PyObject *py_obj, PyObject *value, void *closure)
   18662             : {
   18663           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18664           0 :         if (value == NULL) {
   18665           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->object_rid");
   18666           0 :                 return -1;
   18667             :         }
   18668             :         {
   18669           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->object_rid));
   18670           0 :                 if (PyLong_Check(value)) {
   18671           0 :                         unsigned long long test_var;
   18672           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18673           0 :                         if (PyErr_Occurred() != NULL) {
   18674           0 :                                 return -1;
   18675             :                         }
   18676           0 :                         if (test_var > uint_max) {
   18677           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18678             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18679           0 :                                 return -1;
   18680             :                         }
   18681           0 :                         object->object_rid = test_var;
   18682             :                 } else {
   18683           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18684             :                           PyLong_Type.tp_name);
   18685           0 :                         return -1;
   18686             :                 }
   18687             :         }
   18688           0 :         return 0;
   18689             : }
   18690             : 
   18691           0 : static PyObject *py_netr_ChangeLogEntry_get_flags(PyObject *obj, void *closure)
   18692             : {
   18693           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
   18694           0 :         PyObject *py_flags;
   18695           0 :         py_flags = PyLong_FromLong((uint16_t)(object->flags));
   18696           0 :         return py_flags;
   18697             : }
   18698             : 
   18699           0 : static int py_netr_ChangeLogEntry_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   18700             : {
   18701           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18702           0 :         if (value == NULL) {
   18703           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
   18704           0 :                 return -1;
   18705             :         }
   18706             :         {
   18707           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   18708           0 :                 if (PyLong_Check(value)) {
   18709           0 :                         unsigned long long test_var;
   18710           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18711           0 :                         if (PyErr_Occurred() != NULL) {
   18712           0 :                                 return -1;
   18713             :                         }
   18714           0 :                         if (test_var > uint_max) {
   18715           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18716             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18717           0 :                                 return -1;
   18718             :                         }
   18719           0 :                         object->flags = test_var;
   18720             :                 } else {
   18721           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18722             :                           PyLong_Type.tp_name);
   18723           0 :                         return -1;
   18724             :                 }
   18725             :         }
   18726           0 :         return 0;
   18727             : }
   18728             : 
   18729           0 : static PyObject *py_netr_ChangeLogEntry_get_db_index(PyObject *obj, void *closure)
   18730             : {
   18731           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
   18732           0 :         PyObject *py_db_index;
   18733           0 :         py_db_index = PyLong_FromLong((uint16_t)(object->db_index));
   18734           0 :         return py_db_index;
   18735             : }
   18736             : 
   18737           0 : static int py_netr_ChangeLogEntry_set_db_index(PyObject *py_obj, PyObject *value, void *closure)
   18738             : {
   18739           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18740           0 :         if (value == NULL) {
   18741           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->db_index");
   18742           0 :                 return -1;
   18743             :         }
   18744             :         {
   18745           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->db_index));
   18746           0 :                 if (PyLong_Check(value)) {
   18747           0 :                         unsigned long long test_var;
   18748           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18749           0 :                         if (PyErr_Occurred() != NULL) {
   18750           0 :                                 return -1;
   18751             :                         }
   18752           0 :                         if (test_var > uint_max) {
   18753           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18754             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18755           0 :                                 return -1;
   18756             :                         }
   18757           0 :                         object->db_index = test_var;
   18758             :                 } else {
   18759           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18760             :                           PyLong_Type.tp_name);
   18761           0 :                         return -1;
   18762             :                 }
   18763             :         }
   18764           0 :         return 0;
   18765             : }
   18766             : 
   18767           0 : static PyObject *py_netr_ChangeLogEntry_get_delta_type(PyObject *obj, void *closure)
   18768             : {
   18769           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
   18770           0 :         PyObject *py_delta_type;
   18771           0 :         py_delta_type = PyLong_FromLong((uint16_t)(object->delta_type));
   18772           0 :         return py_delta_type;
   18773             : }
   18774             : 
   18775           0 : static int py_netr_ChangeLogEntry_set_delta_type(PyObject *py_obj, PyObject *value, void *closure)
   18776             : {
   18777           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18778           0 :         if (value == NULL) {
   18779           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_type");
   18780           0 :                 return -1;
   18781             :         }
   18782             :         {
   18783           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->delta_type));
   18784           0 :                 if (PyLong_Check(value)) {
   18785           0 :                         unsigned long long test_var;
   18786           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18787           0 :                         if (PyErr_Occurred() != NULL) {
   18788           0 :                                 return -1;
   18789             :                         }
   18790           0 :                         if (test_var > uint_max) {
   18791           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18792             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18793           0 :                                 return -1;
   18794             :                         }
   18795           0 :                         object->delta_type = test_var;
   18796             :                 } else {
   18797           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18798             :                           PyLong_Type.tp_name);
   18799           0 :                         return -1;
   18800             :                 }
   18801             :         }
   18802           0 :         return 0;
   18803             : }
   18804             : 
   18805           0 : static PyObject *py_netr_ChangeLogEntry_get_object(PyObject *obj, void *closure)
   18806             : {
   18807           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
   18808           0 :         PyObject *py_object;
   18809           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");
   18810           0 :         if (py_object == NULL) {
   18811           0 :                 return NULL;
   18812             :         }
   18813           0 :         return py_object;
   18814             : }
   18815             : 
   18816           0 : static int py_netr_ChangeLogEntry_set_object(PyObject *py_obj, PyObject *value, void *closure)
   18817             : {
   18818           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18819           0 :         if (value == NULL) {
   18820           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->object");
   18821           0 :                 return -1;
   18822             :         }
   18823             :         {
   18824           0 :                 union netr_ChangeLogObject *object_switch_0;
   18825           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");
   18826           0 :                 if (object_switch_0 == NULL) {
   18827           0 :                         return -1;
   18828             :                 }
   18829           0 :                 object->object = *object_switch_0;
   18830             :         }
   18831           0 :         return 0;
   18832             : }
   18833             : 
   18834             : static PyGetSetDef py_netr_ChangeLogEntry_getsetters[] = {
   18835             :         {
   18836             :                 .name = discard_const_p(char, "serial_number1"),
   18837             :                 .get = py_netr_ChangeLogEntry_get_serial_number1,
   18838             :                 .set = py_netr_ChangeLogEntry_set_serial_number1,
   18839             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18840             :         },
   18841             :         {
   18842             :                 .name = discard_const_p(char, "serial_number2"),
   18843             :                 .get = py_netr_ChangeLogEntry_get_serial_number2,
   18844             :                 .set = py_netr_ChangeLogEntry_set_serial_number2,
   18845             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18846             :         },
   18847             :         {
   18848             :                 .name = discard_const_p(char, "object_rid"),
   18849             :                 .get = py_netr_ChangeLogEntry_get_object_rid,
   18850             :                 .set = py_netr_ChangeLogEntry_set_object_rid,
   18851             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18852             :         },
   18853             :         {
   18854             :                 .name = discard_const_p(char, "flags"),
   18855             :                 .get = py_netr_ChangeLogEntry_get_flags,
   18856             :                 .set = py_netr_ChangeLogEntry_set_flags,
   18857             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogFlags")
   18858             :         },
   18859             :         {
   18860             :                 .name = discard_const_p(char, "db_index"),
   18861             :                 .get = py_netr_ChangeLogEntry_get_db_index,
   18862             :                 .set = py_netr_ChangeLogEntry_set_db_index,
   18863             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID8Bit")
   18864             :         },
   18865             :         {
   18866             :                 .name = discard_const_p(char, "delta_type"),
   18867             :                 .get = py_netr_ChangeLogEntry_get_delta_type,
   18868             :                 .set = py_netr_ChangeLogEntry_set_delta_type,
   18869             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DeltaEnum8Bit")
   18870             :         },
   18871             :         {
   18872             :                 .name = discard_const_p(char, "object"),
   18873             :                 .get = py_netr_ChangeLogEntry_get_object,
   18874             :                 .set = py_netr_ChangeLogEntry_set_object,
   18875             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogObject")
   18876             :         },
   18877             :         { .name = NULL }
   18878             : };
   18879             : 
   18880           0 : static PyObject *py_netr_ChangeLogEntry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18881             : {
   18882           0 :         return pytalloc_new(struct netr_ChangeLogEntry, type);
   18883             : }
   18884             : 
   18885           0 : static PyObject *py_netr_ChangeLogEntry_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   18886             : {
   18887           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18888           0 :         PyObject *ret = NULL;
   18889           0 :         DATA_BLOB blob;
   18890           0 :         enum ndr_err_code err;
   18891           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   18892           0 :         if (tmp_ctx == NULL) {
   18893           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   18894           0 :                 return NULL;
   18895             :         }
   18896           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
   18897           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18898           0 :                 TALLOC_FREE(tmp_ctx);
   18899           0 :                 PyErr_SetNdrError(err);
   18900           0 :                 return NULL;
   18901             :         }
   18902             : 
   18903           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   18904           0 :         TALLOC_FREE(tmp_ctx);
   18905           0 :         return ret;
   18906             : }
   18907             : 
   18908           0 : static PyObject *py_netr_ChangeLogEntry_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18909             : {
   18910           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18911           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   18912           0 :         Py_ssize_t blob_length = 0;
   18913           0 :         enum ndr_err_code err;
   18914           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   18915           0 :         PyObject *allow_remaining_obj = NULL;
   18916           0 :         bool allow_remaining = false;
   18917             : 
   18918           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   18919             :                 discard_const_p(char *, kwnames),
   18920             :                 &blob.data, &blob_length,
   18921             :                 &allow_remaining_obj)) {
   18922           0 :                 return NULL;
   18923             :         }
   18924           0 :         blob.length = blob_length;
   18925             : 
   18926           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   18927           0 :                 allow_remaining = true;
   18928             :         }
   18929             : 
   18930           0 :         if (allow_remaining) {
   18931           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_ChangeLogEntry);
   18932             :         } else {
   18933           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_ChangeLogEntry);
   18934             :         }
   18935           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18936           0 :                 PyErr_SetNdrError(err);
   18937           0 :                 return NULL;
   18938             :         }
   18939             : 
   18940           0 :         Py_RETURN_NONE;
   18941             : }
   18942             : 
   18943           0 : static PyObject *py_netr_ChangeLogEntry_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   18944             : {
   18945           0 :         struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
   18946           0 :         PyObject *ret;
   18947           0 :         char *retstr;
   18948             : 
   18949           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_ChangeLogEntry, "netr_ChangeLogEntry", object);
   18950           0 :         ret = PyUnicode_FromString(retstr);
   18951           0 :         talloc_free(retstr);
   18952             : 
   18953           0 :         return ret;
   18954             : }
   18955             : 
   18956             : static PyMethodDef py_netr_ChangeLogEntry_methods[] = {
   18957             :         { "__ndr_pack__", (PyCFunction)py_netr_ChangeLogEntry_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   18958             :         { "__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" },
   18959             :         { "__ndr_print__", (PyCFunction)py_netr_ChangeLogEntry_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   18960             :         { NULL, NULL, 0, NULL }
   18961             : };
   18962             : 
   18963             : 
   18964             : static PyTypeObject netr_ChangeLogEntry_Type = {
   18965             :         PyVarObject_HEAD_INIT(NULL, 0)
   18966             :         .tp_name = "netlogon.netr_ChangeLogEntry",
   18967             :         .tp_getset = py_netr_ChangeLogEntry_getsetters,
   18968             :         .tp_methods = py_netr_ChangeLogEntry_methods,
   18969             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18970             :         .tp_new = py_netr_ChangeLogEntry_new,
   18971             : };
   18972             : 
   18973             : 
   18974           0 : static PyObject *py_netr_Blob_get_length(PyObject *obj, void *closure)
   18975             : {
   18976           0 :         struct netr_Blob *object = pytalloc_get_ptr(obj);
   18977           0 :         PyObject *py_length;
   18978           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
   18979           0 :         return py_length;
   18980             : }
   18981             : 
   18982           0 : static int py_netr_Blob_set_length(PyObject *py_obj, PyObject *value, void *closure)
   18983             : {
   18984           0 :         struct netr_Blob *object = pytalloc_get_ptr(py_obj);
   18985           0 :         if (value == NULL) {
   18986           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
   18987           0 :                 return -1;
   18988             :         }
   18989             :         {
   18990           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   18991           0 :                 if (PyLong_Check(value)) {
   18992           0 :                         unsigned long long test_var;
   18993           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18994           0 :                         if (PyErr_Occurred() != NULL) {
   18995           0 :                                 return -1;
   18996             :                         }
   18997           0 :                         if (test_var > uint_max) {
   18998           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18999             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19000           0 :                                 return -1;
   19001             :                         }
   19002           0 :                         object->length = test_var;
   19003             :                 } else {
   19004           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19005             :                           PyLong_Type.tp_name);
   19006           0 :                         return -1;
   19007             :                 }
   19008             :         }
   19009           0 :         return 0;
   19010             : }
   19011             : 
   19012           0 : static PyObject *py_netr_Blob_get_data(PyObject *obj, void *closure)
   19013             : {
   19014           0 :         struct netr_Blob *object = pytalloc_get_ptr(obj);
   19015           0 :         PyObject *py_data;
   19016           0 :         if (object->data == NULL) {
   19017           0 :                 Py_RETURN_NONE;
   19018             :         }
   19019           0 :         if (object->data == NULL) {
   19020           0 :                 py_data = Py_None;
   19021           0 :                 Py_INCREF(py_data);
   19022             :         } else {
   19023           0 :                 py_data = PyList_New(object->length);
   19024           0 :                 if (py_data == NULL) {
   19025           0 :                         return NULL;
   19026             :                 }
   19027             :                 {
   19028             :                         int data_cntr_1;
   19029           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
   19030           0 :                                 PyObject *py_data_1;
   19031           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_1]));
   19032           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
   19033             :                         }
   19034             :                 }
   19035             :         }
   19036           0 :         return py_data;
   19037             : }
   19038             : 
   19039           0 : static int py_netr_Blob_set_data(PyObject *py_obj, PyObject *value, void *closure)
   19040             : {
   19041           0 :         struct netr_Blob *object = pytalloc_get_ptr(py_obj);
   19042           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
   19043           0 :         if (value == NULL) {
   19044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
   19045           0 :                 return -1;
   19046             :         }
   19047           0 :         if (value == Py_None) {
   19048           0 :                 object->data = NULL;
   19049             :         } else {
   19050           0 :                 object->data = NULL;
   19051           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   19052             :                 {
   19053           0 :                         int data_cntr_1;
   19054           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
   19055           0 :                         if (!object->data) { return -1; }
   19056           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
   19057           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
   19058           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
   19059           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
   19060           0 :                                         return -1;
   19061             :                                 }
   19062             :                                 {
   19063           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
   19064           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
   19065           0 :                                                 unsigned long long test_var;
   19066           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
   19067           0 :                                                 if (PyErr_Occurred() != NULL) {
   19068           0 :                                                         return -1;
   19069             :                                                 }
   19070           0 :                                                 if (test_var > uint_max) {
   19071           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19072             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   19073           0 :                                                         return -1;
   19074             :                                                 }
   19075           0 :                                                 (object->data)[data_cntr_1] = test_var;
   19076             :                                         } else {
   19077           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   19078             :                                                   PyLong_Type.tp_name);
   19079           0 :                                                 return -1;
   19080             :                                         }
   19081             :                                 }
   19082             :                         }
   19083             :                 }
   19084             :         }
   19085           0 :         return 0;
   19086             : }
   19087             : 
   19088             : static PyGetSetDef py_netr_Blob_getsetters[] = {
   19089             :         {
   19090             :                 .name = discard_const_p(char, "length"),
   19091             :                 .get = py_netr_Blob_get_length,
   19092             :                 .set = py_netr_Blob_set_length,
   19093             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19094             :         },
   19095             :         {
   19096             :                 .name = discard_const_p(char, "data"),
   19097             :                 .get = py_netr_Blob_get_data,
   19098             :                 .set = py_netr_Blob_set_data,
   19099             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   19100             :         },
   19101             :         { .name = NULL }
   19102             : };
   19103             : 
   19104           0 : static PyObject *py_netr_Blob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19105             : {
   19106           0 :         return pytalloc_new(struct netr_Blob, type);
   19107             : }
   19108             : 
   19109             : 
   19110             : static PyTypeObject netr_Blob_Type = {
   19111             :         PyVarObject_HEAD_INIT(NULL, 0)
   19112             :         .tp_name = "netlogon.netr_Blob",
   19113             :         .tp_getset = py_netr_Blob_getsetters,
   19114             :         .tp_methods = NULL,
   19115             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19116             :         .tp_new = py_netr_Blob_new,
   19117             : };
   19118             : 
   19119             : 
   19120         228 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_unc(PyObject *obj, void *closure)
   19121             : {
   19122         228 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
   19123           4 :         PyObject *py_dc_unc;
   19124         228 :         if (object->dc_unc == NULL) {
   19125           0 :                 Py_RETURN_NONE;
   19126             :         }
   19127         228 :         if (object->dc_unc == NULL) {
   19128           0 :                 py_dc_unc = Py_None;
   19129           0 :                 Py_INCREF(py_dc_unc);
   19130             :         } else {
   19131         228 :                 if (object->dc_unc == NULL) {
   19132           0 :                         py_dc_unc = Py_None;
   19133           0 :                         Py_INCREF(py_dc_unc);
   19134             :                 } else {
   19135         228 :                         py_dc_unc = PyUnicode_Decode(object->dc_unc, strlen(object->dc_unc), "utf-8", "ignore");
   19136             :                 }
   19137             :         }
   19138         228 :         return py_dc_unc;
   19139             : }
   19140             : 
   19141           0 : static int py_netr_DsRGetDCNameInfo_set_dc_unc(PyObject *py_obj, PyObject *value, void *closure)
   19142             : {
   19143           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19144           0 :         if (value == NULL) {
   19145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_unc");
   19146           0 :                 return -1;
   19147             :         }
   19148           0 :         if (value == Py_None) {
   19149           0 :                 object->dc_unc = NULL;
   19150             :         } else {
   19151           0 :                 object->dc_unc = NULL;
   19152             :                 {
   19153           0 :                         const char *test_str;
   19154           0 :                         const char *talloc_str;
   19155           0 :                         PyObject *unicode = NULL;
   19156           0 :                         if (PyUnicode_Check(value)) {
   19157           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19158           0 :                                 if (unicode == NULL) {
   19159           0 :                                         return -1;
   19160             :                                 }
   19161           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19162           0 :                         } else if (PyBytes_Check(value)) {
   19163           0 :                                 test_str = PyBytes_AS_STRING(value);
   19164             :                         } else {
   19165           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19166           0 :                                 return -1;
   19167             :                         }
   19168           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19169           0 :                         if (unicode != NULL) {
   19170           0 :                                 Py_DECREF(unicode);
   19171             :                         }
   19172           0 :                         if (talloc_str == NULL) {
   19173           0 :                                 PyErr_NoMemory();
   19174           0 :                                 return -1;
   19175             :                         }
   19176           0 :                         object->dc_unc = talloc_str;
   19177             :                 }
   19178             :         }
   19179           0 :         return 0;
   19180             : }
   19181             : 
   19182          60 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_address(PyObject *obj, void *closure)
   19183             : {
   19184          60 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
   19185           0 :         PyObject *py_dc_address;
   19186          60 :         if (object->dc_address == NULL) {
   19187           0 :                 Py_RETURN_NONE;
   19188             :         }
   19189          60 :         if (object->dc_address == NULL) {
   19190           0 :                 py_dc_address = Py_None;
   19191           0 :                 Py_INCREF(py_dc_address);
   19192             :         } else {
   19193          60 :                 if (object->dc_address == NULL) {
   19194           0 :                         py_dc_address = Py_None;
   19195           0 :                         Py_INCREF(py_dc_address);
   19196             :                 } else {
   19197          60 :                         py_dc_address = PyUnicode_Decode(object->dc_address, strlen(object->dc_address), "utf-8", "ignore");
   19198             :                 }
   19199             :         }
   19200          60 :         return py_dc_address;
   19201             : }
   19202             : 
   19203           0 : static int py_netr_DsRGetDCNameInfo_set_dc_address(PyObject *py_obj, PyObject *value, void *closure)
   19204             : {
   19205           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19206           0 :         if (value == NULL) {
   19207           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_address");
   19208           0 :                 return -1;
   19209             :         }
   19210           0 :         if (value == Py_None) {
   19211           0 :                 object->dc_address = NULL;
   19212             :         } else {
   19213           0 :                 object->dc_address = NULL;
   19214             :                 {
   19215           0 :                         const char *test_str;
   19216           0 :                         const char *talloc_str;
   19217           0 :                         PyObject *unicode = NULL;
   19218           0 :                         if (PyUnicode_Check(value)) {
   19219           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19220           0 :                                 if (unicode == NULL) {
   19221           0 :                                         return -1;
   19222             :                                 }
   19223           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19224           0 :                         } else if (PyBytes_Check(value)) {
   19225           0 :                                 test_str = PyBytes_AS_STRING(value);
   19226             :                         } else {
   19227           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19228           0 :                                 return -1;
   19229             :                         }
   19230           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19231           0 :                         if (unicode != NULL) {
   19232           0 :                                 Py_DECREF(unicode);
   19233             :                         }
   19234           0 :                         if (talloc_str == NULL) {
   19235           0 :                                 PyErr_NoMemory();
   19236           0 :                                 return -1;
   19237             :                         }
   19238           0 :                         object->dc_address = talloc_str;
   19239             :                 }
   19240             :         }
   19241           0 :         return 0;
   19242             : }
   19243             : 
   19244           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_address_type(PyObject *obj, void *closure)
   19245             : {
   19246           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
   19247           0 :         PyObject *py_dc_address_type;
   19248           0 :         py_dc_address_type = PyLong_FromUnsignedLongLong((uint32_t)(object->dc_address_type));
   19249           0 :         return py_dc_address_type;
   19250             : }
   19251             : 
   19252           0 : static int py_netr_DsRGetDCNameInfo_set_dc_address_type(PyObject *py_obj, PyObject *value, void *closure)
   19253             : {
   19254           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19255           0 :         if (value == NULL) {
   19256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_address_type");
   19257           0 :                 return -1;
   19258             :         }
   19259             :         {
   19260           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dc_address_type));
   19261           0 :                 if (PyLong_Check(value)) {
   19262           0 :                         unsigned long long test_var;
   19263           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19264           0 :                         if (PyErr_Occurred() != NULL) {
   19265           0 :                                 return -1;
   19266             :                         }
   19267           0 :                         if (test_var > uint_max) {
   19268           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19269             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19270           0 :                                 return -1;
   19271             :                         }
   19272           0 :                         object->dc_address_type = test_var;
   19273             :                 } else {
   19274           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19275             :                           PyLong_Type.tp_name);
   19276           0 :                         return -1;
   19277             :                 }
   19278             :         }
   19279           0 :         return 0;
   19280             : }
   19281             : 
   19282           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_domain_guid(PyObject *obj, void *closure)
   19283             : {
   19284           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
   19285           0 :         PyObject *py_domain_guid;
   19286           0 :         py_domain_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->domain_guid);
   19287           0 :         return py_domain_guid;
   19288             : }
   19289             : 
   19290           0 : static int py_netr_DsRGetDCNameInfo_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   19291             : {
   19292           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19293           0 :         if (value == NULL) {
   19294           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_guid");
   19295           0 :                 return -1;
   19296             :         }
   19297           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   19298           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   19299           0 :                 PyErr_NoMemory();
   19300           0 :                 return -1;
   19301             :         }
   19302           0 :         object->domain_guid = *(struct GUID *)pytalloc_get_ptr(value);
   19303           0 :         return 0;
   19304             : }
   19305             : 
   19306         123 : static PyObject *py_netr_DsRGetDCNameInfo_get_domain_name(PyObject *obj, void *closure)
   19307             : {
   19308         123 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
   19309           2 :         PyObject *py_domain_name;
   19310         123 :         if (object->domain_name == NULL) {
   19311           0 :                 Py_RETURN_NONE;
   19312             :         }
   19313         123 :         if (object->domain_name == NULL) {
   19314           0 :                 py_domain_name = Py_None;
   19315           0 :                 Py_INCREF(py_domain_name);
   19316             :         } else {
   19317         123 :                 if (object->domain_name == NULL) {
   19318           0 :                         py_domain_name = Py_None;
   19319           0 :                         Py_INCREF(py_domain_name);
   19320             :                 } else {
   19321         123 :                         py_domain_name = PyUnicode_Decode(object->domain_name, strlen(object->domain_name), "utf-8", "ignore");
   19322             :                 }
   19323             :         }
   19324         123 :         return py_domain_name;
   19325             : }
   19326             : 
   19327           0 : static int py_netr_DsRGetDCNameInfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   19328             : {
   19329           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19330           0 :         if (value == NULL) {
   19331           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_name");
   19332           0 :                 return -1;
   19333             :         }
   19334           0 :         if (value == Py_None) {
   19335           0 :                 object->domain_name = NULL;
   19336             :         } else {
   19337           0 :                 object->domain_name = NULL;
   19338             :                 {
   19339           0 :                         const char *test_str;
   19340           0 :                         const char *talloc_str;
   19341           0 :                         PyObject *unicode = NULL;
   19342           0 :                         if (PyUnicode_Check(value)) {
   19343           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19344           0 :                                 if (unicode == NULL) {
   19345           0 :                                         return -1;
   19346             :                                 }
   19347           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19348           0 :                         } else if (PyBytes_Check(value)) {
   19349           0 :                                 test_str = PyBytes_AS_STRING(value);
   19350             :                         } else {
   19351           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19352           0 :                                 return -1;
   19353             :                         }
   19354           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19355           0 :                         if (unicode != NULL) {
   19356           0 :                                 Py_DECREF(unicode);
   19357             :                         }
   19358           0 :                         if (talloc_str == NULL) {
   19359           0 :                                 PyErr_NoMemory();
   19360           0 :                                 return -1;
   19361             :                         }
   19362           0 :                         object->domain_name = talloc_str;
   19363             :                 }
   19364             :         }
   19365           0 :         return 0;
   19366             : }
   19367             : 
   19368          81 : static PyObject *py_netr_DsRGetDCNameInfo_get_forest_name(PyObject *obj, void *closure)
   19369             : {
   19370          81 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
   19371           2 :         PyObject *py_forest_name;
   19372          81 :         if (object->forest_name == NULL) {
   19373           0 :                 Py_RETURN_NONE;
   19374             :         }
   19375          81 :         if (object->forest_name == NULL) {
   19376           0 :                 py_forest_name = Py_None;
   19377           0 :                 Py_INCREF(py_forest_name);
   19378             :         } else {
   19379          81 :                 if (object->forest_name == NULL) {
   19380           0 :                         py_forest_name = Py_None;
   19381           0 :                         Py_INCREF(py_forest_name);
   19382             :                 } else {
   19383          81 :                         py_forest_name = PyUnicode_Decode(object->forest_name, strlen(object->forest_name), "utf-8", "ignore");
   19384             :                 }
   19385             :         }
   19386          81 :         return py_forest_name;
   19387             : }
   19388             : 
   19389           0 : static int py_netr_DsRGetDCNameInfo_set_forest_name(PyObject *py_obj, PyObject *value, void *closure)
   19390             : {
   19391           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19392           0 :         if (value == NULL) {
   19393           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->forest_name");
   19394           0 :                 return -1;
   19395             :         }
   19396           0 :         if (value == Py_None) {
   19397           0 :                 object->forest_name = NULL;
   19398             :         } else {
   19399           0 :                 object->forest_name = NULL;
   19400             :                 {
   19401           0 :                         const char *test_str;
   19402           0 :                         const char *talloc_str;
   19403           0 :                         PyObject *unicode = NULL;
   19404           0 :                         if (PyUnicode_Check(value)) {
   19405           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19406           0 :                                 if (unicode == NULL) {
   19407           0 :                                         return -1;
   19408             :                                 }
   19409           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19410           0 :                         } else if (PyBytes_Check(value)) {
   19411           0 :                                 test_str = PyBytes_AS_STRING(value);
   19412             :                         } else {
   19413           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19414           0 :                                 return -1;
   19415             :                         }
   19416           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19417           0 :                         if (unicode != NULL) {
   19418           0 :                                 Py_DECREF(unicode);
   19419             :                         }
   19420           0 :                         if (talloc_str == NULL) {
   19421           0 :                                 PyErr_NoMemory();
   19422           0 :                                 return -1;
   19423             :                         }
   19424           0 :                         object->forest_name = talloc_str;
   19425             :                 }
   19426             :         }
   19427           0 :         return 0;
   19428             : }
   19429             : 
   19430           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_flags(PyObject *obj, void *closure)
   19431             : {
   19432           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
   19433           0 :         PyObject *py_dc_flags;
   19434           0 :         py_dc_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->dc_flags));
   19435           0 :         return py_dc_flags;
   19436             : }
   19437             : 
   19438           0 : static int py_netr_DsRGetDCNameInfo_set_dc_flags(PyObject *py_obj, PyObject *value, void *closure)
   19439             : {
   19440           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19441           0 :         if (value == NULL) {
   19442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_flags");
   19443           0 :                 return -1;
   19444             :         }
   19445             :         {
   19446           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dc_flags));
   19447           0 :                 if (PyLong_Check(value)) {
   19448           0 :                         unsigned long long test_var;
   19449           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19450           0 :                         if (PyErr_Occurred() != NULL) {
   19451           0 :                                 return -1;
   19452             :                         }
   19453           0 :                         if (test_var > uint_max) {
   19454           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19455             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19456           0 :                                 return -1;
   19457             :                         }
   19458           0 :                         object->dc_flags = test_var;
   19459             :                 } else {
   19460           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19461             :                           PyLong_Type.tp_name);
   19462           0 :                         return -1;
   19463             :                 }
   19464             :         }
   19465           0 :         return 0;
   19466             : }
   19467             : 
   19468          16 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_site_name(PyObject *obj, void *closure)
   19469             : {
   19470          16 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
   19471           0 :         PyObject *py_dc_site_name;
   19472          16 :         if (object->dc_site_name == NULL) {
   19473           0 :                 Py_RETURN_NONE;
   19474             :         }
   19475          16 :         if (object->dc_site_name == NULL) {
   19476           0 :                 py_dc_site_name = Py_None;
   19477           0 :                 Py_INCREF(py_dc_site_name);
   19478             :         } else {
   19479          16 :                 if (object->dc_site_name == NULL) {
   19480           0 :                         py_dc_site_name = Py_None;
   19481           0 :                         Py_INCREF(py_dc_site_name);
   19482             :                 } else {
   19483          16 :                         py_dc_site_name = PyUnicode_Decode(object->dc_site_name, strlen(object->dc_site_name), "utf-8", "ignore");
   19484             :                 }
   19485             :         }
   19486          16 :         return py_dc_site_name;
   19487             : }
   19488             : 
   19489           0 : static int py_netr_DsRGetDCNameInfo_set_dc_site_name(PyObject *py_obj, PyObject *value, void *closure)
   19490             : {
   19491           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19492           0 :         if (value == NULL) {
   19493           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_site_name");
   19494           0 :                 return -1;
   19495             :         }
   19496           0 :         if (value == Py_None) {
   19497           0 :                 object->dc_site_name = NULL;
   19498             :         } else {
   19499           0 :                 object->dc_site_name = NULL;
   19500             :                 {
   19501           0 :                         const char *test_str;
   19502           0 :                         const char *talloc_str;
   19503           0 :                         PyObject *unicode = NULL;
   19504           0 :                         if (PyUnicode_Check(value)) {
   19505           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19506           0 :                                 if (unicode == NULL) {
   19507           0 :                                         return -1;
   19508             :                                 }
   19509           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19510           0 :                         } else if (PyBytes_Check(value)) {
   19511           0 :                                 test_str = PyBytes_AS_STRING(value);
   19512             :                         } else {
   19513           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19514           0 :                                 return -1;
   19515             :                         }
   19516           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19517           0 :                         if (unicode != NULL) {
   19518           0 :                                 Py_DECREF(unicode);
   19519             :                         }
   19520           0 :                         if (talloc_str == NULL) {
   19521           0 :                                 PyErr_NoMemory();
   19522           0 :                                 return -1;
   19523             :                         }
   19524           0 :                         object->dc_site_name = talloc_str;
   19525             :                 }
   19526             :         }
   19527           0 :         return 0;
   19528             : }
   19529             : 
   19530           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_client_site_name(PyObject *obj, void *closure)
   19531             : {
   19532           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
   19533           0 :         PyObject *py_client_site_name;
   19534           0 :         if (object->client_site_name == NULL) {
   19535           0 :                 Py_RETURN_NONE;
   19536             :         }
   19537           0 :         if (object->client_site_name == NULL) {
   19538           0 :                 py_client_site_name = Py_None;
   19539           0 :                 Py_INCREF(py_client_site_name);
   19540             :         } else {
   19541           0 :                 if (object->client_site_name == NULL) {
   19542           0 :                         py_client_site_name = Py_None;
   19543           0 :                         Py_INCREF(py_client_site_name);
   19544             :                 } else {
   19545           0 :                         py_client_site_name = PyUnicode_Decode(object->client_site_name, strlen(object->client_site_name), "utf-8", "ignore");
   19546             :                 }
   19547             :         }
   19548           0 :         return py_client_site_name;
   19549             : }
   19550             : 
   19551           0 : static int py_netr_DsRGetDCNameInfo_set_client_site_name(PyObject *py_obj, PyObject *value, void *closure)
   19552             : {
   19553           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19554           0 :         if (value == NULL) {
   19555           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client_site_name");
   19556           0 :                 return -1;
   19557             :         }
   19558           0 :         if (value == Py_None) {
   19559           0 :                 object->client_site_name = NULL;
   19560             :         } else {
   19561           0 :                 object->client_site_name = NULL;
   19562             :                 {
   19563           0 :                         const char *test_str;
   19564           0 :                         const char *talloc_str;
   19565           0 :                         PyObject *unicode = NULL;
   19566           0 :                         if (PyUnicode_Check(value)) {
   19567           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19568           0 :                                 if (unicode == NULL) {
   19569           0 :                                         return -1;
   19570             :                                 }
   19571           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19572           0 :                         } else if (PyBytes_Check(value)) {
   19573           0 :                                 test_str = PyBytes_AS_STRING(value);
   19574             :                         } else {
   19575           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19576           0 :                                 return -1;
   19577             :                         }
   19578           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19579           0 :                         if (unicode != NULL) {
   19580           0 :                                 Py_DECREF(unicode);
   19581             :                         }
   19582           0 :                         if (talloc_str == NULL) {
   19583           0 :                                 PyErr_NoMemory();
   19584           0 :                                 return -1;
   19585             :                         }
   19586           0 :                         object->client_site_name = talloc_str;
   19587             :                 }
   19588             :         }
   19589           0 :         return 0;
   19590             : }
   19591             : 
   19592             : static PyGetSetDef py_netr_DsRGetDCNameInfo_getsetters[] = {
   19593             :         {
   19594             :                 .name = discard_const_p(char, "dc_unc"),
   19595             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_unc,
   19596             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_unc,
   19597             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19598             :         },
   19599             :         {
   19600             :                 .name = discard_const_p(char, "dc_address"),
   19601             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_address,
   19602             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_address,
   19603             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19604             :         },
   19605             :         {
   19606             :                 .name = discard_const_p(char, "dc_address_type"),
   19607             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_address_type,
   19608             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_address_type,
   19609             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo_AddressType")
   19610             :         },
   19611             :         {
   19612             :                 .name = discard_const_p(char, "domain_guid"),
   19613             :                 .get = py_netr_DsRGetDCNameInfo_get_domain_guid,
   19614             :                 .set = py_netr_DsRGetDCNameInfo_set_domain_guid,
   19615             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   19616             :         },
   19617             :         {
   19618             :                 .name = discard_const_p(char, "domain_name"),
   19619             :                 .get = py_netr_DsRGetDCNameInfo_get_domain_name,
   19620             :                 .set = py_netr_DsRGetDCNameInfo_set_domain_name,
   19621             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19622             :         },
   19623             :         {
   19624             :                 .name = discard_const_p(char, "forest_name"),
   19625             :                 .get = py_netr_DsRGetDCNameInfo_get_forest_name,
   19626             :                 .set = py_netr_DsRGetDCNameInfo_set_forest_name,
   19627             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19628             :         },
   19629             :         {
   19630             :                 .name = discard_const_p(char, "dc_flags"),
   19631             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_flags,
   19632             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_flags,
   19633             :                 .doc = discard_const_p(char, "PIDL-generated element of base type nbt_server_type")
   19634             :         },
   19635             :         {
   19636             :                 .name = discard_const_p(char, "dc_site_name"),
   19637             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_site_name,
   19638             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_site_name,
   19639             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19640             :         },
   19641             :         {
   19642             :                 .name = discard_const_p(char, "client_site_name"),
   19643             :                 .get = py_netr_DsRGetDCNameInfo_get_client_site_name,
   19644             :                 .set = py_netr_DsRGetDCNameInfo_set_client_site_name,
   19645             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19646             :         },
   19647             :         { .name = NULL }
   19648             : };
   19649             : 
   19650           0 : static PyObject *py_netr_DsRGetDCNameInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19651             : {
   19652           0 :         return pytalloc_new(struct netr_DsRGetDCNameInfo, type);
   19653             : }
   19654             : 
   19655           0 : static PyObject *py_netr_DsRGetDCNameInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   19656             : {
   19657           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19658           0 :         PyObject *ret = NULL;
   19659           0 :         DATA_BLOB blob;
   19660           0 :         enum ndr_err_code err;
   19661           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   19662           0 :         if (tmp_ctx == NULL) {
   19663           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19664           0 :                 return NULL;
   19665             :         }
   19666           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCNameInfo);
   19667           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19668           0 :                 TALLOC_FREE(tmp_ctx);
   19669           0 :                 PyErr_SetNdrError(err);
   19670           0 :                 return NULL;
   19671             :         }
   19672             : 
   19673           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   19674           0 :         TALLOC_FREE(tmp_ctx);
   19675           0 :         return ret;
   19676             : }
   19677             : 
   19678           0 : static PyObject *py_netr_DsRGetDCNameInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19679             : {
   19680           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19681           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   19682           0 :         Py_ssize_t blob_length = 0;
   19683           0 :         enum ndr_err_code err;
   19684           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   19685           0 :         PyObject *allow_remaining_obj = NULL;
   19686           0 :         bool allow_remaining = false;
   19687             : 
   19688           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   19689             :                 discard_const_p(char *, kwnames),
   19690             :                 &blob.data, &blob_length,
   19691             :                 &allow_remaining_obj)) {
   19692           0 :                 return NULL;
   19693             :         }
   19694           0 :         blob.length = blob_length;
   19695             : 
   19696           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19697           0 :                 allow_remaining = true;
   19698             :         }
   19699             : 
   19700           0 :         if (allow_remaining) {
   19701           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameInfo);
   19702             :         } else {
   19703           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameInfo);
   19704             :         }
   19705           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19706           0 :                 PyErr_SetNdrError(err);
   19707           0 :                 return NULL;
   19708             :         }
   19709             : 
   19710           0 :         Py_RETURN_NONE;
   19711             : }
   19712             : 
   19713           0 : static PyObject *py_netr_DsRGetDCNameInfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19714             : {
   19715           0 :         struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
   19716           0 :         PyObject *ret;
   19717           0 :         char *retstr;
   19718             : 
   19719           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DsRGetDCNameInfo, "netr_DsRGetDCNameInfo", object);
   19720           0 :         ret = PyUnicode_FromString(retstr);
   19721           0 :         talloc_free(retstr);
   19722             : 
   19723           0 :         return ret;
   19724             : }
   19725             : 
   19726             : static PyMethodDef py_netr_DsRGetDCNameInfo_methods[] = {
   19727             :         { "__ndr_pack__", (PyCFunction)py_netr_DsRGetDCNameInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   19728             :         { "__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" },
   19729             :         { "__ndr_print__", (PyCFunction)py_netr_DsRGetDCNameInfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   19730             :         { NULL, NULL, 0, NULL }
   19731             : };
   19732             : 
   19733             : 
   19734             : static PyTypeObject netr_DsRGetDCNameInfo_Type = {
   19735             :         PyVarObject_HEAD_INIT(NULL, 0)
   19736             :         .tp_name = "netlogon.netr_DsRGetDCNameInfo",
   19737             :         .tp_getset = py_netr_DsRGetDCNameInfo_getsetters,
   19738             :         .tp_methods = py_netr_DsRGetDCNameInfo_methods,
   19739             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19740             :         .tp_new = py_netr_DsRGetDCNameInfo_new,
   19741             : };
   19742             : 
   19743           0 : static PyObject *py_import_netr_Capabilities(TALLOC_CTX *mem_ctx, int level, union netr_Capabilities *in)
   19744             : {
   19745           0 :         PyObject *ret;
   19746             : 
   19747           0 :         switch (level) {
   19748           0 :                 case 1:
   19749           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->server_capabilities));
   19750           0 :                         return ret;
   19751             : 
   19752           0 :                 case 2:
   19753           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->server_capabilities));
   19754           0 :                         return ret;
   19755             : 
   19756             :         }
   19757           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   19758           0 :         return NULL;
   19759             : }
   19760             : 
   19761           0 : static union netr_Capabilities *py_export_netr_Capabilities(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   19762             : {
   19763           0 :         union netr_Capabilities *ret = talloc_zero(mem_ctx, union netr_Capabilities);
   19764           0 :         switch (level) {
   19765           0 :                 case 1:
   19766           0 :                         if (in == NULL) {
   19767           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->server_capabilities");
   19768           0 :                                 talloc_free(ret); return NULL;
   19769             :                         }
   19770             :                         {
   19771           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->server_capabilities));
   19772           0 :                                 if (PyLong_Check(in)) {
   19773           0 :                                         unsigned long long test_var;
   19774           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   19775           0 :                                         if (PyErr_Occurred() != NULL) {
   19776           0 :                                                 talloc_free(ret); return NULL;
   19777             :                                         }
   19778           0 :                                         if (test_var > uint_max) {
   19779           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19780             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   19781           0 :                                                 talloc_free(ret); return NULL;
   19782             :                                         }
   19783           0 :                                         ret->server_capabilities = test_var;
   19784             :                                 } else {
   19785           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19786             :                                           PyLong_Type.tp_name);
   19787           0 :                                         talloc_free(ret); return NULL;
   19788             :                                 }
   19789             :                         }
   19790           0 :                         break;
   19791             : 
   19792           0 :                 case 2:
   19793           0 :                         if (in == NULL) {
   19794           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->server_capabilities");
   19795           0 :                                 talloc_free(ret); return NULL;
   19796             :                         }
   19797             :                         {
   19798           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->server_capabilities));
   19799           0 :                                 if (PyLong_Check(in)) {
   19800           0 :                                         unsigned long long test_var;
   19801           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   19802           0 :                                         if (PyErr_Occurred() != NULL) {
   19803           0 :                                                 talloc_free(ret); return NULL;
   19804             :                                         }
   19805           0 :                                         if (test_var > uint_max) {
   19806           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19807             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   19808           0 :                                                 talloc_free(ret); return NULL;
   19809             :                                         }
   19810           0 :                                         ret->server_capabilities = test_var;
   19811             :                                 } else {
   19812           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19813             :                                           PyLong_Type.tp_name);
   19814           0 :                                         talloc_free(ret); return NULL;
   19815             :                                 }
   19816             :                         }
   19817           0 :                         break;
   19818             : 
   19819           0 :                 default:
   19820           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   19821           0 :                         talloc_free(ret);
   19822           0 :                         ret = NULL;
   19823             :         }
   19824             : 
   19825           0 :         return ret;
   19826             : }
   19827             : 
   19828           0 : static PyObject *py_netr_Capabilities_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19829             : {
   19830           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   19831           0 :         PyObject *mem_ctx_obj = NULL;
   19832           0 :         TALLOC_CTX *mem_ctx = NULL;
   19833           0 :         int level = 0;
   19834           0 :         PyObject *in_obj = NULL;
   19835           0 :         union netr_Capabilities *in = NULL;
   19836             : 
   19837           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   19838             :                 discard_const_p(char *, kwnames),
   19839             :                 &mem_ctx_obj,
   19840             :                 &level,
   19841             :                 &in_obj)) {
   19842           0 :                 return NULL;
   19843             :         }
   19844           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   19845           0 :         if (mem_ctx == NULL) {
   19846           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   19847           0 :                 return NULL;
   19848             :         }
   19849           0 :         in = (union netr_Capabilities *)pytalloc_get_ptr(in_obj);
   19850           0 :         if (in == NULL) {
   19851           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_Capabilities!");
   19852           0 :                 return NULL;
   19853             :         }
   19854             : 
   19855           0 :         return py_import_netr_Capabilities(mem_ctx, level, in);
   19856             : }
   19857             : 
   19858           0 : static PyObject *py_netr_Capabilities_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19859             : {
   19860           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   19861           0 :         PyObject *mem_ctx_obj = NULL;
   19862           0 :         TALLOC_CTX *mem_ctx = NULL;
   19863           0 :         int level = 0;
   19864           0 :         PyObject *in = NULL;
   19865           0 :         union netr_Capabilities *out = NULL;
   19866             : 
   19867           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   19868             :                 discard_const_p(char *, kwnames),
   19869             :                 &mem_ctx_obj,
   19870             :                 &level,
   19871             :                 &in)) {
   19872           0 :                 return NULL;
   19873             :         }
   19874           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   19875           0 :         if (mem_ctx == NULL) {
   19876           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   19877           0 :                 return NULL;
   19878             :         }
   19879             : 
   19880           0 :         out = py_export_netr_Capabilities(mem_ctx, level, in);
   19881           0 :         if (out == NULL) {
   19882           0 :                 return NULL;
   19883             :         }
   19884             : 
   19885           0 :         return pytalloc_GenericObject_reference(out);
   19886             : }
   19887             : 
   19888             : static PyMethodDef py_netr_Capabilities_methods[] = {
   19889             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Capabilities_import),
   19890             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   19891             :                 "T.__import__(mem_ctx, level, in) => ret." },
   19892             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Capabilities_export),
   19893             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   19894             :                 "T.__export__(mem_ctx, level, in) => ret." },
   19895             :         { NULL, NULL, 0, NULL }
   19896             : };
   19897             : 
   19898           0 : static PyObject *py_netr_Capabilities_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19899             : {
   19900           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   19901           0 :         return NULL;
   19902             : }
   19903             : 
   19904             : 
   19905             : static PyTypeObject netr_Capabilities_Type = {
   19906             :         PyVarObject_HEAD_INIT(NULL, 0)
   19907             :         .tp_name = "netlogon.netr_Capabilities",
   19908             :         .tp_getset = NULL,
   19909             :         .tp_methods = py_netr_Capabilities_methods,
   19910             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19911             :         .tp_new = py_netr_Capabilities_new,
   19912             : };
   19913             : 
   19914             : 
   19915           0 : static PyObject *py_netr_LsaPolicyInformation_get_policy_size(PyObject *obj, void *closure)
   19916             : {
   19917           0 :         struct netr_LsaPolicyInformation *object = pytalloc_get_ptr(obj);
   19918           0 :         PyObject *py_policy_size;
   19919           0 :         py_policy_size = PyLong_FromUnsignedLongLong((uint32_t)(object->policy_size));
   19920           0 :         return py_policy_size;
   19921             : }
   19922             : 
   19923           0 : static int py_netr_LsaPolicyInformation_set_policy_size(PyObject *py_obj, PyObject *value, void *closure)
   19924             : {
   19925           0 :         struct netr_LsaPolicyInformation *object = pytalloc_get_ptr(py_obj);
   19926           0 :         if (value == NULL) {
   19927           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->policy_size");
   19928           0 :                 return -1;
   19929             :         }
   19930             :         {
   19931           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->policy_size));
   19932           0 :                 if (PyLong_Check(value)) {
   19933           0 :                         unsigned long long test_var;
   19934           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19935           0 :                         if (PyErr_Occurred() != NULL) {
   19936           0 :                                 return -1;
   19937             :                         }
   19938           0 :                         if (test_var > uint_max) {
   19939           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19940             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19941           0 :                                 return -1;
   19942             :                         }
   19943           0 :                         object->policy_size = test_var;
   19944             :                 } else {
   19945           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19946             :                           PyLong_Type.tp_name);
   19947           0 :                         return -1;
   19948             :                 }
   19949             :         }
   19950           0 :         return 0;
   19951             : }
   19952             : 
   19953           0 : static PyObject *py_netr_LsaPolicyInformation_get_policy(PyObject *obj, void *closure)
   19954             : {
   19955           0 :         struct netr_LsaPolicyInformation *object = pytalloc_get_ptr(obj);
   19956           0 :         PyObject *py_policy;
   19957           0 :         if (object->policy == NULL) {
   19958           0 :                 Py_RETURN_NONE;
   19959             :         }
   19960           0 :         if (object->policy == NULL) {
   19961           0 :                 py_policy = Py_None;
   19962           0 :                 Py_INCREF(py_policy);
   19963             :         } else {
   19964           0 :                 py_policy = PyList_New(object->policy_size);
   19965           0 :                 if (py_policy == NULL) {
   19966           0 :                         return NULL;
   19967             :                 }
   19968             :                 {
   19969             :                         int policy_cntr_1;
   19970           0 :                         for (policy_cntr_1 = 0; policy_cntr_1 < (object->policy_size); policy_cntr_1++) {
   19971           0 :                                 PyObject *py_policy_1;
   19972           0 :                                 py_policy_1 = PyLong_FromLong((uint16_t)((object->policy)[policy_cntr_1]));
   19973           0 :                                 PyList_SetItem(py_policy, policy_cntr_1, py_policy_1);
   19974             :                         }
   19975             :                 }
   19976             :         }
   19977           0 :         return py_policy;
   19978             : }
   19979             : 
   19980           0 : static int py_netr_LsaPolicyInformation_set_policy(PyObject *py_obj, PyObject *value, void *closure)
   19981             : {
   19982           0 :         struct netr_LsaPolicyInformation *object = pytalloc_get_ptr(py_obj);
   19983           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->policy));
   19984           0 :         if (value == NULL) {
   19985           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->policy");
   19986           0 :                 return -1;
   19987             :         }
   19988           0 :         if (value == Py_None) {
   19989           0 :                 object->policy = NULL;
   19990             :         } else {
   19991           0 :                 object->policy = NULL;
   19992           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   19993             :                 {
   19994           0 :                         int policy_cntr_1;
   19995           0 :                         object->policy = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->policy, PyList_GET_SIZE(value));
   19996           0 :                         if (!object->policy) { return -1; }
   19997           0 :                         talloc_set_name_const(object->policy, "ARRAY: object->policy");
   19998           0 :                         for (policy_cntr_1 = 0; policy_cntr_1 < PyList_GET_SIZE(value); policy_cntr_1++) {
   19999           0 :                                 if (PyList_GET_ITEM(value, policy_cntr_1) == NULL) {
   20000           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->policy)[policy_cntr_1]");
   20001           0 :                                         return -1;
   20002             :                                 }
   20003             :                                 {
   20004           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->policy)[policy_cntr_1]));
   20005           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, policy_cntr_1))) {
   20006           0 :                                                 unsigned long long test_var;
   20007           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, policy_cntr_1));
   20008           0 :                                                 if (PyErr_Occurred() != NULL) {
   20009           0 :                                                         return -1;
   20010             :                                                 }
   20011           0 :                                                 if (test_var > uint_max) {
   20012           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20013             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   20014           0 :                                                         return -1;
   20015             :                                                 }
   20016           0 :                                                 (object->policy)[policy_cntr_1] = test_var;
   20017             :                                         } else {
   20018           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   20019             :                                                   PyLong_Type.tp_name);
   20020           0 :                                                 return -1;
   20021             :                                         }
   20022             :                                 }
   20023             :                         }
   20024             :                 }
   20025             :         }
   20026           0 :         return 0;
   20027             : }
   20028             : 
   20029             : static PyGetSetDef py_netr_LsaPolicyInformation_getsetters[] = {
   20030             :         {
   20031             :                 .name = discard_const_p(char, "policy_size"),
   20032             :                 .get = py_netr_LsaPolicyInformation_get_policy_size,
   20033             :                 .set = py_netr_LsaPolicyInformation_set_policy_size,
   20034             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20035             :         },
   20036             :         {
   20037             :                 .name = discard_const_p(char, "policy"),
   20038             :                 .get = py_netr_LsaPolicyInformation_get_policy,
   20039             :                 .set = py_netr_LsaPolicyInformation_set_policy,
   20040             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   20041             :         },
   20042             :         { .name = NULL }
   20043             : };
   20044             : 
   20045           0 : static PyObject *py_netr_LsaPolicyInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20046             : {
   20047           0 :         return pytalloc_new(struct netr_LsaPolicyInformation, type);
   20048             : }
   20049             : 
   20050             : 
   20051             : static PyTypeObject netr_LsaPolicyInformation_Type = {
   20052             :         PyVarObject_HEAD_INIT(NULL, 0)
   20053             :         .tp_name = "netlogon.netr_LsaPolicyInformation",
   20054             :         .tp_getset = py_netr_LsaPolicyInformation_getsetters,
   20055             :         .tp_methods = NULL,
   20056             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20057             :         .tp_new = py_netr_LsaPolicyInformation_new,
   20058             : };
   20059             : 
   20060             : 
   20061           0 : static PyObject *py_netr_OsVersionInfoEx_get_OSVersionInfoSize(PyObject *obj, void *closure)
   20062             : {
   20063           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20064           0 :         PyObject *py_OSVersionInfoSize;
   20065           0 :         py_OSVersionInfoSize = PyLong_FromUnsignedLongLong((uint32_t)(object->OSVersionInfoSize));
   20066           0 :         return py_OSVersionInfoSize;
   20067             : }
   20068             : 
   20069           0 : static int py_netr_OsVersionInfoEx_set_OSVersionInfoSize(PyObject *py_obj, PyObject *value, void *closure)
   20070             : {
   20071           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20072           0 :         if (value == NULL) {
   20073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->OSVersionInfoSize");
   20074           0 :                 return -1;
   20075             :         }
   20076             :         {
   20077           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->OSVersionInfoSize));
   20078           0 :                 if (PyLong_Check(value)) {
   20079           0 :                         unsigned long long test_var;
   20080           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20081           0 :                         if (PyErr_Occurred() != NULL) {
   20082           0 :                                 return -1;
   20083             :                         }
   20084           0 :                         if (test_var > uint_max) {
   20085           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20086             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20087           0 :                                 return -1;
   20088             :                         }
   20089           0 :                         object->OSVersionInfoSize = test_var;
   20090             :                 } else {
   20091           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20092             :                           PyLong_Type.tp_name);
   20093           0 :                         return -1;
   20094             :                 }
   20095             :         }
   20096           0 :         return 0;
   20097             : }
   20098             : 
   20099           0 : static PyObject *py_netr_OsVersionInfoEx_get_MajorVersion(PyObject *obj, void *closure)
   20100             : {
   20101           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20102           0 :         PyObject *py_MajorVersion;
   20103           0 :         py_MajorVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->MajorVersion));
   20104           0 :         return py_MajorVersion;
   20105             : }
   20106             : 
   20107           0 : static int py_netr_OsVersionInfoEx_set_MajorVersion(PyObject *py_obj, PyObject *value, void *closure)
   20108             : {
   20109           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20110           0 :         if (value == NULL) {
   20111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->MajorVersion");
   20112           0 :                 return -1;
   20113             :         }
   20114             :         {
   20115           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MajorVersion));
   20116           0 :                 if (PyLong_Check(value)) {
   20117           0 :                         unsigned long long test_var;
   20118           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20119           0 :                         if (PyErr_Occurred() != NULL) {
   20120           0 :                                 return -1;
   20121             :                         }
   20122           0 :                         if (test_var > uint_max) {
   20123           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20124             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20125           0 :                                 return -1;
   20126             :                         }
   20127           0 :                         object->MajorVersion = test_var;
   20128             :                 } else {
   20129           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20130             :                           PyLong_Type.tp_name);
   20131           0 :                         return -1;
   20132             :                 }
   20133             :         }
   20134           0 :         return 0;
   20135             : }
   20136             : 
   20137           0 : static PyObject *py_netr_OsVersionInfoEx_get_MinorVersion(PyObject *obj, void *closure)
   20138             : {
   20139           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20140           0 :         PyObject *py_MinorVersion;
   20141           0 :         py_MinorVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->MinorVersion));
   20142           0 :         return py_MinorVersion;
   20143             : }
   20144             : 
   20145           0 : static int py_netr_OsVersionInfoEx_set_MinorVersion(PyObject *py_obj, PyObject *value, void *closure)
   20146             : {
   20147           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20148           0 :         if (value == NULL) {
   20149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->MinorVersion");
   20150           0 :                 return -1;
   20151             :         }
   20152             :         {
   20153           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MinorVersion));
   20154           0 :                 if (PyLong_Check(value)) {
   20155           0 :                         unsigned long long test_var;
   20156           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20157           0 :                         if (PyErr_Occurred() != NULL) {
   20158           0 :                                 return -1;
   20159             :                         }
   20160           0 :                         if (test_var > uint_max) {
   20161           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20162             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20163           0 :                                 return -1;
   20164             :                         }
   20165           0 :                         object->MinorVersion = test_var;
   20166             :                 } else {
   20167           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20168             :                           PyLong_Type.tp_name);
   20169           0 :                         return -1;
   20170             :                 }
   20171             :         }
   20172           0 :         return 0;
   20173             : }
   20174             : 
   20175           0 : static PyObject *py_netr_OsVersionInfoEx_get_BuildNumber(PyObject *obj, void *closure)
   20176             : {
   20177           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20178           0 :         PyObject *py_BuildNumber;
   20179           0 :         py_BuildNumber = PyLong_FromUnsignedLongLong((uint32_t)(object->BuildNumber));
   20180           0 :         return py_BuildNumber;
   20181             : }
   20182             : 
   20183           0 : static int py_netr_OsVersionInfoEx_set_BuildNumber(PyObject *py_obj, PyObject *value, void *closure)
   20184             : {
   20185           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20186           0 :         if (value == NULL) {
   20187           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->BuildNumber");
   20188           0 :                 return -1;
   20189             :         }
   20190             :         {
   20191           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->BuildNumber));
   20192           0 :                 if (PyLong_Check(value)) {
   20193           0 :                         unsigned long long test_var;
   20194           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20195           0 :                         if (PyErr_Occurred() != NULL) {
   20196           0 :                                 return -1;
   20197             :                         }
   20198           0 :                         if (test_var > uint_max) {
   20199           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20200             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20201           0 :                                 return -1;
   20202             :                         }
   20203           0 :                         object->BuildNumber = test_var;
   20204             :                 } else {
   20205           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20206             :                           PyLong_Type.tp_name);
   20207           0 :                         return -1;
   20208             :                 }
   20209             :         }
   20210           0 :         return 0;
   20211             : }
   20212             : 
   20213           0 : static PyObject *py_netr_OsVersionInfoEx_get_PlatformId(PyObject *obj, void *closure)
   20214             : {
   20215           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20216           0 :         PyObject *py_PlatformId;
   20217           0 :         py_PlatformId = PyLong_FromUnsignedLongLong((uint32_t)(object->PlatformId));
   20218           0 :         return py_PlatformId;
   20219             : }
   20220             : 
   20221           0 : static int py_netr_OsVersionInfoEx_set_PlatformId(PyObject *py_obj, PyObject *value, void *closure)
   20222             : {
   20223           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20224           0 :         if (value == NULL) {
   20225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->PlatformId");
   20226           0 :                 return -1;
   20227             :         }
   20228             :         {
   20229           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PlatformId));
   20230           0 :                 if (PyLong_Check(value)) {
   20231           0 :                         unsigned long long test_var;
   20232           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20233           0 :                         if (PyErr_Occurred() != NULL) {
   20234           0 :                                 return -1;
   20235             :                         }
   20236           0 :                         if (test_var > uint_max) {
   20237           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20238             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20239           0 :                                 return -1;
   20240             :                         }
   20241           0 :                         object->PlatformId = test_var;
   20242             :                 } else {
   20243           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20244             :                           PyLong_Type.tp_name);
   20245           0 :                         return -1;
   20246             :                 }
   20247             :         }
   20248           0 :         return 0;
   20249             : }
   20250             : 
   20251           0 : static PyObject *py_netr_OsVersionInfoEx_get_CSDVersion(PyObject *obj, void *closure)
   20252             : {
   20253           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20254           0 :         PyObject *py_CSDVersion;
   20255           0 :         py_CSDVersion = PyString_FromStringOrNULL(object->CSDVersion);
   20256           0 :         return py_CSDVersion;
   20257             : }
   20258             : 
   20259           0 : static int py_netr_OsVersionInfoEx_set_CSDVersion(PyObject *py_obj, PyObject *value, void *closure)
   20260             : {
   20261           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20262           0 :         if (value == NULL) {
   20263           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->CSDVersion");
   20264           0 :                 return -1;
   20265             :         }
   20266             :         {
   20267           0 :                 const char *test_str;
   20268           0 :                 const char *talloc_str;
   20269           0 :                 PyObject *unicode = NULL;
   20270           0 :                 if (PyUnicode_Check(value)) {
   20271           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20272           0 :                         if (unicode == NULL) {
   20273           0 :                                 return -1;
   20274             :                         }
   20275           0 :                         test_str = PyBytes_AS_STRING(unicode);
   20276           0 :                 } else if (PyBytes_Check(value)) {
   20277           0 :                         test_str = PyBytes_AS_STRING(value);
   20278             :                 } else {
   20279           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20280           0 :                         return -1;
   20281             :                 }
   20282           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20283           0 :                 if (unicode != NULL) {
   20284           0 :                         Py_DECREF(unicode);
   20285             :                 }
   20286           0 :                 if (talloc_str == NULL) {
   20287           0 :                         PyErr_NoMemory();
   20288           0 :                         return -1;
   20289             :                 }
   20290           0 :                 object->CSDVersion = talloc_str;
   20291             :         }
   20292           0 :         return 0;
   20293             : }
   20294             : 
   20295           0 : static PyObject *py_netr_OsVersionInfoEx_get_ServicePackMajor(PyObject *obj, void *closure)
   20296             : {
   20297           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20298           0 :         PyObject *py_ServicePackMajor;
   20299           0 :         py_ServicePackMajor = PyLong_FromLong((uint16_t)(object->ServicePackMajor));
   20300           0 :         return py_ServicePackMajor;
   20301             : }
   20302             : 
   20303           0 : static int py_netr_OsVersionInfoEx_set_ServicePackMajor(PyObject *py_obj, PyObject *value, void *closure)
   20304             : {
   20305           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20306           0 :         if (value == NULL) {
   20307           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ServicePackMajor");
   20308           0 :                 return -1;
   20309             :         }
   20310             :         {
   20311           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ServicePackMajor));
   20312           0 :                 if (PyLong_Check(value)) {
   20313           0 :                         unsigned long long test_var;
   20314           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20315           0 :                         if (PyErr_Occurred() != NULL) {
   20316           0 :                                 return -1;
   20317             :                         }
   20318           0 :                         if (test_var > uint_max) {
   20319           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20320             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20321           0 :                                 return -1;
   20322             :                         }
   20323           0 :                         object->ServicePackMajor = test_var;
   20324             :                 } else {
   20325           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20326             :                           PyLong_Type.tp_name);
   20327           0 :                         return -1;
   20328             :                 }
   20329             :         }
   20330           0 :         return 0;
   20331             : }
   20332             : 
   20333           0 : static PyObject *py_netr_OsVersionInfoEx_get_ServicePackMinor(PyObject *obj, void *closure)
   20334             : {
   20335           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20336           0 :         PyObject *py_ServicePackMinor;
   20337           0 :         py_ServicePackMinor = PyLong_FromLong((uint16_t)(object->ServicePackMinor));
   20338           0 :         return py_ServicePackMinor;
   20339             : }
   20340             : 
   20341           0 : static int py_netr_OsVersionInfoEx_set_ServicePackMinor(PyObject *py_obj, PyObject *value, void *closure)
   20342             : {
   20343           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20344           0 :         if (value == NULL) {
   20345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ServicePackMinor");
   20346           0 :                 return -1;
   20347             :         }
   20348             :         {
   20349           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ServicePackMinor));
   20350           0 :                 if (PyLong_Check(value)) {
   20351           0 :                         unsigned long long test_var;
   20352           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20353           0 :                         if (PyErr_Occurred() != NULL) {
   20354           0 :                                 return -1;
   20355             :                         }
   20356           0 :                         if (test_var > uint_max) {
   20357           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20358             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20359           0 :                                 return -1;
   20360             :                         }
   20361           0 :                         object->ServicePackMinor = test_var;
   20362             :                 } else {
   20363           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20364             :                           PyLong_Type.tp_name);
   20365           0 :                         return -1;
   20366             :                 }
   20367             :         }
   20368           0 :         return 0;
   20369             : }
   20370             : 
   20371           0 : static PyObject *py_netr_OsVersionInfoEx_get_SuiteMask(PyObject *obj, void *closure)
   20372             : {
   20373           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20374           0 :         PyObject *py_SuiteMask;
   20375           0 :         py_SuiteMask = PyLong_FromLong((uint16_t)(object->SuiteMask));
   20376           0 :         return py_SuiteMask;
   20377             : }
   20378             : 
   20379           0 : static int py_netr_OsVersionInfoEx_set_SuiteMask(PyObject *py_obj, PyObject *value, void *closure)
   20380             : {
   20381           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20382           0 :         if (value == NULL) {
   20383           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SuiteMask");
   20384           0 :                 return -1;
   20385             :         }
   20386             :         {
   20387           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SuiteMask));
   20388           0 :                 if (PyLong_Check(value)) {
   20389           0 :                         unsigned long long test_var;
   20390           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20391           0 :                         if (PyErr_Occurred() != NULL) {
   20392           0 :                                 return -1;
   20393             :                         }
   20394           0 :                         if (test_var > uint_max) {
   20395           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20396             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20397           0 :                                 return -1;
   20398             :                         }
   20399           0 :                         object->SuiteMask = test_var;
   20400             :                 } else {
   20401           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20402             :                           PyLong_Type.tp_name);
   20403           0 :                         return -1;
   20404             :                 }
   20405             :         }
   20406           0 :         return 0;
   20407             : }
   20408             : 
   20409           0 : static PyObject *py_netr_OsVersionInfoEx_get_ProductType(PyObject *obj, void *closure)
   20410             : {
   20411           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20412           0 :         PyObject *py_ProductType;
   20413           0 :         py_ProductType = PyLong_FromLong((uint16_t)(object->ProductType));
   20414           0 :         return py_ProductType;
   20415             : }
   20416             : 
   20417           0 : static int py_netr_OsVersionInfoEx_set_ProductType(PyObject *py_obj, PyObject *value, void *closure)
   20418             : {
   20419           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20420           0 :         if (value == NULL) {
   20421           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ProductType");
   20422           0 :                 return -1;
   20423             :         }
   20424             :         {
   20425           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ProductType));
   20426           0 :                 if (PyLong_Check(value)) {
   20427           0 :                         unsigned long long test_var;
   20428           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20429           0 :                         if (PyErr_Occurred() != NULL) {
   20430           0 :                                 return -1;
   20431             :                         }
   20432           0 :                         if (test_var > uint_max) {
   20433           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20434             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20435           0 :                                 return -1;
   20436             :                         }
   20437           0 :                         object->ProductType = test_var;
   20438             :                 } else {
   20439           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20440             :                           PyLong_Type.tp_name);
   20441           0 :                         return -1;
   20442             :                 }
   20443             :         }
   20444           0 :         return 0;
   20445             : }
   20446             : 
   20447           0 : static PyObject *py_netr_OsVersionInfoEx_get_Reserved(PyObject *obj, void *closure)
   20448             : {
   20449           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
   20450           0 :         PyObject *py_Reserved;
   20451           0 :         py_Reserved = PyLong_FromLong((uint16_t)(object->Reserved));
   20452           0 :         return py_Reserved;
   20453             : }
   20454             : 
   20455           0 : static int py_netr_OsVersionInfoEx_set_Reserved(PyObject *py_obj, PyObject *value, void *closure)
   20456             : {
   20457           0 :         struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
   20458           0 :         if (value == NULL) {
   20459           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Reserved");
   20460           0 :                 return -1;
   20461             :         }
   20462             :         {
   20463           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Reserved));
   20464           0 :                 if (PyLong_Check(value)) {
   20465           0 :                         unsigned long long test_var;
   20466           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20467           0 :                         if (PyErr_Occurred() != NULL) {
   20468           0 :                                 return -1;
   20469             :                         }
   20470           0 :                         if (test_var > uint_max) {
   20471           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20472             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20473           0 :                                 return -1;
   20474             :                         }
   20475           0 :                         object->Reserved = test_var;
   20476             :                 } else {
   20477           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20478             :                           PyLong_Type.tp_name);
   20479           0 :                         return -1;
   20480             :                 }
   20481             :         }
   20482           0 :         return 0;
   20483             : }
   20484             : 
   20485             : static PyGetSetDef py_netr_OsVersionInfoEx_getsetters[] = {
   20486             :         {
   20487             :                 .name = discard_const_p(char, "OSVersionInfoSize"),
   20488             :                 .get = py_netr_OsVersionInfoEx_get_OSVersionInfoSize,
   20489             :                 .set = py_netr_OsVersionInfoEx_set_OSVersionInfoSize,
   20490             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20491             :         },
   20492             :         {
   20493             :                 .name = discard_const_p(char, "MajorVersion"),
   20494             :                 .get = py_netr_OsVersionInfoEx_get_MajorVersion,
   20495             :                 .set = py_netr_OsVersionInfoEx_set_MajorVersion,
   20496             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20497             :         },
   20498             :         {
   20499             :                 .name = discard_const_p(char, "MinorVersion"),
   20500             :                 .get = py_netr_OsVersionInfoEx_get_MinorVersion,
   20501             :                 .set = py_netr_OsVersionInfoEx_set_MinorVersion,
   20502             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20503             :         },
   20504             :         {
   20505             :                 .name = discard_const_p(char, "BuildNumber"),
   20506             :                 .get = py_netr_OsVersionInfoEx_get_BuildNumber,
   20507             :                 .set = py_netr_OsVersionInfoEx_set_BuildNumber,
   20508             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20509             :         },
   20510             :         {
   20511             :                 .name = discard_const_p(char, "PlatformId"),
   20512             :                 .get = py_netr_OsVersionInfoEx_get_PlatformId,
   20513             :                 .set = py_netr_OsVersionInfoEx_set_PlatformId,
   20514             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20515             :         },
   20516             :         {
   20517             :                 .name = discard_const_p(char, "CSDVersion"),
   20518             :                 .get = py_netr_OsVersionInfoEx_get_CSDVersion,
   20519             :                 .set = py_netr_OsVersionInfoEx_set_CSDVersion,
   20520             :                 .doc = discard_const_p(char, "PIDL-generated element of base type string")
   20521             :         },
   20522             :         {
   20523             :                 .name = discard_const_p(char, "ServicePackMajor"),
   20524             :                 .get = py_netr_OsVersionInfoEx_get_ServicePackMajor,
   20525             :                 .set = py_netr_OsVersionInfoEx_set_ServicePackMajor,
   20526             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20527             :         },
   20528             :         {
   20529             :                 .name = discard_const_p(char, "ServicePackMinor"),
   20530             :                 .get = py_netr_OsVersionInfoEx_get_ServicePackMinor,
   20531             :                 .set = py_netr_OsVersionInfoEx_set_ServicePackMinor,
   20532             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20533             :         },
   20534             :         {
   20535             :                 .name = discard_const_p(char, "SuiteMask"),
   20536             :                 .get = py_netr_OsVersionInfoEx_get_SuiteMask,
   20537             :                 .set = py_netr_OsVersionInfoEx_set_SuiteMask,
   20538             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SuiteMask")
   20539             :         },
   20540             :         {
   20541             :                 .name = discard_const_p(char, "ProductType"),
   20542             :                 .get = py_netr_OsVersionInfoEx_get_ProductType,
   20543             :                 .set = py_netr_OsVersionInfoEx_set_ProductType,
   20544             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ProductType")
   20545             :         },
   20546             :         {
   20547             :                 .name = discard_const_p(char, "Reserved"),
   20548             :                 .get = py_netr_OsVersionInfoEx_get_Reserved,
   20549             :                 .set = py_netr_OsVersionInfoEx_set_Reserved,
   20550             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   20551             :         },
   20552             :         { .name = NULL }
   20553             : };
   20554             : 
   20555           0 : static PyObject *py_netr_OsVersionInfoEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20556             : {
   20557           0 :         return pytalloc_new(struct netr_OsVersionInfoEx, type);
   20558             : }
   20559             : 
   20560             : 
   20561             : static PyTypeObject netr_OsVersionInfoEx_Type = {
   20562             :         PyVarObject_HEAD_INIT(NULL, 0)
   20563             :         .tp_name = "netlogon.netr_OsVersionInfoEx",
   20564             :         .tp_getset = py_netr_OsVersionInfoEx_getsetters,
   20565             :         .tp_methods = NULL,
   20566             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20567             :         .tp_new = py_netr_OsVersionInfoEx_new,
   20568             : };
   20569             : 
   20570             : 
   20571           0 : static PyObject *py_netr_OsVersion_get_length(PyObject *obj, void *closure)
   20572             : {
   20573           0 :         struct netr_OsVersion *object = pytalloc_get_ptr(obj);
   20574           0 :         PyObject *py_length;
   20575           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
   20576           0 :         return py_length;
   20577             : }
   20578             : 
   20579           0 : static int py_netr_OsVersion_set_length(PyObject *py_obj, PyObject *value, void *closure)
   20580             : {
   20581           0 :         struct netr_OsVersion *object = pytalloc_get_ptr(py_obj);
   20582           0 :         if (value == NULL) {
   20583           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
   20584           0 :                 return -1;
   20585             :         }
   20586             :         {
   20587           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   20588           0 :                 if (PyLong_Check(value)) {
   20589           0 :                         unsigned long long test_var;
   20590           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20591           0 :                         if (PyErr_Occurred() != NULL) {
   20592           0 :                                 return -1;
   20593             :                         }
   20594           0 :                         if (test_var > uint_max) {
   20595           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20596             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20597           0 :                                 return -1;
   20598             :                         }
   20599           0 :                         object->length = test_var;
   20600             :                 } else {
   20601           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20602             :                           PyLong_Type.tp_name);
   20603           0 :                         return -1;
   20604             :                 }
   20605             :         }
   20606           0 :         return 0;
   20607             : }
   20608             : 
   20609           0 : static PyObject *py_netr_OsVersion_get_dummy(PyObject *obj, void *closure)
   20610             : {
   20611           0 :         struct netr_OsVersion *object = pytalloc_get_ptr(obj);
   20612           0 :         PyObject *py_dummy;
   20613           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy));
   20614           0 :         return py_dummy;
   20615             : }
   20616             : 
   20617           0 : static int py_netr_OsVersion_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
   20618             : {
   20619           0 :         struct netr_OsVersion *object = pytalloc_get_ptr(py_obj);
   20620           0 :         if (value == NULL) {
   20621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy");
   20622           0 :                 return -1;
   20623             :         }
   20624             :         {
   20625           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
   20626           0 :                 if (PyLong_Check(value)) {
   20627           0 :                         unsigned long long test_var;
   20628           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20629           0 :                         if (PyErr_Occurred() != NULL) {
   20630           0 :                                 return -1;
   20631             :                         }
   20632           0 :                         if (test_var > uint_max) {
   20633           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20634             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20635           0 :                                 return -1;
   20636             :                         }
   20637           0 :                         object->dummy = test_var;
   20638             :                 } else {
   20639           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20640             :                           PyLong_Type.tp_name);
   20641           0 :                         return -1;
   20642             :                 }
   20643             :         }
   20644           0 :         return 0;
   20645             : }
   20646             : 
   20647           0 : static PyObject *py_netr_OsVersion_get_size(PyObject *obj, void *closure)
   20648             : {
   20649           0 :         struct netr_OsVersion *object = pytalloc_get_ptr(obj);
   20650           0 :         PyObject *py_size;
   20651           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
   20652           0 :         return py_size;
   20653             : }
   20654             : 
   20655           0 : static int py_netr_OsVersion_set_size(PyObject *py_obj, PyObject *value, void *closure)
   20656             : {
   20657           0 :         struct netr_OsVersion *object = pytalloc_get_ptr(py_obj);
   20658           0 :         if (value == NULL) {
   20659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
   20660           0 :                 return -1;
   20661             :         }
   20662             :         {
   20663           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   20664           0 :                 if (PyLong_Check(value)) {
   20665           0 :                         unsigned long long test_var;
   20666           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20667           0 :                         if (PyErr_Occurred() != NULL) {
   20668           0 :                                 return -1;
   20669             :                         }
   20670           0 :                         if (test_var > uint_max) {
   20671           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20672             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20673           0 :                                 return -1;
   20674             :                         }
   20675           0 :                         object->size = test_var;
   20676             :                 } else {
   20677           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20678             :                           PyLong_Type.tp_name);
   20679           0 :                         return -1;
   20680             :                 }
   20681             :         }
   20682           0 :         return 0;
   20683             : }
   20684             : 
   20685           0 : static PyObject *py_netr_OsVersion_get_os(PyObject *obj, void *closure)
   20686             : {
   20687           0 :         struct netr_OsVersion *object = pytalloc_get_ptr(obj);
   20688           0 :         PyObject *py_os;
   20689           0 :         py_os = pytalloc_reference_ex(&netr_OsVersionInfoEx_Type, pytalloc_get_mem_ctx(obj), &object->os);
   20690           0 :         return py_os;
   20691             : }
   20692             : 
   20693           0 : static int py_netr_OsVersion_set_os(PyObject *py_obj, PyObject *value, void *closure)
   20694             : {
   20695           0 :         struct netr_OsVersion *object = pytalloc_get_ptr(py_obj);
   20696           0 :         if (value == NULL) {
   20697           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->os");
   20698           0 :                 return -1;
   20699             :         }
   20700           0 :         PY_CHECK_TYPE(&netr_OsVersionInfoEx_Type, value, return -1;);
   20701           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20702           0 :                 PyErr_NoMemory();
   20703           0 :                 return -1;
   20704             :         }
   20705           0 :         object->os = *(struct netr_OsVersionInfoEx *)pytalloc_get_ptr(value);
   20706           0 :         return 0;
   20707             : }
   20708             : 
   20709             : static PyGetSetDef py_netr_OsVersion_getsetters[] = {
   20710             :         {
   20711             :                 .name = discard_const_p(char, "length"),
   20712             :                 .get = py_netr_OsVersion_get_length,
   20713             :                 .set = py_netr_OsVersion_set_length,
   20714             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   20715             :         },
   20716             :         {
   20717             :                 .name = discard_const_p(char, "dummy"),
   20718             :                 .get = py_netr_OsVersion_get_dummy,
   20719             :                 .set = py_netr_OsVersion_set_dummy,
   20720             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   20721             :         },
   20722             :         {
   20723             :                 .name = discard_const_p(char, "size"),
   20724             :                 .get = py_netr_OsVersion_get_size,
   20725             :                 .set = py_netr_OsVersion_set_size,
   20726             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   20727             :         },
   20728             :         {
   20729             :                 .name = discard_const_p(char, "os"),
   20730             :                 .get = py_netr_OsVersion_get_os,
   20731             :                 .set = py_netr_OsVersion_set_os,
   20732             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersionInfoEx")
   20733             :         },
   20734             :         { .name = NULL }
   20735             : };
   20736             : 
   20737           0 : static PyObject *py_netr_OsVersion_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20738             : {
   20739           0 :         return pytalloc_new(struct netr_OsVersion, type);
   20740             : }
   20741             : 
   20742             : 
   20743             : static PyTypeObject netr_OsVersion_Type = {
   20744             :         PyVarObject_HEAD_INIT(NULL, 0)
   20745             :         .tp_name = "netlogon.netr_OsVersion",
   20746             :         .tp_getset = py_netr_OsVersion_getsetters,
   20747             :         .tp_methods = NULL,
   20748             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20749             :         .tp_new = py_netr_OsVersion_new,
   20750             : };
   20751             : 
   20752             : 
   20753           0 : static PyObject *py_netr_OsVersionContainer_get_length(PyObject *obj, void *closure)
   20754             : {
   20755           0 :         struct netr_OsVersionContainer *object = pytalloc_get_ptr(obj);
   20756           0 :         PyObject *py_length;
   20757           0 :         py_length = PyLong_FromLong((uint16_t)(object->length));
   20758           0 :         return py_length;
   20759             : }
   20760             : 
   20761           0 : static int py_netr_OsVersionContainer_set_length(PyObject *py_obj, PyObject *value, void *closure)
   20762             : {
   20763           0 :         struct netr_OsVersionContainer *object = pytalloc_get_ptr(py_obj);
   20764           0 :         if (value == NULL) {
   20765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
   20766           0 :                 return -1;
   20767             :         }
   20768             :         {
   20769           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   20770           0 :                 if (PyLong_Check(value)) {
   20771           0 :                         unsigned long long test_var;
   20772           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20773           0 :                         if (PyErr_Occurred() != NULL) {
   20774           0 :                                 return -1;
   20775             :                         }
   20776           0 :                         if (test_var > uint_max) {
   20777           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20778             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20779           0 :                                 return -1;
   20780             :                         }
   20781           0 :                         object->length = test_var;
   20782             :                 } else {
   20783           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20784             :                           PyLong_Type.tp_name);
   20785           0 :                         return -1;
   20786             :                 }
   20787             :         }
   20788           0 :         return 0;
   20789             : }
   20790             : 
   20791           0 : static PyObject *py_netr_OsVersionContainer_get_size(PyObject *obj, void *closure)
   20792             : {
   20793           0 :         struct netr_OsVersionContainer *object = pytalloc_get_ptr(obj);
   20794           0 :         PyObject *py_size;
   20795           0 :         py_size = PyLong_FromLong((uint16_t)(object->size));
   20796           0 :         return py_size;
   20797             : }
   20798             : 
   20799           0 : static int py_netr_OsVersionContainer_set_size(PyObject *py_obj, PyObject *value, void *closure)
   20800             : {
   20801           0 :         struct netr_OsVersionContainer *object = pytalloc_get_ptr(py_obj);
   20802           0 :         if (value == NULL) {
   20803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
   20804           0 :                 return -1;
   20805             :         }
   20806             :         {
   20807           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   20808           0 :                 if (PyLong_Check(value)) {
   20809           0 :                         unsigned long long test_var;
   20810           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20811           0 :                         if (PyErr_Occurred() != NULL) {
   20812           0 :                                 return -1;
   20813             :                         }
   20814           0 :                         if (test_var > uint_max) {
   20815           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20816             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20817           0 :                                 return -1;
   20818             :                         }
   20819           0 :                         object->size = test_var;
   20820             :                 } else {
   20821           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20822             :                           PyLong_Type.tp_name);
   20823           0 :                         return -1;
   20824             :                 }
   20825             :         }
   20826           0 :         return 0;
   20827             : }
   20828             : 
   20829           0 : static PyObject *py_netr_OsVersionContainer_get_os(PyObject *obj, void *closure)
   20830             : {
   20831           0 :         struct netr_OsVersionContainer *object = pytalloc_get_ptr(obj);
   20832           0 :         PyObject *py_os;
   20833           0 :         if (object->os == NULL) {
   20834           0 :                 Py_RETURN_NONE;
   20835             :         }
   20836           0 :         if (object->os == NULL) {
   20837           0 :                 py_os = Py_None;
   20838           0 :                 Py_INCREF(py_os);
   20839             :         } else {
   20840           0 :                 py_os = pytalloc_reference_ex(&netr_OsVersion_Type, object->os, object->os);
   20841             :         }
   20842           0 :         return py_os;
   20843             : }
   20844             : 
   20845           0 : static int py_netr_OsVersionContainer_set_os(PyObject *py_obj, PyObject *value, void *closure)
   20846             : {
   20847           0 :         struct netr_OsVersionContainer *object = pytalloc_get_ptr(py_obj);
   20848           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->os));
   20849           0 :         if (value == NULL) {
   20850           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->os");
   20851           0 :                 return -1;
   20852             :         }
   20853           0 :         if (value == Py_None) {
   20854           0 :                 object->os = NULL;
   20855             :         } else {
   20856           0 :                 object->os = NULL;
   20857           0 :                 PY_CHECK_TYPE(&netr_OsVersion_Type, value, return -1;);
   20858           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20859           0 :                         PyErr_NoMemory();
   20860           0 :                         return -1;
   20861             :                 }
   20862           0 :                 object->os = (struct netr_OsVersion *)pytalloc_get_ptr(value);
   20863             :         }
   20864           0 :         return 0;
   20865             : }
   20866             : 
   20867             : static PyGetSetDef py_netr_OsVersionContainer_getsetters[] = {
   20868             :         {
   20869             :                 .name = discard_const_p(char, "length"),
   20870             :                 .get = py_netr_OsVersionContainer_get_length,
   20871             :                 .set = py_netr_OsVersionContainer_set_length,
   20872             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20873             :         },
   20874             :         {
   20875             :                 .name = discard_const_p(char, "size"),
   20876             :                 .get = py_netr_OsVersionContainer_get_size,
   20877             :                 .set = py_netr_OsVersionContainer_set_size,
   20878             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20879             :         },
   20880             :         {
   20881             :                 .name = discard_const_p(char, "os"),
   20882             :                 .get = py_netr_OsVersionContainer_get_os,
   20883             :                 .set = py_netr_OsVersionContainer_set_os,
   20884             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersion")
   20885             :         },
   20886             :         { .name = NULL }
   20887             : };
   20888             : 
   20889           0 : static PyObject *py_netr_OsVersionContainer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20890             : {
   20891           0 :         return pytalloc_new(struct netr_OsVersionContainer, type);
   20892             : }
   20893             : 
   20894             : 
   20895             : static PyTypeObject netr_OsVersionContainer_Type = {
   20896             :         PyVarObject_HEAD_INIT(NULL, 0)
   20897             :         .tp_name = "netlogon.netr_OsVersionContainer",
   20898             :         .tp_getset = py_netr_OsVersionContainer_getsetters,
   20899             :         .tp_methods = NULL,
   20900             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20901             :         .tp_new = py_netr_OsVersionContainer_new,
   20902             : };
   20903             : 
   20904             : 
   20905           0 : static PyObject *py_netr_WorkstationInformation_get_lsa_policy(PyObject *obj, void *closure)
   20906             : {
   20907           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   20908           0 :         PyObject *py_lsa_policy;
   20909           0 :         py_lsa_policy = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, pytalloc_get_mem_ctx(obj), &object->lsa_policy);
   20910           0 :         return py_lsa_policy;
   20911             : }
   20912             : 
   20913           0 : static int py_netr_WorkstationInformation_set_lsa_policy(PyObject *py_obj, PyObject *value, void *closure)
   20914             : {
   20915           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   20916           0 :         if (value == NULL) {
   20917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lsa_policy");
   20918           0 :                 return -1;
   20919             :         }
   20920           0 :         PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, value, return -1;);
   20921           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20922           0 :                 PyErr_NoMemory();
   20923           0 :                 return -1;
   20924             :         }
   20925           0 :         object->lsa_policy = *(struct netr_LsaPolicyInformation *)pytalloc_get_ptr(value);
   20926           0 :         return 0;
   20927             : }
   20928             : 
   20929           0 : static PyObject *py_netr_WorkstationInformation_get_dns_hostname(PyObject *obj, void *closure)
   20930             : {
   20931           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   20932           0 :         PyObject *py_dns_hostname;
   20933           0 :         if (object->dns_hostname == NULL) {
   20934           0 :                 Py_RETURN_NONE;
   20935             :         }
   20936           0 :         if (object->dns_hostname == NULL) {
   20937           0 :                 py_dns_hostname = Py_None;
   20938           0 :                 Py_INCREF(py_dns_hostname);
   20939             :         } else {
   20940           0 :                 if (object->dns_hostname == NULL) {
   20941           0 :                         py_dns_hostname = Py_None;
   20942           0 :                         Py_INCREF(py_dns_hostname);
   20943             :                 } else {
   20944           0 :                         py_dns_hostname = PyUnicode_Decode(object->dns_hostname, strlen(object->dns_hostname), "utf-8", "ignore");
   20945             :                 }
   20946             :         }
   20947           0 :         return py_dns_hostname;
   20948             : }
   20949             : 
   20950          21 : static int py_netr_WorkstationInformation_set_dns_hostname(PyObject *py_obj, PyObject *value, void *closure)
   20951             : {
   20952          21 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   20953          21 :         if (value == NULL) {
   20954           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_hostname");
   20955           0 :                 return -1;
   20956             :         }
   20957          21 :         if (value == Py_None) {
   20958           0 :                 object->dns_hostname = NULL;
   20959             :         } else {
   20960          21 :                 object->dns_hostname = NULL;
   20961             :                 {
   20962           0 :                         const char *test_str;
   20963           0 :                         const char *talloc_str;
   20964          21 :                         PyObject *unicode = NULL;
   20965          21 :                         if (PyUnicode_Check(value)) {
   20966           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20967           0 :                                 if (unicode == NULL) {
   20968           0 :                                         return -1;
   20969             :                                 }
   20970           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20971          21 :                         } else if (PyBytes_Check(value)) {
   20972          21 :                                 test_str = PyBytes_AS_STRING(value);
   20973             :                         } else {
   20974           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20975           0 :                                 return -1;
   20976             :                         }
   20977          21 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20978          21 :                         if (unicode != NULL) {
   20979           0 :                                 Py_DECREF(unicode);
   20980             :                         }
   20981          21 :                         if (talloc_str == NULL) {
   20982           0 :                                 PyErr_NoMemory();
   20983           0 :                                 return -1;
   20984             :                         }
   20985          21 :                         object->dns_hostname = talloc_str;
   20986             :                 }
   20987             :         }
   20988          21 :         return 0;
   20989             : }
   20990             : 
   20991           0 : static PyObject *py_netr_WorkstationInformation_get_sitename(PyObject *obj, void *closure)
   20992             : {
   20993           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   20994           0 :         PyObject *py_sitename;
   20995           0 :         if (object->sitename == NULL) {
   20996           0 :                 Py_RETURN_NONE;
   20997             :         }
   20998           0 :         if (object->sitename == NULL) {
   20999           0 :                 py_sitename = Py_None;
   21000           0 :                 Py_INCREF(py_sitename);
   21001             :         } else {
   21002           0 :                 if (object->sitename == NULL) {
   21003           0 :                         py_sitename = Py_None;
   21004           0 :                         Py_INCREF(py_sitename);
   21005             :                 } else {
   21006           0 :                         py_sitename = PyUnicode_Decode(object->sitename, strlen(object->sitename), "utf-8", "ignore");
   21007             :                 }
   21008             :         }
   21009           0 :         return py_sitename;
   21010             : }
   21011             : 
   21012           0 : static int py_netr_WorkstationInformation_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
   21013             : {
   21014           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21015           0 :         if (value == NULL) {
   21016           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sitename");
   21017           0 :                 return -1;
   21018             :         }
   21019           0 :         if (value == Py_None) {
   21020           0 :                 object->sitename = NULL;
   21021             :         } else {
   21022           0 :                 object->sitename = NULL;
   21023             :                 {
   21024           0 :                         const char *test_str;
   21025           0 :                         const char *talloc_str;
   21026           0 :                         PyObject *unicode = NULL;
   21027           0 :                         if (PyUnicode_Check(value)) {
   21028           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21029           0 :                                 if (unicode == NULL) {
   21030           0 :                                         return -1;
   21031             :                                 }
   21032           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21033           0 :                         } else if (PyBytes_Check(value)) {
   21034           0 :                                 test_str = PyBytes_AS_STRING(value);
   21035             :                         } else {
   21036           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21037           0 :                                 return -1;
   21038             :                         }
   21039           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21040           0 :                         if (unicode != NULL) {
   21041           0 :                                 Py_DECREF(unicode);
   21042             :                         }
   21043           0 :                         if (talloc_str == NULL) {
   21044           0 :                                 PyErr_NoMemory();
   21045           0 :                                 return -1;
   21046             :                         }
   21047           0 :                         object->sitename = talloc_str;
   21048             :                 }
   21049             :         }
   21050           0 :         return 0;
   21051             : }
   21052             : 
   21053           0 : static PyObject *py_netr_WorkstationInformation_get_dummy1(PyObject *obj, void *closure)
   21054             : {
   21055           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21056           0 :         PyObject *py_dummy1;
   21057           0 :         if (object->dummy1 == NULL) {
   21058           0 :                 Py_RETURN_NONE;
   21059             :         }
   21060           0 :         if (object->dummy1 == NULL) {
   21061           0 :                 py_dummy1 = Py_None;
   21062           0 :                 Py_INCREF(py_dummy1);
   21063             :         } else {
   21064           0 :                 if (object->dummy1 == NULL) {
   21065           0 :                         py_dummy1 = Py_None;
   21066           0 :                         Py_INCREF(py_dummy1);
   21067             :                 } else {
   21068           0 :                         py_dummy1 = PyUnicode_Decode(object->dummy1, strlen(object->dummy1), "utf-8", "ignore");
   21069             :                 }
   21070             :         }
   21071           0 :         return py_dummy1;
   21072             : }
   21073             : 
   21074           0 : static int py_netr_WorkstationInformation_set_dummy1(PyObject *py_obj, PyObject *value, void *closure)
   21075             : {
   21076           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21077           0 :         if (value == NULL) {
   21078           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy1");
   21079           0 :                 return -1;
   21080             :         }
   21081           0 :         if (value == Py_None) {
   21082           0 :                 object->dummy1 = NULL;
   21083             :         } else {
   21084           0 :                 object->dummy1 = NULL;
   21085             :                 {
   21086           0 :                         const char *test_str;
   21087           0 :                         const char *talloc_str;
   21088           0 :                         PyObject *unicode = NULL;
   21089           0 :                         if (PyUnicode_Check(value)) {
   21090           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21091           0 :                                 if (unicode == NULL) {
   21092           0 :                                         return -1;
   21093             :                                 }
   21094           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21095           0 :                         } else if (PyBytes_Check(value)) {
   21096           0 :                                 test_str = PyBytes_AS_STRING(value);
   21097             :                         } else {
   21098           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21099           0 :                                 return -1;
   21100             :                         }
   21101           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21102           0 :                         if (unicode != NULL) {
   21103           0 :                                 Py_DECREF(unicode);
   21104             :                         }
   21105           0 :                         if (talloc_str == NULL) {
   21106           0 :                                 PyErr_NoMemory();
   21107           0 :                                 return -1;
   21108             :                         }
   21109           0 :                         object->dummy1 = talloc_str;
   21110             :                 }
   21111             :         }
   21112           0 :         return 0;
   21113             : }
   21114             : 
   21115           0 : static PyObject *py_netr_WorkstationInformation_get_dummy2(PyObject *obj, void *closure)
   21116             : {
   21117           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21118           0 :         PyObject *py_dummy2;
   21119           0 :         if (object->dummy2 == NULL) {
   21120           0 :                 Py_RETURN_NONE;
   21121             :         }
   21122           0 :         if (object->dummy2 == NULL) {
   21123           0 :                 py_dummy2 = Py_None;
   21124           0 :                 Py_INCREF(py_dummy2);
   21125             :         } else {
   21126           0 :                 if (object->dummy2 == NULL) {
   21127           0 :                         py_dummy2 = Py_None;
   21128           0 :                         Py_INCREF(py_dummy2);
   21129             :                 } else {
   21130           0 :                         py_dummy2 = PyUnicode_Decode(object->dummy2, strlen(object->dummy2), "utf-8", "ignore");
   21131             :                 }
   21132             :         }
   21133           0 :         return py_dummy2;
   21134             : }
   21135             : 
   21136           0 : static int py_netr_WorkstationInformation_set_dummy2(PyObject *py_obj, PyObject *value, void *closure)
   21137             : {
   21138           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21139           0 :         if (value == NULL) {
   21140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy2");
   21141           0 :                 return -1;
   21142             :         }
   21143           0 :         if (value == Py_None) {
   21144           0 :                 object->dummy2 = NULL;
   21145             :         } else {
   21146           0 :                 object->dummy2 = NULL;
   21147             :                 {
   21148           0 :                         const char *test_str;
   21149           0 :                         const char *talloc_str;
   21150           0 :                         PyObject *unicode = NULL;
   21151           0 :                         if (PyUnicode_Check(value)) {
   21152           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21153           0 :                                 if (unicode == NULL) {
   21154           0 :                                         return -1;
   21155             :                                 }
   21156           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21157           0 :                         } else if (PyBytes_Check(value)) {
   21158           0 :                                 test_str = PyBytes_AS_STRING(value);
   21159             :                         } else {
   21160           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21161           0 :                                 return -1;
   21162             :                         }
   21163           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21164           0 :                         if (unicode != NULL) {
   21165           0 :                                 Py_DECREF(unicode);
   21166             :                         }
   21167           0 :                         if (talloc_str == NULL) {
   21168           0 :                                 PyErr_NoMemory();
   21169           0 :                                 return -1;
   21170             :                         }
   21171           0 :                         object->dummy2 = talloc_str;
   21172             :                 }
   21173             :         }
   21174           0 :         return 0;
   21175             : }
   21176             : 
   21177           0 : static PyObject *py_netr_WorkstationInformation_get_dummy3(PyObject *obj, void *closure)
   21178             : {
   21179           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21180           0 :         PyObject *py_dummy3;
   21181           0 :         if (object->dummy3 == NULL) {
   21182           0 :                 Py_RETURN_NONE;
   21183             :         }
   21184           0 :         if (object->dummy3 == NULL) {
   21185           0 :                 py_dummy3 = Py_None;
   21186           0 :                 Py_INCREF(py_dummy3);
   21187             :         } else {
   21188           0 :                 if (object->dummy3 == NULL) {
   21189           0 :                         py_dummy3 = Py_None;
   21190           0 :                         Py_INCREF(py_dummy3);
   21191             :                 } else {
   21192           0 :                         py_dummy3 = PyUnicode_Decode(object->dummy3, strlen(object->dummy3), "utf-8", "ignore");
   21193             :                 }
   21194             :         }
   21195           0 :         return py_dummy3;
   21196             : }
   21197             : 
   21198           0 : static int py_netr_WorkstationInformation_set_dummy3(PyObject *py_obj, PyObject *value, void *closure)
   21199             : {
   21200           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21201           0 :         if (value == NULL) {
   21202           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy3");
   21203           0 :                 return -1;
   21204             :         }
   21205           0 :         if (value == Py_None) {
   21206           0 :                 object->dummy3 = NULL;
   21207             :         } else {
   21208           0 :                 object->dummy3 = NULL;
   21209             :                 {
   21210           0 :                         const char *test_str;
   21211           0 :                         const char *talloc_str;
   21212           0 :                         PyObject *unicode = NULL;
   21213           0 :                         if (PyUnicode_Check(value)) {
   21214           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21215           0 :                                 if (unicode == NULL) {
   21216           0 :                                         return -1;
   21217             :                                 }
   21218           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21219           0 :                         } else if (PyBytes_Check(value)) {
   21220           0 :                                 test_str = PyBytes_AS_STRING(value);
   21221             :                         } else {
   21222           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21223           0 :                                 return -1;
   21224             :                         }
   21225           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21226           0 :                         if (unicode != NULL) {
   21227           0 :                                 Py_DECREF(unicode);
   21228             :                         }
   21229           0 :                         if (talloc_str == NULL) {
   21230           0 :                                 PyErr_NoMemory();
   21231           0 :                                 return -1;
   21232             :                         }
   21233           0 :                         object->dummy3 = talloc_str;
   21234             :                 }
   21235             :         }
   21236           0 :         return 0;
   21237             : }
   21238             : 
   21239           0 : static PyObject *py_netr_WorkstationInformation_get_dummy4(PyObject *obj, void *closure)
   21240             : {
   21241           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21242           0 :         PyObject *py_dummy4;
   21243           0 :         if (object->dummy4 == NULL) {
   21244           0 :                 Py_RETURN_NONE;
   21245             :         }
   21246           0 :         if (object->dummy4 == NULL) {
   21247           0 :                 py_dummy4 = Py_None;
   21248           0 :                 Py_INCREF(py_dummy4);
   21249             :         } else {
   21250           0 :                 if (object->dummy4 == NULL) {
   21251           0 :                         py_dummy4 = Py_None;
   21252           0 :                         Py_INCREF(py_dummy4);
   21253             :                 } else {
   21254           0 :                         py_dummy4 = PyUnicode_Decode(object->dummy4, strlen(object->dummy4), "utf-8", "ignore");
   21255             :                 }
   21256             :         }
   21257           0 :         return py_dummy4;
   21258             : }
   21259             : 
   21260           0 : static int py_netr_WorkstationInformation_set_dummy4(PyObject *py_obj, PyObject *value, void *closure)
   21261             : {
   21262           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21263           0 :         if (value == NULL) {
   21264           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy4");
   21265           0 :                 return -1;
   21266             :         }
   21267           0 :         if (value == Py_None) {
   21268           0 :                 object->dummy4 = NULL;
   21269             :         } else {
   21270           0 :                 object->dummy4 = NULL;
   21271             :                 {
   21272           0 :                         const char *test_str;
   21273           0 :                         const char *talloc_str;
   21274           0 :                         PyObject *unicode = NULL;
   21275           0 :                         if (PyUnicode_Check(value)) {
   21276           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21277           0 :                                 if (unicode == NULL) {
   21278           0 :                                         return -1;
   21279             :                                 }
   21280           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21281           0 :                         } else if (PyBytes_Check(value)) {
   21282           0 :                                 test_str = PyBytes_AS_STRING(value);
   21283             :                         } else {
   21284           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21285           0 :                                 return -1;
   21286             :                         }
   21287           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21288           0 :                         if (unicode != NULL) {
   21289           0 :                                 Py_DECREF(unicode);
   21290             :                         }
   21291           0 :                         if (talloc_str == NULL) {
   21292           0 :                                 PyErr_NoMemory();
   21293           0 :                                 return -1;
   21294             :                         }
   21295           0 :                         object->dummy4 = talloc_str;
   21296             :                 }
   21297             :         }
   21298           0 :         return 0;
   21299             : }
   21300             : 
   21301           0 : static PyObject *py_netr_WorkstationInformation_get_os_version(PyObject *obj, void *closure)
   21302             : {
   21303           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21304           0 :         PyObject *py_os_version;
   21305           0 :         py_os_version = pytalloc_reference_ex(&netr_OsVersionContainer_Type, pytalloc_get_mem_ctx(obj), &object->os_version);
   21306           0 :         return py_os_version;
   21307             : }
   21308             : 
   21309           0 : static int py_netr_WorkstationInformation_set_os_version(PyObject *py_obj, PyObject *value, void *closure)
   21310             : {
   21311           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21312           0 :         if (value == NULL) {
   21313           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->os_version");
   21314           0 :                 return -1;
   21315             :         }
   21316           0 :         PY_CHECK_TYPE(&netr_OsVersionContainer_Type, value, return -1;);
   21317           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21318           0 :                 PyErr_NoMemory();
   21319           0 :                 return -1;
   21320             :         }
   21321           0 :         object->os_version = *(struct netr_OsVersionContainer *)pytalloc_get_ptr(value);
   21322           0 :         return 0;
   21323             : }
   21324             : 
   21325           0 : static PyObject *py_netr_WorkstationInformation_get_os_name(PyObject *obj, void *closure)
   21326             : {
   21327           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21328           0 :         PyObject *py_os_name;
   21329           0 :         py_os_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->os_name);
   21330           0 :         return py_os_name;
   21331             : }
   21332             : 
   21333          21 : static int py_netr_WorkstationInformation_set_os_name(PyObject *py_obj, PyObject *value, void *closure)
   21334             : {
   21335          21 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21336          21 :         if (value == NULL) {
   21337           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->os_name");
   21338           0 :                 return -1;
   21339             :         }
   21340          21 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   21341          21 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21342           0 :                 PyErr_NoMemory();
   21343           0 :                 return -1;
   21344             :         }
   21345          21 :         object->os_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   21346          21 :         return 0;
   21347             : }
   21348             : 
   21349           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_string3(PyObject *obj, void *closure)
   21350             : {
   21351           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21352           0 :         PyObject *py_dummy_string3;
   21353           0 :         py_dummy_string3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
   21354           0 :         return py_dummy_string3;
   21355             : }
   21356             : 
   21357           0 : static int py_netr_WorkstationInformation_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
   21358             : {
   21359           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21360           0 :         if (value == NULL) {
   21361           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string3");
   21362           0 :                 return -1;
   21363             :         }
   21364           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   21365           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21366           0 :                 PyErr_NoMemory();
   21367           0 :                 return -1;
   21368             :         }
   21369           0 :         object->dummy_string3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   21370           0 :         return 0;
   21371             : }
   21372             : 
   21373           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_string4(PyObject *obj, void *closure)
   21374             : {
   21375           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21376           0 :         PyObject *py_dummy_string4;
   21377           0 :         py_dummy_string4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
   21378           0 :         return py_dummy_string4;
   21379             : }
   21380             : 
   21381           0 : static int py_netr_WorkstationInformation_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
   21382             : {
   21383           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21384           0 :         if (value == NULL) {
   21385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string4");
   21386           0 :                 return -1;
   21387             :         }
   21388           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   21389           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21390           0 :                 PyErr_NoMemory();
   21391           0 :                 return -1;
   21392             :         }
   21393           0 :         object->dummy_string4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   21394           0 :         return 0;
   21395             : }
   21396             : 
   21397           0 : static PyObject *py_netr_WorkstationInformation_get_workstation_flags(PyObject *obj, void *closure)
   21398             : {
   21399           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21400           0 :         PyObject *py_workstation_flags;
   21401           0 :         py_workstation_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->workstation_flags));
   21402           0 :         return py_workstation_flags;
   21403             : }
   21404             : 
   21405           3 : static int py_netr_WorkstationInformation_set_workstation_flags(PyObject *py_obj, PyObject *value, void *closure)
   21406             : {
   21407           3 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21408           3 :         if (value == NULL) {
   21409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->workstation_flags");
   21410           0 :                 return -1;
   21411             :         }
   21412             :         {
   21413           3 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->workstation_flags));
   21414           3 :                 if (PyLong_Check(value)) {
   21415           0 :                         unsigned long long test_var;
   21416           3 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21417           3 :                         if (PyErr_Occurred() != NULL) {
   21418           0 :                                 return -1;
   21419             :                         }
   21420           3 :                         if (test_var > uint_max) {
   21421           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21422             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21423           0 :                                 return -1;
   21424             :                         }
   21425           3 :                         object->workstation_flags = test_var;
   21426             :                 } else {
   21427           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21428             :                           PyLong_Type.tp_name);
   21429           0 :                         return -1;
   21430             :                 }
   21431             :         }
   21432           3 :         return 0;
   21433             : }
   21434             : 
   21435           0 : static PyObject *py_netr_WorkstationInformation_get_supported_enc_types(PyObject *obj, void *closure)
   21436             : {
   21437           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21438           0 :         PyObject *py_supported_enc_types;
   21439           0 :         py_supported_enc_types = PyLong_FromUnsignedLongLong((uint32_t)(object->supported_enc_types));
   21440           0 :         return py_supported_enc_types;
   21441             : }
   21442             : 
   21443           0 : static int py_netr_WorkstationInformation_set_supported_enc_types(PyObject *py_obj, PyObject *value, void *closure)
   21444             : {
   21445           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21446           0 :         if (value == NULL) {
   21447           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->supported_enc_types");
   21448           0 :                 return -1;
   21449             :         }
   21450             :         {
   21451           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_enc_types));
   21452           0 :                 if (PyLong_Check(value)) {
   21453           0 :                         unsigned long long test_var;
   21454           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21455           0 :                         if (PyErr_Occurred() != NULL) {
   21456           0 :                                 return -1;
   21457             :                         }
   21458           0 :                         if (test_var > uint_max) {
   21459           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21460             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21461           0 :                                 return -1;
   21462             :                         }
   21463           0 :                         object->supported_enc_types = test_var;
   21464             :                 } else {
   21465           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21466             :                           PyLong_Type.tp_name);
   21467           0 :                         return -1;
   21468             :                 }
   21469             :         }
   21470           0 :         return 0;
   21471             : }
   21472             : 
   21473           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_long3(PyObject *obj, void *closure)
   21474             : {
   21475           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21476           0 :         PyObject *py_dummy_long3;
   21477           0 :         py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long3));
   21478           0 :         return py_dummy_long3;
   21479             : }
   21480             : 
   21481           0 : static int py_netr_WorkstationInformation_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
   21482             : {
   21483           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21484           0 :         if (value == NULL) {
   21485           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long3");
   21486           0 :                 return -1;
   21487             :         }
   21488             :         {
   21489           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
   21490           0 :                 if (PyLong_Check(value)) {
   21491           0 :                         unsigned long long test_var;
   21492           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21493           0 :                         if (PyErr_Occurred() != NULL) {
   21494           0 :                                 return -1;
   21495             :                         }
   21496           0 :                         if (test_var > uint_max) {
   21497           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21498             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21499           0 :                                 return -1;
   21500             :                         }
   21501           0 :                         object->dummy_long3 = test_var;
   21502             :                 } else {
   21503           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21504             :                           PyLong_Type.tp_name);
   21505           0 :                         return -1;
   21506             :                 }
   21507             :         }
   21508           0 :         return 0;
   21509             : }
   21510             : 
   21511           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_long4(PyObject *obj, void *closure)
   21512             : {
   21513           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
   21514           0 :         PyObject *py_dummy_long4;
   21515           0 :         py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long4));
   21516           0 :         return py_dummy_long4;
   21517             : }
   21518             : 
   21519           0 : static int py_netr_WorkstationInformation_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
   21520             : {
   21521           0 :         struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
   21522           0 :         if (value == NULL) {
   21523           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long4");
   21524           0 :                 return -1;
   21525             :         }
   21526             :         {
   21527           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
   21528           0 :                 if (PyLong_Check(value)) {
   21529           0 :                         unsigned long long test_var;
   21530           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21531           0 :                         if (PyErr_Occurred() != NULL) {
   21532           0 :                                 return -1;
   21533             :                         }
   21534           0 :                         if (test_var > uint_max) {
   21535           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21536             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21537           0 :                                 return -1;
   21538             :                         }
   21539           0 :                         object->dummy_long4 = test_var;
   21540             :                 } else {
   21541           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21542             :                           PyLong_Type.tp_name);
   21543           0 :                         return -1;
   21544             :                 }
   21545             :         }
   21546           0 :         return 0;
   21547             : }
   21548             : 
   21549             : static PyGetSetDef py_netr_WorkstationInformation_getsetters[] = {
   21550             :         {
   21551             :                 .name = discard_const_p(char, "lsa_policy"),
   21552             :                 .get = py_netr_WorkstationInformation_get_lsa_policy,
   21553             :                 .set = py_netr_WorkstationInformation_set_lsa_policy,
   21554             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LsaPolicyInformation")
   21555             :         },
   21556             :         {
   21557             :                 .name = discard_const_p(char, "dns_hostname"),
   21558             :                 .get = py_netr_WorkstationInformation_get_dns_hostname,
   21559             :                 .set = py_netr_WorkstationInformation_set_dns_hostname,
   21560             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21561             :         },
   21562             :         {
   21563             :                 .name = discard_const_p(char, "sitename"),
   21564             :                 .get = py_netr_WorkstationInformation_get_sitename,
   21565             :                 .set = py_netr_WorkstationInformation_set_sitename,
   21566             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21567             :         },
   21568             :         {
   21569             :                 .name = discard_const_p(char, "dummy1"),
   21570             :                 .get = py_netr_WorkstationInformation_get_dummy1,
   21571             :                 .set = py_netr_WorkstationInformation_set_dummy1,
   21572             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21573             :         },
   21574             :         {
   21575             :                 .name = discard_const_p(char, "dummy2"),
   21576             :                 .get = py_netr_WorkstationInformation_get_dummy2,
   21577             :                 .set = py_netr_WorkstationInformation_set_dummy2,
   21578             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21579             :         },
   21580             :         {
   21581             :                 .name = discard_const_p(char, "dummy3"),
   21582             :                 .get = py_netr_WorkstationInformation_get_dummy3,
   21583             :                 .set = py_netr_WorkstationInformation_set_dummy3,
   21584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21585             :         },
   21586             :         {
   21587             :                 .name = discard_const_p(char, "dummy4"),
   21588             :                 .get = py_netr_WorkstationInformation_get_dummy4,
   21589             :                 .set = py_netr_WorkstationInformation_set_dummy4,
   21590             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21591             :         },
   21592             :         {
   21593             :                 .name = discard_const_p(char, "os_version"),
   21594             :                 .get = py_netr_WorkstationInformation_get_os_version,
   21595             :                 .set = py_netr_WorkstationInformation_set_os_version,
   21596             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersionContainer")
   21597             :         },
   21598             :         {
   21599             :                 .name = discard_const_p(char, "os_name"),
   21600             :                 .get = py_netr_WorkstationInformation_get_os_name,
   21601             :                 .set = py_netr_WorkstationInformation_set_os_name,
   21602             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   21603             :         },
   21604             :         {
   21605             :                 .name = discard_const_p(char, "dummy_string3"),
   21606             :                 .get = py_netr_WorkstationInformation_get_dummy_string3,
   21607             :                 .set = py_netr_WorkstationInformation_set_dummy_string3,
   21608             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   21609             :         },
   21610             :         {
   21611             :                 .name = discard_const_p(char, "dummy_string4"),
   21612             :                 .get = py_netr_WorkstationInformation_get_dummy_string4,
   21613             :                 .set = py_netr_WorkstationInformation_set_dummy_string4,
   21614             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   21615             :         },
   21616             :         {
   21617             :                 .name = discard_const_p(char, "workstation_flags"),
   21618             :                 .get = py_netr_WorkstationInformation_get_workstation_flags,
   21619             :                 .set = py_netr_WorkstationInformation_set_workstation_flags,
   21620             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationFlags")
   21621             :         },
   21622             :         {
   21623             :                 .name = discard_const_p(char, "supported_enc_types"),
   21624             :                 .get = py_netr_WorkstationInformation_get_supported_enc_types,
   21625             :                 .set = py_netr_WorkstationInformation_set_supported_enc_types,
   21626             :                 .doc = discard_const_p(char, "PIDL-generated element of base type kerb_EncTypes")
   21627             :         },
   21628             :         {
   21629             :                 .name = discard_const_p(char, "dummy_long3"),
   21630             :                 .get = py_netr_WorkstationInformation_get_dummy_long3,
   21631             :                 .set = py_netr_WorkstationInformation_set_dummy_long3,
   21632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21633             :         },
   21634             :         {
   21635             :                 .name = discard_const_p(char, "dummy_long4"),
   21636             :                 .get = py_netr_WorkstationInformation_get_dummy_long4,
   21637             :                 .set = py_netr_WorkstationInformation_set_dummy_long4,
   21638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21639             :         },
   21640             :         { .name = NULL }
   21641             : };
   21642             : 
   21643          31 : static PyObject *py_netr_WorkstationInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21644             : {
   21645          31 :         return pytalloc_new(struct netr_WorkstationInformation, type);
   21646             : }
   21647             : 
   21648             : 
   21649             : static PyTypeObject netr_WorkstationInformation_Type = {
   21650             :         PyVarObject_HEAD_INIT(NULL, 0)
   21651             :         .tp_name = "netlogon.netr_WorkstationInformation",
   21652             :         .tp_getset = py_netr_WorkstationInformation_getsetters,
   21653             :         .tp_methods = NULL,
   21654             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21655             :         .tp_new = py_netr_WorkstationInformation_new,
   21656             : };
   21657             : 
   21658           0 : static PyObject *py_import_netr_WorkstationInfo(TALLOC_CTX *mem_ctx, int level, union netr_WorkstationInfo *in)
   21659             : {
   21660           0 :         PyObject *ret;
   21661             : 
   21662           0 :         switch (level) {
   21663           0 :                 case 1:
   21664           0 :                         if (in->workstation_info == NULL) {
   21665           0 :                                 ret = Py_None;
   21666           0 :                                 Py_INCREF(ret);
   21667             :                         } else {
   21668           0 :                                 ret = pytalloc_reference_ex(&netr_WorkstationInformation_Type, in->workstation_info, in->workstation_info);
   21669             :                         }
   21670           0 :                         return ret;
   21671             : 
   21672           0 :                 case 2:
   21673           0 :                         if (in->lsa_policy_info == NULL) {
   21674           0 :                                 ret = Py_None;
   21675           0 :                                 Py_INCREF(ret);
   21676             :                         } else {
   21677           0 :                                 ret = pytalloc_reference_ex(&netr_WorkstationInformation_Type, in->lsa_policy_info, in->lsa_policy_info);
   21678             :                         }
   21679           0 :                         return ret;
   21680             : 
   21681             :         }
   21682           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   21683           0 :         return NULL;
   21684             : }
   21685             : 
   21686          31 : static union netr_WorkstationInfo *py_export_netr_WorkstationInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   21687             : {
   21688          31 :         union netr_WorkstationInfo *ret = talloc_zero(mem_ctx, union netr_WorkstationInfo);
   21689          31 :         switch (level) {
   21690          21 :                 case 1:
   21691          21 :                         if (in == NULL) {
   21692           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->workstation_info");
   21693           0 :                                 talloc_free(ret); return NULL;
   21694             :                         }
   21695          21 :                         if (in == Py_None) {
   21696           0 :                                 ret->workstation_info = NULL;
   21697             :                         } else {
   21698          21 :                                 ret->workstation_info = NULL;
   21699          21 :                                 PY_CHECK_TYPE(&netr_WorkstationInformation_Type, in, talloc_free(ret); return NULL;);
   21700          21 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   21701           0 :                                         PyErr_NoMemory();
   21702           0 :                                         talloc_free(ret); return NULL;
   21703             :                                 }
   21704          21 :                                 ret->workstation_info = (struct netr_WorkstationInformation *)pytalloc_get_ptr(in);
   21705             :                         }
   21706          21 :                         break;
   21707             : 
   21708          10 :                 case 2:
   21709          10 :                         if (in == NULL) {
   21710           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->lsa_policy_info");
   21711           0 :                                 talloc_free(ret); return NULL;
   21712             :                         }
   21713          10 :                         if (in == Py_None) {
   21714           0 :                                 ret->lsa_policy_info = NULL;
   21715             :                         } else {
   21716          10 :                                 ret->lsa_policy_info = NULL;
   21717          10 :                                 PY_CHECK_TYPE(&netr_WorkstationInformation_Type, in, talloc_free(ret); return NULL;);
   21718          10 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   21719           0 :                                         PyErr_NoMemory();
   21720           0 :                                         talloc_free(ret); return NULL;
   21721             :                                 }
   21722          10 :                                 ret->lsa_policy_info = (struct netr_WorkstationInformation *)pytalloc_get_ptr(in);
   21723             :                         }
   21724          10 :                         break;
   21725             : 
   21726           0 :                 default:
   21727           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   21728           0 :                         talloc_free(ret);
   21729           0 :                         ret = NULL;
   21730             :         }
   21731             : 
   21732          31 :         return ret;
   21733             : }
   21734             : 
   21735           0 : static PyObject *py_netr_WorkstationInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21736             : {
   21737           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   21738           0 :         PyObject *mem_ctx_obj = NULL;
   21739           0 :         TALLOC_CTX *mem_ctx = NULL;
   21740           0 :         int level = 0;
   21741           0 :         PyObject *in_obj = NULL;
   21742           0 :         union netr_WorkstationInfo *in = NULL;
   21743             : 
   21744           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   21745             :                 discard_const_p(char *, kwnames),
   21746             :                 &mem_ctx_obj,
   21747             :                 &level,
   21748             :                 &in_obj)) {
   21749           0 :                 return NULL;
   21750             :         }
   21751           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   21752           0 :         if (mem_ctx == NULL) {
   21753           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   21754           0 :                 return NULL;
   21755             :         }
   21756           0 :         in = (union netr_WorkstationInfo *)pytalloc_get_ptr(in_obj);
   21757           0 :         if (in == NULL) {
   21758           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_WorkstationInfo!");
   21759           0 :                 return NULL;
   21760             :         }
   21761             : 
   21762           0 :         return py_import_netr_WorkstationInfo(mem_ctx, level, in);
   21763             : }
   21764             : 
   21765          31 : static PyObject *py_netr_WorkstationInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21766             : {
   21767          31 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   21768          31 :         PyObject *mem_ctx_obj = NULL;
   21769          31 :         TALLOC_CTX *mem_ctx = NULL;
   21770          31 :         int level = 0;
   21771          31 :         PyObject *in = NULL;
   21772          31 :         union netr_WorkstationInfo *out = NULL;
   21773             : 
   21774          31 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   21775             :                 discard_const_p(char *, kwnames),
   21776             :                 &mem_ctx_obj,
   21777             :                 &level,
   21778             :                 &in)) {
   21779           0 :                 return NULL;
   21780             :         }
   21781          31 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   21782          31 :         if (mem_ctx == NULL) {
   21783           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   21784           0 :                 return NULL;
   21785             :         }
   21786             : 
   21787          31 :         out = py_export_netr_WorkstationInfo(mem_ctx, level, in);
   21788          31 :         if (out == NULL) {
   21789           0 :                 return NULL;
   21790             :         }
   21791             : 
   21792          31 :         return pytalloc_GenericObject_reference(out);
   21793             : }
   21794             : 
   21795             : static PyMethodDef py_netr_WorkstationInfo_methods[] = {
   21796             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_WorkstationInfo_import),
   21797             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   21798             :                 "T.__import__(mem_ctx, level, in) => ret." },
   21799             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_WorkstationInfo_export),
   21800             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   21801             :                 "T.__export__(mem_ctx, level, in) => ret." },
   21802             :         { NULL, NULL, 0, NULL }
   21803             : };
   21804             : 
   21805           0 : static PyObject *py_netr_WorkstationInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21806             : {
   21807           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   21808           0 :         return NULL;
   21809             : }
   21810             : 
   21811             : 
   21812             : static PyTypeObject netr_WorkstationInfo_Type = {
   21813             :         PyVarObject_HEAD_INIT(NULL, 0)
   21814             :         .tp_name = "netlogon.netr_WorkstationInfo",
   21815             :         .tp_getset = NULL,
   21816             :         .tp_methods = py_netr_WorkstationInfo_methods,
   21817             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21818             :         .tp_new = py_netr_WorkstationInfo_new,
   21819             : };
   21820             : 
   21821             : 
   21822           0 : static PyObject *py_netr_trust_extension_info_get_flags(PyObject *obj, void *closure)
   21823             : {
   21824           0 :         struct netr_trust_extension_info *object = pytalloc_get_ptr(obj);
   21825           0 :         PyObject *py_flags;
   21826           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   21827           0 :         return py_flags;
   21828             : }
   21829             : 
   21830           0 : static int py_netr_trust_extension_info_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   21831             : {
   21832           0 :         struct netr_trust_extension_info *object = pytalloc_get_ptr(py_obj);
   21833           0 :         if (value == NULL) {
   21834           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
   21835           0 :                 return -1;
   21836             :         }
   21837             :         {
   21838           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   21839           0 :                 if (PyLong_Check(value)) {
   21840           0 :                         unsigned long long test_var;
   21841           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21842           0 :                         if (PyErr_Occurred() != NULL) {
   21843           0 :                                 return -1;
   21844             :                         }
   21845           0 :                         if (test_var > uint_max) {
   21846           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21847             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21848           0 :                                 return -1;
   21849             :                         }
   21850           0 :                         object->flags = test_var;
   21851             :                 } else {
   21852           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21853             :                           PyLong_Type.tp_name);
   21854           0 :                         return -1;
   21855             :                 }
   21856             :         }
   21857           0 :         return 0;
   21858             : }
   21859             : 
   21860           0 : static PyObject *py_netr_trust_extension_info_get_parent_index(PyObject *obj, void *closure)
   21861             : {
   21862           0 :         struct netr_trust_extension_info *object = pytalloc_get_ptr(obj);
   21863           0 :         PyObject *py_parent_index;
   21864           0 :         py_parent_index = PyLong_FromUnsignedLongLong((uint32_t)(object->parent_index));
   21865           0 :         return py_parent_index;
   21866             : }
   21867             : 
   21868           0 : static int py_netr_trust_extension_info_set_parent_index(PyObject *py_obj, PyObject *value, void *closure)
   21869             : {
   21870           0 :         struct netr_trust_extension_info *object = pytalloc_get_ptr(py_obj);
   21871           0 :         if (value == NULL) {
   21872           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->parent_index");
   21873           0 :                 return -1;
   21874             :         }
   21875             :         {
   21876           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parent_index));
   21877           0 :                 if (PyLong_Check(value)) {
   21878           0 :                         unsigned long long test_var;
   21879           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21880           0 :                         if (PyErr_Occurred() != NULL) {
   21881           0 :                                 return -1;
   21882             :                         }
   21883           0 :                         if (test_var > uint_max) {
   21884           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21885             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21886           0 :                                 return -1;
   21887             :                         }
   21888           0 :                         object->parent_index = test_var;
   21889             :                 } else {
   21890           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21891             :                           PyLong_Type.tp_name);
   21892           0 :                         return -1;
   21893             :                 }
   21894             :         }
   21895           0 :         return 0;
   21896             : }
   21897             : 
   21898           0 : static PyObject *py_netr_trust_extension_info_get_trust_type(PyObject *obj, void *closure)
   21899             : {
   21900           0 :         struct netr_trust_extension_info *object = pytalloc_get_ptr(obj);
   21901           0 :         PyObject *py_trust_type;
   21902           0 :         py_trust_type = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_type));
   21903           0 :         return py_trust_type;
   21904             : }
   21905             : 
   21906           0 : static int py_netr_trust_extension_info_set_trust_type(PyObject *py_obj, PyObject *value, void *closure)
   21907             : {
   21908           0 :         struct netr_trust_extension_info *object = pytalloc_get_ptr(py_obj);
   21909           0 :         if (value == NULL) {
   21910           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_type");
   21911           0 :                 return -1;
   21912             :         }
   21913             :         {
   21914           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_type));
   21915           0 :                 if (PyLong_Check(value)) {
   21916           0 :                         unsigned long long test_var;
   21917           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21918           0 :                         if (PyErr_Occurred() != NULL) {
   21919           0 :                                 return -1;
   21920             :                         }
   21921           0 :                         if (test_var > uint_max) {
   21922           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21923             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21924           0 :                                 return -1;
   21925             :                         }
   21926           0 :                         object->trust_type = test_var;
   21927             :                 } else {
   21928           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21929             :                           PyLong_Type.tp_name);
   21930           0 :                         return -1;
   21931             :                 }
   21932             :         }
   21933           0 :         return 0;
   21934             : }
   21935             : 
   21936           0 : static PyObject *py_netr_trust_extension_info_get_trust_attributes(PyObject *obj, void *closure)
   21937             : {
   21938           0 :         struct netr_trust_extension_info *object = pytalloc_get_ptr(obj);
   21939           0 :         PyObject *py_trust_attributes;
   21940           0 :         py_trust_attributes = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_attributes));
   21941           0 :         return py_trust_attributes;
   21942             : }
   21943             : 
   21944           0 : static int py_netr_trust_extension_info_set_trust_attributes(PyObject *py_obj, PyObject *value, void *closure)
   21945             : {
   21946           0 :         struct netr_trust_extension_info *object = pytalloc_get_ptr(py_obj);
   21947           0 :         if (value == NULL) {
   21948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_attributes");
   21949           0 :                 return -1;
   21950             :         }
   21951             :         {
   21952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_attributes));
   21953           0 :                 if (PyLong_Check(value)) {
   21954           0 :                         unsigned long long test_var;
   21955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21956           0 :                         if (PyErr_Occurred() != NULL) {
   21957           0 :                                 return -1;
   21958             :                         }
   21959           0 :                         if (test_var > uint_max) {
   21960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21961             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21962           0 :                                 return -1;
   21963             :                         }
   21964           0 :                         object->trust_attributes = test_var;
   21965             :                 } else {
   21966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21967             :                           PyLong_Type.tp_name);
   21968           0 :                         return -1;
   21969             :                 }
   21970             :         }
   21971           0 :         return 0;
   21972             : }
   21973             : 
   21974             : static PyGetSetDef py_netr_trust_extension_info_getsetters[] = {
   21975             :         {
   21976             :                 .name = discard_const_p(char, "flags"),
   21977             :                 .get = py_netr_trust_extension_info_get_flags,
   21978             :                 .set = py_netr_trust_extension_info_set_flags,
   21979             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
   21980             :         },
   21981             :         {
   21982             :                 .name = discard_const_p(char, "parent_index"),
   21983             :                 .get = py_netr_trust_extension_info_get_parent_index,
   21984             :                 .set = py_netr_trust_extension_info_set_parent_index,
   21985             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21986             :         },
   21987             :         {
   21988             :                 .name = discard_const_p(char, "trust_type"),
   21989             :                 .get = py_netr_trust_extension_info_get_trust_type,
   21990             :                 .set = py_netr_trust_extension_info_set_trust_type,
   21991             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustType")
   21992             :         },
   21993             :         {
   21994             :                 .name = discard_const_p(char, "trust_attributes"),
   21995             :                 .get = py_netr_trust_extension_info_get_trust_attributes,
   21996             :                 .set = py_netr_trust_extension_info_set_trust_attributes,
   21997             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustAttributes")
   21998             :         },
   21999             :         { .name = NULL }
   22000             : };
   22001             : 
   22002           0 : static PyObject *py_netr_trust_extension_info_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22003             : {
   22004           0 :         return pytalloc_new(struct netr_trust_extension_info, type);
   22005             : }
   22006             : 
   22007             : 
   22008             : static PyTypeObject netr_trust_extension_info_Type = {
   22009             :         PyVarObject_HEAD_INIT(NULL, 0)
   22010             :         .tp_name = "netlogon.netr_trust_extension_info",
   22011             :         .tp_getset = py_netr_trust_extension_info_getsetters,
   22012             :         .tp_methods = NULL,
   22013             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22014             :         .tp_new = py_netr_trust_extension_info_new,
   22015             : };
   22016             : 
   22017             : 
   22018           0 : static PyObject *py_netr_trust_extension_get_length(PyObject *obj, void *closure)
   22019             : {
   22020           0 :         struct netr_trust_extension *object = pytalloc_get_ptr(obj);
   22021           0 :         PyObject *py_length;
   22022           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
   22023           0 :         return py_length;
   22024             : }
   22025             : 
   22026           0 : static int py_netr_trust_extension_set_length(PyObject *py_obj, PyObject *value, void *closure)
   22027             : {
   22028           0 :         struct netr_trust_extension *object = pytalloc_get_ptr(py_obj);
   22029           0 :         if (value == NULL) {
   22030           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
   22031           0 :                 return -1;
   22032             :         }
   22033             :         {
   22034           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   22035           0 :                 if (PyLong_Check(value)) {
   22036           0 :                         unsigned long long test_var;
   22037           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22038           0 :                         if (PyErr_Occurred() != NULL) {
   22039           0 :                                 return -1;
   22040             :                         }
   22041           0 :                         if (test_var > uint_max) {
   22042           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22043             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22044           0 :                                 return -1;
   22045             :                         }
   22046           0 :                         object->length = test_var;
   22047             :                 } else {
   22048           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22049             :                           PyLong_Type.tp_name);
   22050           0 :                         return -1;
   22051             :                 }
   22052             :         }
   22053           0 :         return 0;
   22054             : }
   22055             : 
   22056           0 : static PyObject *py_netr_trust_extension_get_dummy(PyObject *obj, void *closure)
   22057             : {
   22058           0 :         struct netr_trust_extension *object = pytalloc_get_ptr(obj);
   22059           0 :         PyObject *py_dummy;
   22060           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy));
   22061           0 :         return py_dummy;
   22062             : }
   22063             : 
   22064           0 : static int py_netr_trust_extension_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
   22065             : {
   22066           0 :         struct netr_trust_extension *object = pytalloc_get_ptr(py_obj);
   22067           0 :         if (value == NULL) {
   22068           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy");
   22069           0 :                 return -1;
   22070             :         }
   22071             :         {
   22072           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
   22073           0 :                 if (PyLong_Check(value)) {
   22074           0 :                         unsigned long long test_var;
   22075           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22076           0 :                         if (PyErr_Occurred() != NULL) {
   22077           0 :                                 return -1;
   22078             :                         }
   22079           0 :                         if (test_var > uint_max) {
   22080           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22081             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22082           0 :                                 return -1;
   22083             :                         }
   22084           0 :                         object->dummy = test_var;
   22085             :                 } else {
   22086           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22087             :                           PyLong_Type.tp_name);
   22088           0 :                         return -1;
   22089             :                 }
   22090             :         }
   22091           0 :         return 0;
   22092             : }
   22093             : 
   22094           0 : static PyObject *py_netr_trust_extension_get_size(PyObject *obj, void *closure)
   22095             : {
   22096           0 :         struct netr_trust_extension *object = pytalloc_get_ptr(obj);
   22097           0 :         PyObject *py_size;
   22098           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
   22099           0 :         return py_size;
   22100             : }
   22101             : 
   22102           0 : static int py_netr_trust_extension_set_size(PyObject *py_obj, PyObject *value, void *closure)
   22103             : {
   22104           0 :         struct netr_trust_extension *object = pytalloc_get_ptr(py_obj);
   22105           0 :         if (value == NULL) {
   22106           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
   22107           0 :                 return -1;
   22108             :         }
   22109             :         {
   22110           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   22111           0 :                 if (PyLong_Check(value)) {
   22112           0 :                         unsigned long long test_var;
   22113           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22114           0 :                         if (PyErr_Occurred() != NULL) {
   22115           0 :                                 return -1;
   22116             :                         }
   22117           0 :                         if (test_var > uint_max) {
   22118           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22119             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22120           0 :                                 return -1;
   22121             :                         }
   22122           0 :                         object->size = test_var;
   22123             :                 } else {
   22124           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22125             :                           PyLong_Type.tp_name);
   22126           0 :                         return -1;
   22127             :                 }
   22128             :         }
   22129           0 :         return 0;
   22130             : }
   22131             : 
   22132           0 : static PyObject *py_netr_trust_extension_get_info(PyObject *obj, void *closure)
   22133             : {
   22134           0 :         struct netr_trust_extension *object = pytalloc_get_ptr(obj);
   22135           0 :         PyObject *py_info;
   22136           0 :         py_info = pytalloc_reference_ex(&netr_trust_extension_info_Type, pytalloc_get_mem_ctx(obj), &object->info);
   22137           0 :         return py_info;
   22138             : }
   22139             : 
   22140           0 : static int py_netr_trust_extension_set_info(PyObject *py_obj, PyObject *value, void *closure)
   22141             : {
   22142           0 :         struct netr_trust_extension *object = pytalloc_get_ptr(py_obj);
   22143           0 :         if (value == NULL) {
   22144           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->info");
   22145           0 :                 return -1;
   22146             :         }
   22147           0 :         PY_CHECK_TYPE(&netr_trust_extension_info_Type, value, return -1;);
   22148           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22149           0 :                 PyErr_NoMemory();
   22150           0 :                 return -1;
   22151             :         }
   22152           0 :         object->info = *(struct netr_trust_extension_info *)pytalloc_get_ptr(value);
   22153           0 :         return 0;
   22154             : }
   22155             : 
   22156             : static PyGetSetDef py_netr_trust_extension_getsetters[] = {
   22157             :         {
   22158             :                 .name = discard_const_p(char, "length"),
   22159             :                 .get = py_netr_trust_extension_get_length,
   22160             :                 .set = py_netr_trust_extension_set_length,
   22161             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   22162             :         },
   22163             :         {
   22164             :                 .name = discard_const_p(char, "dummy"),
   22165             :                 .get = py_netr_trust_extension_get_dummy,
   22166             :                 .set = py_netr_trust_extension_set_dummy,
   22167             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   22168             :         },
   22169             :         {
   22170             :                 .name = discard_const_p(char, "size"),
   22171             :                 .get = py_netr_trust_extension_get_size,
   22172             :                 .set = py_netr_trust_extension_set_size,
   22173             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   22174             :         },
   22175             :         {
   22176             :                 .name = discard_const_p(char, "info"),
   22177             :                 .get = py_netr_trust_extension_get_info,
   22178             :                 .set = py_netr_trust_extension_set_info,
   22179             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension_info")
   22180             :         },
   22181             :         { .name = NULL }
   22182             : };
   22183             : 
   22184           0 : static PyObject *py_netr_trust_extension_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22185             : {
   22186           0 :         return pytalloc_new(struct netr_trust_extension, type);
   22187             : }
   22188             : 
   22189             : 
   22190             : static PyTypeObject netr_trust_extension_Type = {
   22191             :         PyVarObject_HEAD_INIT(NULL, 0)
   22192             :         .tp_name = "netlogon.netr_trust_extension",
   22193             :         .tp_getset = py_netr_trust_extension_getsetters,
   22194             :         .tp_methods = NULL,
   22195             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22196             :         .tp_new = py_netr_trust_extension_new,
   22197             : };
   22198             : 
   22199             : 
   22200           0 : static PyObject *py_netr_trust_extension_container_get_length(PyObject *obj, void *closure)
   22201             : {
   22202           0 :         struct netr_trust_extension_container *object = pytalloc_get_ptr(obj);
   22203           0 :         PyObject *py_length;
   22204           0 :         py_length = PyLong_FromLong((uint16_t)(object->length));
   22205           0 :         return py_length;
   22206             : }
   22207             : 
   22208           0 : static int py_netr_trust_extension_container_set_length(PyObject *py_obj, PyObject *value, void *closure)
   22209             : {
   22210           0 :         struct netr_trust_extension_container *object = pytalloc_get_ptr(py_obj);
   22211           0 :         if (value == NULL) {
   22212           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
   22213           0 :                 return -1;
   22214             :         }
   22215             :         {
   22216           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   22217           0 :                 if (PyLong_Check(value)) {
   22218           0 :                         unsigned long long test_var;
   22219           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22220           0 :                         if (PyErr_Occurred() != NULL) {
   22221           0 :                                 return -1;
   22222             :                         }
   22223           0 :                         if (test_var > uint_max) {
   22224           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22225             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22226           0 :                                 return -1;
   22227             :                         }
   22228           0 :                         object->length = test_var;
   22229             :                 } else {
   22230           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22231             :                           PyLong_Type.tp_name);
   22232           0 :                         return -1;
   22233             :                 }
   22234             :         }
   22235           0 :         return 0;
   22236             : }
   22237             : 
   22238           0 : static PyObject *py_netr_trust_extension_container_get_size(PyObject *obj, void *closure)
   22239             : {
   22240           0 :         struct netr_trust_extension_container *object = pytalloc_get_ptr(obj);
   22241           0 :         PyObject *py_size;
   22242           0 :         py_size = PyLong_FromLong((uint16_t)(object->size));
   22243           0 :         return py_size;
   22244             : }
   22245             : 
   22246           0 : static int py_netr_trust_extension_container_set_size(PyObject *py_obj, PyObject *value, void *closure)
   22247             : {
   22248           0 :         struct netr_trust_extension_container *object = pytalloc_get_ptr(py_obj);
   22249           0 :         if (value == NULL) {
   22250           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
   22251           0 :                 return -1;
   22252             :         }
   22253             :         {
   22254           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   22255           0 :                 if (PyLong_Check(value)) {
   22256           0 :                         unsigned long long test_var;
   22257           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22258           0 :                         if (PyErr_Occurred() != NULL) {
   22259           0 :                                 return -1;
   22260             :                         }
   22261           0 :                         if (test_var > uint_max) {
   22262           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22263             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22264           0 :                                 return -1;
   22265             :                         }
   22266           0 :                         object->size = test_var;
   22267             :                 } else {
   22268           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22269             :                           PyLong_Type.tp_name);
   22270           0 :                         return -1;
   22271             :                 }
   22272             :         }
   22273           0 :         return 0;
   22274             : }
   22275             : 
   22276           0 : static PyObject *py_netr_trust_extension_container_get_info(PyObject *obj, void *closure)
   22277             : {
   22278           0 :         struct netr_trust_extension_container *object = pytalloc_get_ptr(obj);
   22279           0 :         PyObject *py_info;
   22280           0 :         if (object->info == NULL) {
   22281           0 :                 Py_RETURN_NONE;
   22282             :         }
   22283           0 :         if (object->info == NULL) {
   22284           0 :                 py_info = Py_None;
   22285           0 :                 Py_INCREF(py_info);
   22286             :         } else {
   22287           0 :                 py_info = pytalloc_reference_ex(&netr_trust_extension_Type, object->info, object->info);
   22288             :         }
   22289           0 :         return py_info;
   22290             : }
   22291             : 
   22292           0 : static int py_netr_trust_extension_container_set_info(PyObject *py_obj, PyObject *value, void *closure)
   22293             : {
   22294           0 :         struct netr_trust_extension_container *object = pytalloc_get_ptr(py_obj);
   22295           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info));
   22296           0 :         if (value == NULL) {
   22297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->info");
   22298           0 :                 return -1;
   22299             :         }
   22300           0 :         if (value == Py_None) {
   22301           0 :                 object->info = NULL;
   22302             :         } else {
   22303           0 :                 object->info = NULL;
   22304           0 :                 PY_CHECK_TYPE(&netr_trust_extension_Type, value, return -1;);
   22305           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22306           0 :                         PyErr_NoMemory();
   22307           0 :                         return -1;
   22308             :                 }
   22309           0 :                 object->info = (struct netr_trust_extension *)pytalloc_get_ptr(value);
   22310             :         }
   22311           0 :         return 0;
   22312             : }
   22313             : 
   22314             : static PyGetSetDef py_netr_trust_extension_container_getsetters[] = {
   22315             :         {
   22316             :                 .name = discard_const_p(char, "length"),
   22317             :                 .get = py_netr_trust_extension_container_get_length,
   22318             :                 .set = py_netr_trust_extension_container_set_length,
   22319             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   22320             :         },
   22321             :         {
   22322             :                 .name = discard_const_p(char, "size"),
   22323             :                 .get = py_netr_trust_extension_container_get_size,
   22324             :                 .set = py_netr_trust_extension_container_set_size,
   22325             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   22326             :         },
   22327             :         {
   22328             :                 .name = discard_const_p(char, "info"),
   22329             :                 .get = py_netr_trust_extension_container_get_info,
   22330             :                 .set = py_netr_trust_extension_container_set_info,
   22331             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension")
   22332             :         },
   22333             :         { .name = NULL }
   22334             : };
   22335             : 
   22336           0 : static PyObject *py_netr_trust_extension_container_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22337             : {
   22338           0 :         return pytalloc_new(struct netr_trust_extension_container, type);
   22339             : }
   22340             : 
   22341             : 
   22342             : static PyTypeObject netr_trust_extension_container_Type = {
   22343             :         PyVarObject_HEAD_INIT(NULL, 0)
   22344             :         .tp_name = "netlogon.netr_trust_extension_container",
   22345             :         .tp_getset = py_netr_trust_extension_container_getsetters,
   22346             :         .tp_methods = NULL,
   22347             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22348             :         .tp_new = py_netr_trust_extension_container_new,
   22349             : };
   22350             : 
   22351             : 
   22352           0 : static PyObject *py_netr_OneDomainInfo_get_domainname(PyObject *obj, void *closure)
   22353             : {
   22354           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22355           0 :         PyObject *py_domainname;
   22356           0 :         py_domainname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->domainname);
   22357           0 :         return py_domainname;
   22358             : }
   22359             : 
   22360           0 : static int py_netr_OneDomainInfo_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
   22361             : {
   22362           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22363           0 :         if (value == NULL) {
   22364           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domainname");
   22365           0 :                 return -1;
   22366             :         }
   22367           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22368           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22369           0 :                 PyErr_NoMemory();
   22370           0 :                 return -1;
   22371             :         }
   22372           0 :         object->domainname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22373           0 :         return 0;
   22374             : }
   22375             : 
   22376           0 : static PyObject *py_netr_OneDomainInfo_get_dns_domainname(PyObject *obj, void *closure)
   22377             : {
   22378           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22379           0 :         PyObject *py_dns_domainname;
   22380           0 :         py_dns_domainname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_domainname);
   22381           0 :         return py_dns_domainname;
   22382             : }
   22383             : 
   22384           0 : static int py_netr_OneDomainInfo_set_dns_domainname(PyObject *py_obj, PyObject *value, void *closure)
   22385             : {
   22386           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22387           0 :         if (value == NULL) {
   22388           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_domainname");
   22389           0 :                 return -1;
   22390             :         }
   22391           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22392           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22393           0 :                 PyErr_NoMemory();
   22394           0 :                 return -1;
   22395             :         }
   22396           0 :         object->dns_domainname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22397           0 :         return 0;
   22398             : }
   22399             : 
   22400           0 : static PyObject *py_netr_OneDomainInfo_get_dns_forestname(PyObject *obj, void *closure)
   22401             : {
   22402           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22403           0 :         PyObject *py_dns_forestname;
   22404           0 :         py_dns_forestname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_forestname);
   22405           0 :         return py_dns_forestname;
   22406             : }
   22407             : 
   22408           0 : static int py_netr_OneDomainInfo_set_dns_forestname(PyObject *py_obj, PyObject *value, void *closure)
   22409             : {
   22410           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22411           0 :         if (value == NULL) {
   22412           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_forestname");
   22413           0 :                 return -1;
   22414             :         }
   22415           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22416           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22417           0 :                 PyErr_NoMemory();
   22418           0 :                 return -1;
   22419             :         }
   22420           0 :         object->dns_forestname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22421           0 :         return 0;
   22422             : }
   22423             : 
   22424           0 : static PyObject *py_netr_OneDomainInfo_get_domain_guid(PyObject *obj, void *closure)
   22425             : {
   22426           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22427           0 :         PyObject *py_domain_guid;
   22428           0 :         py_domain_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->domain_guid);
   22429           0 :         return py_domain_guid;
   22430             : }
   22431             : 
   22432           0 : static int py_netr_OneDomainInfo_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   22433             : {
   22434           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22435           0 :         if (value == NULL) {
   22436           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_guid");
   22437           0 :                 return -1;
   22438             :         }
   22439           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   22440           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22441           0 :                 PyErr_NoMemory();
   22442           0 :                 return -1;
   22443             :         }
   22444           0 :         object->domain_guid = *(struct GUID *)pytalloc_get_ptr(value);
   22445           0 :         return 0;
   22446             : }
   22447             : 
   22448           0 : static PyObject *py_netr_OneDomainInfo_get_domain_sid(PyObject *obj, void *closure)
   22449             : {
   22450           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22451           0 :         PyObject *py_domain_sid;
   22452           0 :         if (object->domain_sid == NULL) {
   22453           0 :                 Py_RETURN_NONE;
   22454             :         }
   22455           0 :         if (object->domain_sid == NULL) {
   22456           0 :                 py_domain_sid = Py_None;
   22457           0 :                 Py_INCREF(py_domain_sid);
   22458             :         } else {
   22459           0 :                 py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->domain_sid, object->domain_sid);
   22460             :         }
   22461           0 :         return py_domain_sid;
   22462             : }
   22463             : 
   22464           0 : static int py_netr_OneDomainInfo_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
   22465             : {
   22466           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22467           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain_sid));
   22468           0 :         if (value == NULL) {
   22469           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_sid");
   22470           0 :                 return -1;
   22471             :         }
   22472           0 :         if (value == Py_None) {
   22473           0 :                 object->domain_sid = NULL;
   22474             :         } else {
   22475           0 :                 object->domain_sid = NULL;
   22476           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   22477           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22478           0 :                         PyErr_NoMemory();
   22479           0 :                         return -1;
   22480             :                 }
   22481           0 :                 object->domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
   22482             :         }
   22483           0 :         return 0;
   22484             : }
   22485             : 
   22486           0 : static PyObject *py_netr_OneDomainInfo_get_trust_extension(PyObject *obj, void *closure)
   22487             : {
   22488           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22489           0 :         PyObject *py_trust_extension;
   22490           0 :         py_trust_extension = pytalloc_reference_ex(&netr_trust_extension_container_Type, pytalloc_get_mem_ctx(obj), &object->trust_extension);
   22491           0 :         return py_trust_extension;
   22492             : }
   22493             : 
   22494           0 : static int py_netr_OneDomainInfo_set_trust_extension(PyObject *py_obj, PyObject *value, void *closure)
   22495             : {
   22496           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22497           0 :         if (value == NULL) {
   22498           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_extension");
   22499           0 :                 return -1;
   22500             :         }
   22501           0 :         PY_CHECK_TYPE(&netr_trust_extension_container_Type, value, return -1;);
   22502           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22503           0 :                 PyErr_NoMemory();
   22504           0 :                 return -1;
   22505             :         }
   22506           0 :         object->trust_extension = *(struct netr_trust_extension_container *)pytalloc_get_ptr(value);
   22507           0 :         return 0;
   22508             : }
   22509             : 
   22510           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_string2(PyObject *obj, void *closure)
   22511             : {
   22512           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22513           0 :         PyObject *py_dummy_string2;
   22514           0 :         py_dummy_string2 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string2);
   22515           0 :         return py_dummy_string2;
   22516             : }
   22517             : 
   22518           0 : static int py_netr_OneDomainInfo_set_dummy_string2(PyObject *py_obj, PyObject *value, void *closure)
   22519             : {
   22520           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22521           0 :         if (value == NULL) {
   22522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string2");
   22523           0 :                 return -1;
   22524             :         }
   22525           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22526           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22527           0 :                 PyErr_NoMemory();
   22528           0 :                 return -1;
   22529             :         }
   22530           0 :         object->dummy_string2 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22531           0 :         return 0;
   22532             : }
   22533             : 
   22534           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_string3(PyObject *obj, void *closure)
   22535             : {
   22536           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22537           0 :         PyObject *py_dummy_string3;
   22538           0 :         py_dummy_string3 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
   22539           0 :         return py_dummy_string3;
   22540             : }
   22541             : 
   22542           0 : static int py_netr_OneDomainInfo_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
   22543             : {
   22544           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22545           0 :         if (value == NULL) {
   22546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string3");
   22547           0 :                 return -1;
   22548             :         }
   22549           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22550           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22551           0 :                 PyErr_NoMemory();
   22552           0 :                 return -1;
   22553             :         }
   22554           0 :         object->dummy_string3 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22555           0 :         return 0;
   22556             : }
   22557             : 
   22558           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_string4(PyObject *obj, void *closure)
   22559             : {
   22560           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22561           0 :         PyObject *py_dummy_string4;
   22562           0 :         py_dummy_string4 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
   22563           0 :         return py_dummy_string4;
   22564             : }
   22565             : 
   22566           0 : static int py_netr_OneDomainInfo_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
   22567             : {
   22568           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22569           0 :         if (value == NULL) {
   22570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string4");
   22571           0 :                 return -1;
   22572             :         }
   22573           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22574           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22575           0 :                 PyErr_NoMemory();
   22576           0 :                 return -1;
   22577             :         }
   22578           0 :         object->dummy_string4 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22579           0 :         return 0;
   22580             : }
   22581             : 
   22582           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long1(PyObject *obj, void *closure)
   22583             : {
   22584           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22585           0 :         PyObject *py_dummy_long1;
   22586           0 :         py_dummy_long1 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long1));
   22587           0 :         return py_dummy_long1;
   22588             : }
   22589             : 
   22590           0 : static int py_netr_OneDomainInfo_set_dummy_long1(PyObject *py_obj, PyObject *value, void *closure)
   22591             : {
   22592           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22593           0 :         if (value == NULL) {
   22594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long1");
   22595           0 :                 return -1;
   22596             :         }
   22597             :         {
   22598           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long1));
   22599           0 :                 if (PyLong_Check(value)) {
   22600           0 :                         unsigned long long test_var;
   22601           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22602           0 :                         if (PyErr_Occurred() != NULL) {
   22603           0 :                                 return -1;
   22604             :                         }
   22605           0 :                         if (test_var > uint_max) {
   22606           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22607             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22608           0 :                                 return -1;
   22609             :                         }
   22610           0 :                         object->dummy_long1 = test_var;
   22611             :                 } else {
   22612           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22613             :                           PyLong_Type.tp_name);
   22614           0 :                         return -1;
   22615             :                 }
   22616             :         }
   22617           0 :         return 0;
   22618             : }
   22619             : 
   22620           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long2(PyObject *obj, void *closure)
   22621             : {
   22622           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22623           0 :         PyObject *py_dummy_long2;
   22624           0 :         py_dummy_long2 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long2));
   22625           0 :         return py_dummy_long2;
   22626             : }
   22627             : 
   22628           0 : static int py_netr_OneDomainInfo_set_dummy_long2(PyObject *py_obj, PyObject *value, void *closure)
   22629             : {
   22630           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22631           0 :         if (value == NULL) {
   22632           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long2");
   22633           0 :                 return -1;
   22634             :         }
   22635             :         {
   22636           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long2));
   22637           0 :                 if (PyLong_Check(value)) {
   22638           0 :                         unsigned long long test_var;
   22639           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22640           0 :                         if (PyErr_Occurred() != NULL) {
   22641           0 :                                 return -1;
   22642             :                         }
   22643           0 :                         if (test_var > uint_max) {
   22644           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22645             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22646           0 :                                 return -1;
   22647             :                         }
   22648           0 :                         object->dummy_long2 = test_var;
   22649             :                 } else {
   22650           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22651             :                           PyLong_Type.tp_name);
   22652           0 :                         return -1;
   22653             :                 }
   22654             :         }
   22655           0 :         return 0;
   22656             : }
   22657             : 
   22658           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long3(PyObject *obj, void *closure)
   22659             : {
   22660           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22661           0 :         PyObject *py_dummy_long3;
   22662           0 :         py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long3));
   22663           0 :         return py_dummy_long3;
   22664             : }
   22665             : 
   22666           0 : static int py_netr_OneDomainInfo_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
   22667             : {
   22668           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22669           0 :         if (value == NULL) {
   22670           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long3");
   22671           0 :                 return -1;
   22672             :         }
   22673             :         {
   22674           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
   22675           0 :                 if (PyLong_Check(value)) {
   22676           0 :                         unsigned long long test_var;
   22677           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22678           0 :                         if (PyErr_Occurred() != NULL) {
   22679           0 :                                 return -1;
   22680             :                         }
   22681           0 :                         if (test_var > uint_max) {
   22682           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22683             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22684           0 :                                 return -1;
   22685             :                         }
   22686           0 :                         object->dummy_long3 = test_var;
   22687             :                 } else {
   22688           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22689             :                           PyLong_Type.tp_name);
   22690           0 :                         return -1;
   22691             :                 }
   22692             :         }
   22693           0 :         return 0;
   22694             : }
   22695             : 
   22696           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long4(PyObject *obj, void *closure)
   22697             : {
   22698           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
   22699           0 :         PyObject *py_dummy_long4;
   22700           0 :         py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long4));
   22701           0 :         return py_dummy_long4;
   22702             : }
   22703             : 
   22704           0 : static int py_netr_OneDomainInfo_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
   22705             : {
   22706           0 :         struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
   22707           0 :         if (value == NULL) {
   22708           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long4");
   22709           0 :                 return -1;
   22710             :         }
   22711             :         {
   22712           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
   22713           0 :                 if (PyLong_Check(value)) {
   22714           0 :                         unsigned long long test_var;
   22715           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22716           0 :                         if (PyErr_Occurred() != NULL) {
   22717           0 :                                 return -1;
   22718             :                         }
   22719           0 :                         if (test_var > uint_max) {
   22720           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22721             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22722           0 :                                 return -1;
   22723             :                         }
   22724           0 :                         object->dummy_long4 = test_var;
   22725             :                 } else {
   22726           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22727             :                           PyLong_Type.tp_name);
   22728           0 :                         return -1;
   22729             :                 }
   22730             :         }
   22731           0 :         return 0;
   22732             : }
   22733             : 
   22734             : static PyGetSetDef py_netr_OneDomainInfo_getsetters[] = {
   22735             :         {
   22736             :                 .name = discard_const_p(char, "domainname"),
   22737             :                 .get = py_netr_OneDomainInfo_get_domainname,
   22738             :                 .set = py_netr_OneDomainInfo_set_domainname,
   22739             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22740             :         },
   22741             :         {
   22742             :                 .name = discard_const_p(char, "dns_domainname"),
   22743             :                 .get = py_netr_OneDomainInfo_get_dns_domainname,
   22744             :                 .set = py_netr_OneDomainInfo_set_dns_domainname,
   22745             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22746             :         },
   22747             :         {
   22748             :                 .name = discard_const_p(char, "dns_forestname"),
   22749             :                 .get = py_netr_OneDomainInfo_get_dns_forestname,
   22750             :                 .set = py_netr_OneDomainInfo_set_dns_forestname,
   22751             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22752             :         },
   22753             :         {
   22754             :                 .name = discard_const_p(char, "domain_guid"),
   22755             :                 .get = py_netr_OneDomainInfo_get_domain_guid,
   22756             :                 .set = py_netr_OneDomainInfo_set_domain_guid,
   22757             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   22758             :         },
   22759             :         {
   22760             :                 .name = discard_const_p(char, "domain_sid"),
   22761             :                 .get = py_netr_OneDomainInfo_get_domain_sid,
   22762             :                 .set = py_netr_OneDomainInfo_set_domain_sid,
   22763             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
   22764             :         },
   22765             :         {
   22766             :                 .name = discard_const_p(char, "trust_extension"),
   22767             :                 .get = py_netr_OneDomainInfo_get_trust_extension,
   22768             :                 .set = py_netr_OneDomainInfo_set_trust_extension,
   22769             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension_container")
   22770             :         },
   22771             :         {
   22772             :                 .name = discard_const_p(char, "dummy_string2"),
   22773             :                 .get = py_netr_OneDomainInfo_get_dummy_string2,
   22774             :                 .set = py_netr_OneDomainInfo_set_dummy_string2,
   22775             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22776             :         },
   22777             :         {
   22778             :                 .name = discard_const_p(char, "dummy_string3"),
   22779             :                 .get = py_netr_OneDomainInfo_get_dummy_string3,
   22780             :                 .set = py_netr_OneDomainInfo_set_dummy_string3,
   22781             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22782             :         },
   22783             :         {
   22784             :                 .name = discard_const_p(char, "dummy_string4"),
   22785             :                 .get = py_netr_OneDomainInfo_get_dummy_string4,
   22786             :                 .set = py_netr_OneDomainInfo_set_dummy_string4,
   22787             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22788             :         },
   22789             :         {
   22790             :                 .name = discard_const_p(char, "dummy_long1"),
   22791             :                 .get = py_netr_OneDomainInfo_get_dummy_long1,
   22792             :                 .set = py_netr_OneDomainInfo_set_dummy_long1,
   22793             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22794             :         },
   22795             :         {
   22796             :                 .name = discard_const_p(char, "dummy_long2"),
   22797             :                 .get = py_netr_OneDomainInfo_get_dummy_long2,
   22798             :                 .set = py_netr_OneDomainInfo_set_dummy_long2,
   22799             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22800             :         },
   22801             :         {
   22802             :                 .name = discard_const_p(char, "dummy_long3"),
   22803             :                 .get = py_netr_OneDomainInfo_get_dummy_long3,
   22804             :                 .set = py_netr_OneDomainInfo_set_dummy_long3,
   22805             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22806             :         },
   22807             :         {
   22808             :                 .name = discard_const_p(char, "dummy_long4"),
   22809             :                 .get = py_netr_OneDomainInfo_get_dummy_long4,
   22810             :                 .set = py_netr_OneDomainInfo_set_dummy_long4,
   22811             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22812             :         },
   22813             :         { .name = NULL }
   22814             : };
   22815             : 
   22816           0 : static PyObject *py_netr_OneDomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22817             : {
   22818           0 :         return pytalloc_new(struct netr_OneDomainInfo, type);
   22819             : }
   22820             : 
   22821             : 
   22822             : static PyTypeObject netr_OneDomainInfo_Type = {
   22823             :         PyVarObject_HEAD_INIT(NULL, 0)
   22824             :         .tp_name = "netlogon.netr_OneDomainInfo",
   22825             :         .tp_getset = py_netr_OneDomainInfo_getsetters,
   22826             :         .tp_methods = NULL,
   22827             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22828             :         .tp_new = py_netr_OneDomainInfo_new,
   22829             : };
   22830             : 
   22831             : 
   22832           0 : static PyObject *py_netr_DomainInformation_get_primary_domain(PyObject *obj, void *closure)
   22833             : {
   22834           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   22835           0 :         PyObject *py_primary_domain;
   22836           0 :         py_primary_domain = pytalloc_reference_ex(&netr_OneDomainInfo_Type, pytalloc_get_mem_ctx(obj), &object->primary_domain);
   22837           0 :         return py_primary_domain;
   22838             : }
   22839             : 
   22840           0 : static int py_netr_DomainInformation_set_primary_domain(PyObject *py_obj, PyObject *value, void *closure)
   22841             : {
   22842           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   22843           0 :         if (value == NULL) {
   22844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->primary_domain");
   22845           0 :                 return -1;
   22846             :         }
   22847           0 :         PY_CHECK_TYPE(&netr_OneDomainInfo_Type, value, return -1;);
   22848           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22849           0 :                 PyErr_NoMemory();
   22850           0 :                 return -1;
   22851             :         }
   22852           0 :         object->primary_domain = *(struct netr_OneDomainInfo *)pytalloc_get_ptr(value);
   22853           0 :         return 0;
   22854             : }
   22855             : 
   22856           0 : static PyObject *py_netr_DomainInformation_get_trusted_domain_count(PyObject *obj, void *closure)
   22857             : {
   22858           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   22859           0 :         PyObject *py_trusted_domain_count;
   22860           0 :         py_trusted_domain_count = PyLong_FromUnsignedLongLong((uint32_t)(object->trusted_domain_count));
   22861           0 :         return py_trusted_domain_count;
   22862             : }
   22863             : 
   22864           0 : static int py_netr_DomainInformation_set_trusted_domain_count(PyObject *py_obj, PyObject *value, void *closure)
   22865             : {
   22866           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   22867           0 :         if (value == NULL) {
   22868           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_domain_count");
   22869           0 :                 return -1;
   22870             :         }
   22871             :         {
   22872           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trusted_domain_count));
   22873           0 :                 if (PyLong_Check(value)) {
   22874           0 :                         unsigned long long test_var;
   22875           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22876           0 :                         if (PyErr_Occurred() != NULL) {
   22877           0 :                                 return -1;
   22878             :                         }
   22879           0 :                         if (test_var > uint_max) {
   22880           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22881             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22882           0 :                                 return -1;
   22883             :                         }
   22884           0 :                         object->trusted_domain_count = test_var;
   22885             :                 } else {
   22886           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22887             :                           PyLong_Type.tp_name);
   22888           0 :                         return -1;
   22889             :                 }
   22890             :         }
   22891           0 :         return 0;
   22892             : }
   22893             : 
   22894           0 : static PyObject *py_netr_DomainInformation_get_trusted_domains(PyObject *obj, void *closure)
   22895             : {
   22896           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   22897           0 :         PyObject *py_trusted_domains;
   22898           0 :         if (object->trusted_domains == NULL) {
   22899           0 :                 Py_RETURN_NONE;
   22900             :         }
   22901           0 :         if (object->trusted_domains == NULL) {
   22902           0 :                 py_trusted_domains = Py_None;
   22903           0 :                 Py_INCREF(py_trusted_domains);
   22904             :         } else {
   22905           0 :                 py_trusted_domains = PyList_New(object->trusted_domain_count);
   22906           0 :                 if (py_trusted_domains == NULL) {
   22907           0 :                         return NULL;
   22908             :                 }
   22909             :                 {
   22910             :                         int trusted_domains_cntr_1;
   22911           0 :                         for (trusted_domains_cntr_1 = 0; trusted_domains_cntr_1 < (object->trusted_domain_count); trusted_domains_cntr_1++) {
   22912           0 :                                 PyObject *py_trusted_domains_1;
   22913           0 :                                 py_trusted_domains_1 = pytalloc_reference_ex(&netr_OneDomainInfo_Type, object->trusted_domains, &(object->trusted_domains)[trusted_domains_cntr_1]);
   22914           0 :                                 PyList_SetItem(py_trusted_domains, trusted_domains_cntr_1, py_trusted_domains_1);
   22915             :                         }
   22916             :                 }
   22917             :         }
   22918           0 :         return py_trusted_domains;
   22919             : }
   22920             : 
   22921           0 : static int py_netr_DomainInformation_set_trusted_domains(PyObject *py_obj, PyObject *value, void *closure)
   22922             : {
   22923           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   22924           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->trusted_domains));
   22925           0 :         if (value == NULL) {
   22926           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_domains");
   22927           0 :                 return -1;
   22928             :         }
   22929           0 :         if (value == Py_None) {
   22930           0 :                 object->trusted_domains = NULL;
   22931             :         } else {
   22932           0 :                 object->trusted_domains = NULL;
   22933           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   22934             :                 {
   22935           0 :                         int trusted_domains_cntr_1;
   22936           0 :                         object->trusted_domains = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->trusted_domains, PyList_GET_SIZE(value));
   22937           0 :                         if (!object->trusted_domains) { return -1; }
   22938           0 :                         talloc_set_name_const(object->trusted_domains, "ARRAY: object->trusted_domains");
   22939           0 :                         for (trusted_domains_cntr_1 = 0; trusted_domains_cntr_1 < PyList_GET_SIZE(value); trusted_domains_cntr_1++) {
   22940           0 :                                 if (PyList_GET_ITEM(value, trusted_domains_cntr_1) == NULL) {
   22941           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->trusted_domains)[trusted_domains_cntr_1]");
   22942           0 :                                         return -1;
   22943             :                                 }
   22944           0 :                                 PY_CHECK_TYPE(&netr_OneDomainInfo_Type, PyList_GET_ITEM(value, trusted_domains_cntr_1), return -1;);
   22945           0 :                                 if (talloc_reference(object->trusted_domains, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, trusted_domains_cntr_1))) == NULL) {
   22946           0 :                                         PyErr_NoMemory();
   22947           0 :                                         return -1;
   22948             :                                 }
   22949           0 :                                 (object->trusted_domains)[trusted_domains_cntr_1] = *(struct netr_OneDomainInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, trusted_domains_cntr_1));
   22950             :                         }
   22951             :                 }
   22952             :         }
   22953           0 :         return 0;
   22954             : }
   22955             : 
   22956           0 : static PyObject *py_netr_DomainInformation_get_lsa_policy(PyObject *obj, void *closure)
   22957             : {
   22958           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   22959           0 :         PyObject *py_lsa_policy;
   22960           0 :         py_lsa_policy = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, pytalloc_get_mem_ctx(obj), &object->lsa_policy);
   22961           0 :         return py_lsa_policy;
   22962             : }
   22963             : 
   22964           0 : static int py_netr_DomainInformation_set_lsa_policy(PyObject *py_obj, PyObject *value, void *closure)
   22965             : {
   22966           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   22967           0 :         if (value == NULL) {
   22968           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lsa_policy");
   22969           0 :                 return -1;
   22970             :         }
   22971           0 :         PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, value, return -1;);
   22972           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22973           0 :                 PyErr_NoMemory();
   22974           0 :                 return -1;
   22975             :         }
   22976           0 :         object->lsa_policy = *(struct netr_LsaPolicyInformation *)pytalloc_get_ptr(value);
   22977           0 :         return 0;
   22978             : }
   22979             : 
   22980           0 : static PyObject *py_netr_DomainInformation_get_dns_hostname(PyObject *obj, void *closure)
   22981             : {
   22982           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   22983           0 :         PyObject *py_dns_hostname;
   22984           0 :         py_dns_hostname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_hostname);
   22985           0 :         return py_dns_hostname;
   22986             : }
   22987             : 
   22988           0 : static int py_netr_DomainInformation_set_dns_hostname(PyObject *py_obj, PyObject *value, void *closure)
   22989             : {
   22990           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   22991           0 :         if (value == NULL) {
   22992           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_hostname");
   22993           0 :                 return -1;
   22994             :         }
   22995           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22996           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22997           0 :                 PyErr_NoMemory();
   22998           0 :                 return -1;
   22999             :         }
   23000           0 :         object->dns_hostname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   23001           0 :         return 0;
   23002             : }
   23003             : 
   23004           0 : static PyObject *py_netr_DomainInformation_get_dummy_string2(PyObject *obj, void *closure)
   23005             : {
   23006           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   23007           0 :         PyObject *py_dummy_string2;
   23008           0 :         py_dummy_string2 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string2);
   23009           0 :         return py_dummy_string2;
   23010             : }
   23011             : 
   23012           0 : static int py_netr_DomainInformation_set_dummy_string2(PyObject *py_obj, PyObject *value, void *closure)
   23013             : {
   23014           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   23015           0 :         if (value == NULL) {
   23016           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string2");
   23017           0 :                 return -1;
   23018             :         }
   23019           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   23020           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23021           0 :                 PyErr_NoMemory();
   23022           0 :                 return -1;
   23023             :         }
   23024           0 :         object->dummy_string2 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   23025           0 :         return 0;
   23026             : }
   23027             : 
   23028           0 : static PyObject *py_netr_DomainInformation_get_dummy_string3(PyObject *obj, void *closure)
   23029             : {
   23030           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   23031           0 :         PyObject *py_dummy_string3;
   23032           0 :         py_dummy_string3 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
   23033           0 :         return py_dummy_string3;
   23034             : }
   23035             : 
   23036           0 : static int py_netr_DomainInformation_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
   23037             : {
   23038           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   23039           0 :         if (value == NULL) {
   23040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string3");
   23041           0 :                 return -1;
   23042             :         }
   23043           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   23044           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23045           0 :                 PyErr_NoMemory();
   23046           0 :                 return -1;
   23047             :         }
   23048           0 :         object->dummy_string3 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   23049           0 :         return 0;
   23050             : }
   23051             : 
   23052           0 : static PyObject *py_netr_DomainInformation_get_dummy_string4(PyObject *obj, void *closure)
   23053             : {
   23054           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   23055           0 :         PyObject *py_dummy_string4;
   23056           0 :         py_dummy_string4 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
   23057           0 :         return py_dummy_string4;
   23058             : }
   23059             : 
   23060           0 : static int py_netr_DomainInformation_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
   23061             : {
   23062           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   23063           0 :         if (value == NULL) {
   23064           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string4");
   23065           0 :                 return -1;
   23066             :         }
   23067           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   23068           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23069           0 :                 PyErr_NoMemory();
   23070           0 :                 return -1;
   23071             :         }
   23072           0 :         object->dummy_string4 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   23073           0 :         return 0;
   23074             : }
   23075             : 
   23076           0 : static PyObject *py_netr_DomainInformation_get_workstation_flags(PyObject *obj, void *closure)
   23077             : {
   23078           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   23079           0 :         PyObject *py_workstation_flags;
   23080           0 :         py_workstation_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->workstation_flags));
   23081           0 :         return py_workstation_flags;
   23082             : }
   23083             : 
   23084           0 : static int py_netr_DomainInformation_set_workstation_flags(PyObject *py_obj, PyObject *value, void *closure)
   23085             : {
   23086           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   23087           0 :         if (value == NULL) {
   23088           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->workstation_flags");
   23089           0 :                 return -1;
   23090             :         }
   23091             :         {
   23092           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->workstation_flags));
   23093           0 :                 if (PyLong_Check(value)) {
   23094           0 :                         unsigned long long test_var;
   23095           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23096           0 :                         if (PyErr_Occurred() != NULL) {
   23097           0 :                                 return -1;
   23098             :                         }
   23099           0 :                         if (test_var > uint_max) {
   23100           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23101             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23102           0 :                                 return -1;
   23103             :                         }
   23104           0 :                         object->workstation_flags = test_var;
   23105             :                 } else {
   23106           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23107             :                           PyLong_Type.tp_name);
   23108           0 :                         return -1;
   23109             :                 }
   23110             :         }
   23111           0 :         return 0;
   23112             : }
   23113             : 
   23114           0 : static PyObject *py_netr_DomainInformation_get_supported_enc_types(PyObject *obj, void *closure)
   23115             : {
   23116           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   23117           0 :         PyObject *py_supported_enc_types;
   23118           0 :         py_supported_enc_types = PyLong_FromUnsignedLongLong((uint32_t)(object->supported_enc_types));
   23119           0 :         return py_supported_enc_types;
   23120             : }
   23121             : 
   23122           0 : static int py_netr_DomainInformation_set_supported_enc_types(PyObject *py_obj, PyObject *value, void *closure)
   23123             : {
   23124           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   23125           0 :         if (value == NULL) {
   23126           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->supported_enc_types");
   23127           0 :                 return -1;
   23128             :         }
   23129             :         {
   23130           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_enc_types));
   23131           0 :                 if (PyLong_Check(value)) {
   23132           0 :                         unsigned long long test_var;
   23133           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23134           0 :                         if (PyErr_Occurred() != NULL) {
   23135           0 :                                 return -1;
   23136             :                         }
   23137           0 :                         if (test_var > uint_max) {
   23138           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23139             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23140           0 :                                 return -1;
   23141             :                         }
   23142           0 :                         object->supported_enc_types = test_var;
   23143             :                 } else {
   23144           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23145             :                           PyLong_Type.tp_name);
   23146           0 :                         return -1;
   23147             :                 }
   23148             :         }
   23149           0 :         return 0;
   23150             : }
   23151             : 
   23152           0 : static PyObject *py_netr_DomainInformation_get_dummy_long3(PyObject *obj, void *closure)
   23153             : {
   23154           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   23155           0 :         PyObject *py_dummy_long3;
   23156           0 :         py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long3));
   23157           0 :         return py_dummy_long3;
   23158             : }
   23159             : 
   23160           0 : static int py_netr_DomainInformation_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
   23161             : {
   23162           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   23163           0 :         if (value == NULL) {
   23164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long3");
   23165           0 :                 return -1;
   23166             :         }
   23167             :         {
   23168           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
   23169           0 :                 if (PyLong_Check(value)) {
   23170           0 :                         unsigned long long test_var;
   23171           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23172           0 :                         if (PyErr_Occurred() != NULL) {
   23173           0 :                                 return -1;
   23174             :                         }
   23175           0 :                         if (test_var > uint_max) {
   23176           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23177             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23178           0 :                                 return -1;
   23179             :                         }
   23180           0 :                         object->dummy_long3 = test_var;
   23181             :                 } else {
   23182           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23183             :                           PyLong_Type.tp_name);
   23184           0 :                         return -1;
   23185             :                 }
   23186             :         }
   23187           0 :         return 0;
   23188             : }
   23189             : 
   23190           0 : static PyObject *py_netr_DomainInformation_get_dummy_long4(PyObject *obj, void *closure)
   23191             : {
   23192           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
   23193           0 :         PyObject *py_dummy_long4;
   23194           0 :         py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long4));
   23195           0 :         return py_dummy_long4;
   23196             : }
   23197             : 
   23198           0 : static int py_netr_DomainInformation_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
   23199             : {
   23200           0 :         struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
   23201           0 :         if (value == NULL) {
   23202           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long4");
   23203           0 :                 return -1;
   23204             :         }
   23205             :         {
   23206           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
   23207           0 :                 if (PyLong_Check(value)) {
   23208           0 :                         unsigned long long test_var;
   23209           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23210           0 :                         if (PyErr_Occurred() != NULL) {
   23211           0 :                                 return -1;
   23212             :                         }
   23213           0 :                         if (test_var > uint_max) {
   23214           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23215             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23216           0 :                                 return -1;
   23217             :                         }
   23218           0 :                         object->dummy_long4 = test_var;
   23219             :                 } else {
   23220           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23221             :                           PyLong_Type.tp_name);
   23222           0 :                         return -1;
   23223             :                 }
   23224             :         }
   23225           0 :         return 0;
   23226             : }
   23227             : 
   23228             : static PyGetSetDef py_netr_DomainInformation_getsetters[] = {
   23229             :         {
   23230             :                 .name = discard_const_p(char, "primary_domain"),
   23231             :                 .get = py_netr_DomainInformation_get_primary_domain,
   23232             :                 .set = py_netr_DomainInformation_set_primary_domain,
   23233             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OneDomainInfo")
   23234             :         },
   23235             :         {
   23236             :                 .name = discard_const_p(char, "trusted_domain_count"),
   23237             :                 .get = py_netr_DomainInformation_get_trusted_domain_count,
   23238             :                 .set = py_netr_DomainInformation_set_trusted_domain_count,
   23239             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23240             :         },
   23241             :         {
   23242             :                 .name = discard_const_p(char, "trusted_domains"),
   23243             :                 .get = py_netr_DomainInformation_get_trusted_domains,
   23244             :                 .set = py_netr_DomainInformation_set_trusted_domains,
   23245             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OneDomainInfo")
   23246             :         },
   23247             :         {
   23248             :                 .name = discard_const_p(char, "lsa_policy"),
   23249             :                 .get = py_netr_DomainInformation_get_lsa_policy,
   23250             :                 .set = py_netr_DomainInformation_set_lsa_policy,
   23251             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LsaPolicyInformation")
   23252             :         },
   23253             :         {
   23254             :                 .name = discard_const_p(char, "dns_hostname"),
   23255             :                 .get = py_netr_DomainInformation_get_dns_hostname,
   23256             :                 .set = py_netr_DomainInformation_set_dns_hostname,
   23257             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23258             :         },
   23259             :         {
   23260             :                 .name = discard_const_p(char, "dummy_string2"),
   23261             :                 .get = py_netr_DomainInformation_get_dummy_string2,
   23262             :                 .set = py_netr_DomainInformation_set_dummy_string2,
   23263             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23264             :         },
   23265             :         {
   23266             :                 .name = discard_const_p(char, "dummy_string3"),
   23267             :                 .get = py_netr_DomainInformation_get_dummy_string3,
   23268             :                 .set = py_netr_DomainInformation_set_dummy_string3,
   23269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23270             :         },
   23271             :         {
   23272             :                 .name = discard_const_p(char, "dummy_string4"),
   23273             :                 .get = py_netr_DomainInformation_get_dummy_string4,
   23274             :                 .set = py_netr_DomainInformation_set_dummy_string4,
   23275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23276             :         },
   23277             :         {
   23278             :                 .name = discard_const_p(char, "workstation_flags"),
   23279             :                 .get = py_netr_DomainInformation_get_workstation_flags,
   23280             :                 .set = py_netr_DomainInformation_set_workstation_flags,
   23281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationFlags")
   23282             :         },
   23283             :         {
   23284             :                 .name = discard_const_p(char, "supported_enc_types"),
   23285             :                 .get = py_netr_DomainInformation_get_supported_enc_types,
   23286             :                 .set = py_netr_DomainInformation_set_supported_enc_types,
   23287             :                 .doc = discard_const_p(char, "PIDL-generated element of base type kerb_EncTypes")
   23288             :         },
   23289             :         {
   23290             :                 .name = discard_const_p(char, "dummy_long3"),
   23291             :                 .get = py_netr_DomainInformation_get_dummy_long3,
   23292             :                 .set = py_netr_DomainInformation_set_dummy_long3,
   23293             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23294             :         },
   23295             :         {
   23296             :                 .name = discard_const_p(char, "dummy_long4"),
   23297             :                 .get = py_netr_DomainInformation_get_dummy_long4,
   23298             :                 .set = py_netr_DomainInformation_set_dummy_long4,
   23299             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23300             :         },
   23301             :         { .name = NULL }
   23302             : };
   23303             : 
   23304           0 : static PyObject *py_netr_DomainInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23305             : {
   23306           0 :         return pytalloc_new(struct netr_DomainInformation, type);
   23307             : }
   23308             : 
   23309             : 
   23310             : static PyTypeObject netr_DomainInformation_Type = {
   23311             :         PyVarObject_HEAD_INIT(NULL, 0)
   23312             :         .tp_name = "netlogon.netr_DomainInformation",
   23313             :         .tp_getset = py_netr_DomainInformation_getsetters,
   23314             :         .tp_methods = NULL,
   23315             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23316             :         .tp_new = py_netr_DomainInformation_new,
   23317             : };
   23318             : 
   23319          31 : static PyObject *py_import_netr_DomainInfo(TALLOC_CTX *mem_ctx, int level, union netr_DomainInfo *in)
   23320             : {
   23321           0 :         PyObject *ret;
   23322             : 
   23323          31 :         switch (level) {
   23324          21 :                 case 1:
   23325          21 :                         if (in->domain_info == NULL) {
   23326           0 :                                 ret = Py_None;
   23327           0 :                                 Py_INCREF(ret);
   23328             :                         } else {
   23329          21 :                                 ret = pytalloc_reference_ex(&netr_DomainInformation_Type, in->domain_info, in->domain_info);
   23330             :                         }
   23331          21 :                         return ret;
   23332             : 
   23333          10 :                 case 2:
   23334          10 :                         if (in->lsa_policy_info == NULL) {
   23335           0 :                                 ret = Py_None;
   23336           0 :                                 Py_INCREF(ret);
   23337             :                         } else {
   23338          10 :                                 ret = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, in->lsa_policy_info, in->lsa_policy_info);
   23339             :                         }
   23340          10 :                         return ret;
   23341             : 
   23342             :         }
   23343           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   23344           0 :         return NULL;
   23345             : }
   23346             : 
   23347           0 : static union netr_DomainInfo *py_export_netr_DomainInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   23348             : {
   23349           0 :         union netr_DomainInfo *ret = talloc_zero(mem_ctx, union netr_DomainInfo);
   23350           0 :         switch (level) {
   23351           0 :                 case 1:
   23352           0 :                         if (in == NULL) {
   23353           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain_info");
   23354           0 :                                 talloc_free(ret); return NULL;
   23355             :                         }
   23356           0 :                         if (in == Py_None) {
   23357           0 :                                 ret->domain_info = NULL;
   23358             :                         } else {
   23359           0 :                                 ret->domain_info = NULL;
   23360           0 :                                 PY_CHECK_TYPE(&netr_DomainInformation_Type, in, talloc_free(ret); return NULL;);
   23361           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23362           0 :                                         PyErr_NoMemory();
   23363           0 :                                         talloc_free(ret); return NULL;
   23364             :                                 }
   23365           0 :                                 ret->domain_info = (struct netr_DomainInformation *)pytalloc_get_ptr(in);
   23366             :                         }
   23367           0 :                         break;
   23368             : 
   23369           0 :                 case 2:
   23370           0 :                         if (in == NULL) {
   23371           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->lsa_policy_info");
   23372           0 :                                 talloc_free(ret); return NULL;
   23373             :                         }
   23374           0 :                         if (in == Py_None) {
   23375           0 :                                 ret->lsa_policy_info = NULL;
   23376             :                         } else {
   23377           0 :                                 ret->lsa_policy_info = NULL;
   23378           0 :                                 PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, in, talloc_free(ret); return NULL;);
   23379           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23380           0 :                                         PyErr_NoMemory();
   23381           0 :                                         talloc_free(ret); return NULL;
   23382             :                                 }
   23383           0 :                                 ret->lsa_policy_info = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(in);
   23384             :                         }
   23385           0 :                         break;
   23386             : 
   23387           0 :                 default:
   23388           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   23389           0 :                         talloc_free(ret);
   23390           0 :                         ret = NULL;
   23391             :         }
   23392             : 
   23393           0 :         return ret;
   23394             : }
   23395             : 
   23396          31 : static PyObject *py_netr_DomainInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23397             : {
   23398          31 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23399          31 :         PyObject *mem_ctx_obj = NULL;
   23400          31 :         TALLOC_CTX *mem_ctx = NULL;
   23401          31 :         int level = 0;
   23402          31 :         PyObject *in_obj = NULL;
   23403          31 :         union netr_DomainInfo *in = NULL;
   23404             : 
   23405          31 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   23406             :                 discard_const_p(char *, kwnames),
   23407             :                 &mem_ctx_obj,
   23408             :                 &level,
   23409             :                 &in_obj)) {
   23410           0 :                 return NULL;
   23411             :         }
   23412          31 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23413          31 :         if (mem_ctx == NULL) {
   23414           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23415           0 :                 return NULL;
   23416             :         }
   23417          31 :         in = (union netr_DomainInfo *)pytalloc_get_ptr(in_obj);
   23418          31 :         if (in == NULL) {
   23419           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DomainInfo!");
   23420           0 :                 return NULL;
   23421             :         }
   23422             : 
   23423          31 :         return py_import_netr_DomainInfo(mem_ctx, level, in);
   23424             : }
   23425             : 
   23426           0 : static PyObject *py_netr_DomainInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23427             : {
   23428           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23429           0 :         PyObject *mem_ctx_obj = NULL;
   23430           0 :         TALLOC_CTX *mem_ctx = NULL;
   23431           0 :         int level = 0;
   23432           0 :         PyObject *in = NULL;
   23433           0 :         union netr_DomainInfo *out = NULL;
   23434             : 
   23435           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   23436             :                 discard_const_p(char *, kwnames),
   23437             :                 &mem_ctx_obj,
   23438             :                 &level,
   23439             :                 &in)) {
   23440           0 :                 return NULL;
   23441             :         }
   23442           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23443           0 :         if (mem_ctx == NULL) {
   23444           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23445           0 :                 return NULL;
   23446             :         }
   23447             : 
   23448           0 :         out = py_export_netr_DomainInfo(mem_ctx, level, in);
   23449           0 :         if (out == NULL) {
   23450           0 :                 return NULL;
   23451             :         }
   23452             : 
   23453           0 :         return pytalloc_GenericObject_reference(out);
   23454             : }
   23455             : 
   23456             : static PyMethodDef py_netr_DomainInfo_methods[] = {
   23457             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainInfo_import),
   23458             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23459             :                 "T.__import__(mem_ctx, level, in) => ret." },
   23460             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainInfo_export),
   23461             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23462             :                 "T.__export__(mem_ctx, level, in) => ret." },
   23463             :         { NULL, NULL, 0, NULL }
   23464             : };
   23465             : 
   23466           0 : static PyObject *py_netr_DomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23467             : {
   23468           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   23469           0 :         return NULL;
   23470             : }
   23471             : 
   23472             : 
   23473             : static PyTypeObject netr_DomainInfo_Type = {
   23474             :         PyVarObject_HEAD_INIT(NULL, 0)
   23475             :         .tp_name = "netlogon.netr_DomainInfo",
   23476             :         .tp_getset = NULL,
   23477             :         .tp_methods = py_netr_DomainInfo_methods,
   23478             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23479             :         .tp_new = py_netr_DomainInfo_new,
   23480             : };
   23481             : 
   23482             : 
   23483           0 : static PyObject *py_NL_PASSWORD_VERSION_get_ReservedField(PyObject *obj, void *closure)
   23484             : {
   23485           0 :         struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(obj);
   23486           0 :         PyObject *py_ReservedField;
   23487           0 :         py_ReservedField = PyLong_FromUnsignedLongLong((uint32_t)(object->ReservedField));
   23488           0 :         return py_ReservedField;
   23489             : }
   23490             : 
   23491           0 : static int py_NL_PASSWORD_VERSION_set_ReservedField(PyObject *py_obj, PyObject *value, void *closure)
   23492             : {
   23493           0 :         struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(py_obj);
   23494           0 :         if (value == NULL) {
   23495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ReservedField");
   23496           0 :                 return -1;
   23497             :         }
   23498             :         {
   23499           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ReservedField));
   23500           0 :                 if (PyLong_Check(value)) {
   23501           0 :                         unsigned long long test_var;
   23502           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23503           0 :                         if (PyErr_Occurred() != NULL) {
   23504           0 :                                 return -1;
   23505             :                         }
   23506           0 :                         if (test_var > uint_max) {
   23507           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23508             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23509           0 :                                 return -1;
   23510             :                         }
   23511           0 :                         object->ReservedField = test_var;
   23512             :                 } else {
   23513           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23514             :                           PyLong_Type.tp_name);
   23515           0 :                         return -1;
   23516             :                 }
   23517             :         }
   23518           0 :         return 0;
   23519             : }
   23520             : 
   23521           0 : static PyObject *py_NL_PASSWORD_VERSION_get_PasswordVersionNumber(PyObject *obj, void *closure)
   23522             : {
   23523           0 :         struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(obj);
   23524           0 :         PyObject *py_PasswordVersionNumber;
   23525           0 :         py_PasswordVersionNumber = PyLong_FromUnsignedLongLong((uint32_t)(object->PasswordVersionNumber));
   23526           0 :         return py_PasswordVersionNumber;
   23527             : }
   23528             : 
   23529           0 : static int py_NL_PASSWORD_VERSION_set_PasswordVersionNumber(PyObject *py_obj, PyObject *value, void *closure)
   23530             : {
   23531           0 :         struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(py_obj);
   23532           0 :         if (value == NULL) {
   23533           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->PasswordVersionNumber");
   23534           0 :                 return -1;
   23535             :         }
   23536             :         {
   23537           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PasswordVersionNumber));
   23538           0 :                 if (PyLong_Check(value)) {
   23539           0 :                         unsigned long long test_var;
   23540           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23541           0 :                         if (PyErr_Occurred() != NULL) {
   23542           0 :                                 return -1;
   23543             :                         }
   23544           0 :                         if (test_var > uint_max) {
   23545           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23546             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23547           0 :                                 return -1;
   23548             :                         }
   23549           0 :                         object->PasswordVersionNumber = test_var;
   23550             :                 } else {
   23551           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23552             :                           PyLong_Type.tp_name);
   23553           0 :                         return -1;
   23554             :                 }
   23555             :         }
   23556           0 :         return 0;
   23557             : }
   23558             : 
   23559           0 : static PyObject *py_NL_PASSWORD_VERSION_get_PasswordVersionPresent(PyObject *obj, void *closure)
   23560             : {
   23561           0 :         struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(obj);
   23562           0 :         PyObject *py_PasswordVersionPresent;
   23563           0 :         py_PasswordVersionPresent = PyLong_FromUnsignedLongLong((uint32_t)(object->PasswordVersionPresent));
   23564           0 :         return py_PasswordVersionPresent;
   23565             : }
   23566             : 
   23567           0 : static int py_NL_PASSWORD_VERSION_set_PasswordVersionPresent(PyObject *py_obj, PyObject *value, void *closure)
   23568             : {
   23569           0 :         struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(py_obj);
   23570           0 :         if (value == NULL) {
   23571           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->PasswordVersionPresent");
   23572           0 :                 return -1;
   23573             :         }
   23574             :         {
   23575           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PasswordVersionPresent));
   23576           0 :                 if (PyLong_Check(value)) {
   23577           0 :                         unsigned long long test_var;
   23578           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23579           0 :                         if (PyErr_Occurred() != NULL) {
   23580           0 :                                 return -1;
   23581             :                         }
   23582           0 :                         if (test_var > uint_max) {
   23583           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23584             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23585           0 :                                 return -1;
   23586             :                         }
   23587           0 :                         object->PasswordVersionPresent = test_var;
   23588             :                 } else {
   23589           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23590             :                           PyLong_Type.tp_name);
   23591           0 :                         return -1;
   23592             :                 }
   23593             :         }
   23594           0 :         return 0;
   23595             : }
   23596             : 
   23597             : static PyGetSetDef py_NL_PASSWORD_VERSION_getsetters[] = {
   23598             :         {
   23599             :                 .name = discard_const_p(char, "ReservedField"),
   23600             :                 .get = py_NL_PASSWORD_VERSION_get_ReservedField,
   23601             :                 .set = py_NL_PASSWORD_VERSION_set_ReservedField,
   23602             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23603             :         },
   23604             :         {
   23605             :                 .name = discard_const_p(char, "PasswordVersionNumber"),
   23606             :                 .get = py_NL_PASSWORD_VERSION_get_PasswordVersionNumber,
   23607             :                 .set = py_NL_PASSWORD_VERSION_set_PasswordVersionNumber,
   23608             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23609             :         },
   23610             :         {
   23611             :                 .name = discard_const_p(char, "PasswordVersionPresent"),
   23612             :                 .get = py_NL_PASSWORD_VERSION_get_PasswordVersionPresent,
   23613             :                 .set = py_NL_PASSWORD_VERSION_set_PasswordVersionPresent,
   23614             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23615             :         },
   23616             :         { .name = NULL }
   23617             : };
   23618             : 
   23619           0 : static PyObject *py_NL_PASSWORD_VERSION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23620             : {
   23621           0 :         return pytalloc_new(struct NL_PASSWORD_VERSION, type);
   23622             : }
   23623             : 
   23624             : 
   23625             : static PyTypeObject NL_PASSWORD_VERSION_Type = {
   23626             :         PyVarObject_HEAD_INIT(NULL, 0)
   23627             :         .tp_name = "netlogon.NL_PASSWORD_VERSION",
   23628             :         .tp_getset = py_NL_PASSWORD_VERSION_getsetters,
   23629             :         .tp_methods = NULL,
   23630             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23631             :         .tp_new = py_NL_PASSWORD_VERSION_new,
   23632             : };
   23633             : 
   23634             : 
   23635           0 : static PyObject *py_netr_CryptPassword_get_data(PyObject *obj, void *closure)
   23636             : {
   23637           0 :         struct netr_CryptPassword *object = pytalloc_get_ptr(obj);
   23638           0 :         PyObject *py_data;
   23639           0 :         py_data = PyList_New(512);
   23640           0 :         if (py_data == NULL) {
   23641           0 :                 return NULL;
   23642             :         }
   23643             :         {
   23644             :                 int data_cntr_0;
   23645           0 :                 for (data_cntr_0 = 0; data_cntr_0 < (512); data_cntr_0++) {
   23646           0 :                         PyObject *py_data_0;
   23647           0 :                         py_data_0 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_0]));
   23648           0 :                         PyList_SetItem(py_data, data_cntr_0, py_data_0);
   23649             :                 }
   23650             :         }
   23651           0 :         return py_data;
   23652             : }
   23653             : 
   23654           4 : static int py_netr_CryptPassword_set_data(PyObject *py_obj, PyObject *value, void *closure)
   23655             : {
   23656           4 :         struct netr_CryptPassword *object = pytalloc_get_ptr(py_obj);
   23657           4 :         if (value == NULL) {
   23658           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
   23659           0 :                 return -1;
   23660             :         }
   23661           4 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   23662             :         {
   23663           0 :                 int data_cntr_0;
   23664           4 :                 if (ARRAY_SIZE(object->data) != PyList_GET_SIZE(value)) {
   23665           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));
   23666           0 :                         return -1;
   23667             :                 }
   23668        2052 :                 for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
   23669        2048 :                         if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
   23670           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_0]");
   23671           0 :                                 return -1;
   23672             :                         }
   23673             :                         {
   23674        2048 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_0]));
   23675        2048 :                                 if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
   23676           0 :                                         unsigned long long test_var;
   23677        2048 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
   23678        2048 :                                         if (PyErr_Occurred() != NULL) {
   23679           0 :                                                 return -1;
   23680             :                                         }
   23681        2048 :                                         if (test_var > uint_max) {
   23682           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23683             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   23684           0 :                                                 return -1;
   23685             :                                         }
   23686        2048 :                                         (object->data)[data_cntr_0] = test_var;
   23687             :                                 } else {
   23688           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23689             :                                           PyLong_Type.tp_name);
   23690           0 :                                         return -1;
   23691             :                                 }
   23692             :                         }
   23693             :                 }
   23694             :         }
   23695           4 :         return 0;
   23696             : }
   23697             : 
   23698           0 : static PyObject *py_netr_CryptPassword_get_length(PyObject *obj, void *closure)
   23699             : {
   23700           0 :         struct netr_CryptPassword *object = pytalloc_get_ptr(obj);
   23701           0 :         PyObject *py_length;
   23702           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
   23703           0 :         return py_length;
   23704             : }
   23705             : 
   23706           4 : static int py_netr_CryptPassword_set_length(PyObject *py_obj, PyObject *value, void *closure)
   23707             : {
   23708           4 :         struct netr_CryptPassword *object = pytalloc_get_ptr(py_obj);
   23709           4 :         if (value == NULL) {
   23710           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
   23711           0 :                 return -1;
   23712             :         }
   23713             :         {
   23714           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   23715           4 :                 if (PyLong_Check(value)) {
   23716           0 :                         unsigned long long test_var;
   23717           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23718           4 :                         if (PyErr_Occurred() != NULL) {
   23719           0 :                                 return -1;
   23720             :                         }
   23721           4 :                         if (test_var > uint_max) {
   23722           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23723             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23724           0 :                                 return -1;
   23725             :                         }
   23726           4 :                         object->length = test_var;
   23727             :                 } else {
   23728           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23729             :                           PyLong_Type.tp_name);
   23730           0 :                         return -1;
   23731             :                 }
   23732             :         }
   23733           4 :         return 0;
   23734             : }
   23735             : 
   23736             : static PyGetSetDef py_netr_CryptPassword_getsetters[] = {
   23737             :         {
   23738             :                 .name = discard_const_p(char, "data"),
   23739             :                 .get = py_netr_CryptPassword_get_data,
   23740             :                 .set = py_netr_CryptPassword_set_data,
   23741             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   23742             :         },
   23743             :         {
   23744             :                 .name = discard_const_p(char, "length"),
   23745             :                 .get = py_netr_CryptPassword_get_length,
   23746             :                 .set = py_netr_CryptPassword_set_length,
   23747             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23748             :         },
   23749             :         { .name = NULL }
   23750             : };
   23751             : 
   23752           4 : static PyObject *py_netr_CryptPassword_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23753             : {
   23754           4 :         return pytalloc_new(struct netr_CryptPassword, type);
   23755             : }
   23756             : 
   23757             : 
   23758             : static PyTypeObject netr_CryptPassword_Type = {
   23759             :         PyVarObject_HEAD_INIT(NULL, 0)
   23760             :         .tp_name = "netlogon.netr_CryptPassword",
   23761             :         .tp_getset = py_netr_CryptPassword_getsetters,
   23762             :         .tp_methods = NULL,
   23763             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23764             :         .tp_new = py_netr_CryptPassword_new,
   23765             : };
   23766             : 
   23767             : 
   23768           0 : static PyObject *py_netr_SendToSamResetBadPasswordCount_get_guid(PyObject *obj, void *closure)
   23769             : {
   23770           0 :         struct netr_SendToSamResetBadPasswordCount *object = pytalloc_get_ptr(obj);
   23771           0 :         PyObject *py_guid;
   23772           0 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
   23773           0 :         return py_guid;
   23774             : }
   23775             : 
   23776           0 : static int py_netr_SendToSamResetBadPasswordCount_set_guid(PyObject *py_obj, PyObject *value, void *closure)
   23777             : {
   23778           0 :         struct netr_SendToSamResetBadPasswordCount *object = pytalloc_get_ptr(py_obj);
   23779           0 :         if (value == NULL) {
   23780           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->guid");
   23781           0 :                 return -1;
   23782             :         }
   23783           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   23784           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23785           0 :                 PyErr_NoMemory();
   23786           0 :                 return -1;
   23787             :         }
   23788           0 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
   23789           0 :         return 0;
   23790             : }
   23791             : 
   23792             : static PyGetSetDef py_netr_SendToSamResetBadPasswordCount_getsetters[] = {
   23793             :         {
   23794             :                 .name = discard_const_p(char, "guid"),
   23795             :                 .get = py_netr_SendToSamResetBadPasswordCount_get_guid,
   23796             :                 .set = py_netr_SendToSamResetBadPasswordCount_set_guid,
   23797             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   23798             :         },
   23799             :         { .name = NULL }
   23800             : };
   23801             : 
   23802           0 : static PyObject *py_netr_SendToSamResetBadPasswordCount_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23803             : {
   23804           0 :         return pytalloc_new(struct netr_SendToSamResetBadPasswordCount, type);
   23805             : }
   23806             : 
   23807             : 
   23808             : static PyTypeObject netr_SendToSamResetBadPasswordCount_Type = {
   23809             :         PyVarObject_HEAD_INIT(NULL, 0)
   23810             :         .tp_name = "netlogon.netr_SendToSamResetBadPasswordCount",
   23811             :         .tp_getset = py_netr_SendToSamResetBadPasswordCount_getsetters,
   23812             :         .tp_methods = NULL,
   23813             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23814             :         .tp_new = py_netr_SendToSamResetBadPasswordCount_new,
   23815             : };
   23816             : 
   23817           0 : static PyObject *py_import_netr_SendToSamMessage(TALLOC_CTX *mem_ctx, int level, union netr_SendToSamMessage *in)
   23818             : {
   23819           0 :         PyObject *ret;
   23820             : 
   23821           0 :         switch (level) {
   23822           0 :                 case SendToSamResetBadPasswordCount:
   23823           0 :                         ret = pytalloc_reference_ex(&netr_SendToSamResetBadPasswordCount_Type, mem_ctx, &in->reset_bad_password);
   23824           0 :                         return ret;
   23825             : 
   23826           0 :                 default:
   23827           0 :                         ret = Py_None;
   23828           0 :                         Py_INCREF(ret);
   23829           0 :                         return ret;
   23830             : 
   23831             :         }
   23832             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   23833             :         return NULL;
   23834             : }
   23835             : 
   23836           0 : static union netr_SendToSamMessage *py_export_netr_SendToSamMessage(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   23837             : {
   23838           0 :         union netr_SendToSamMessage *ret = talloc_zero(mem_ctx, union netr_SendToSamMessage);
   23839           0 :         switch (level) {
   23840           0 :                 case SendToSamResetBadPasswordCount:
   23841           0 :                         if (in == NULL) {
   23842           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->reset_bad_password");
   23843           0 :                                 talloc_free(ret); return NULL;
   23844             :                         }
   23845           0 :                         PY_CHECK_TYPE(&netr_SendToSamResetBadPasswordCount_Type, in, talloc_free(ret); return NULL;);
   23846           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23847           0 :                                 PyErr_NoMemory();
   23848           0 :                                 talloc_free(ret); return NULL;
   23849             :                         }
   23850           0 :                         ret->reset_bad_password = *(struct netr_SendToSamResetBadPasswordCount *)pytalloc_get_ptr(in);
   23851           0 :                         break;
   23852             : 
   23853           0 :                 default:
   23854           0 :                         break;
   23855             : 
   23856             :         }
   23857             : 
   23858           0 :         return ret;
   23859             : }
   23860             : 
   23861           0 : static PyObject *py_netr_SendToSamMessage_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23862             : {
   23863           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23864           0 :         PyObject *mem_ctx_obj = NULL;
   23865           0 :         TALLOC_CTX *mem_ctx = NULL;
   23866           0 :         int level = 0;
   23867           0 :         PyObject *in_obj = NULL;
   23868           0 :         union netr_SendToSamMessage *in = NULL;
   23869             : 
   23870           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   23871             :                 discard_const_p(char *, kwnames),
   23872             :                 &mem_ctx_obj,
   23873             :                 &level,
   23874             :                 &in_obj)) {
   23875           0 :                 return NULL;
   23876             :         }
   23877           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23878           0 :         if (mem_ctx == NULL) {
   23879           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23880           0 :                 return NULL;
   23881             :         }
   23882           0 :         in = (union netr_SendToSamMessage *)pytalloc_get_ptr(in_obj);
   23883           0 :         if (in == NULL) {
   23884           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_SendToSamMessage!");
   23885           0 :                 return NULL;
   23886             :         }
   23887             : 
   23888           0 :         return py_import_netr_SendToSamMessage(mem_ctx, level, in);
   23889             : }
   23890             : 
   23891           0 : static PyObject *py_netr_SendToSamMessage_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23892             : {
   23893           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23894           0 :         PyObject *mem_ctx_obj = NULL;
   23895           0 :         TALLOC_CTX *mem_ctx = NULL;
   23896           0 :         int level = 0;
   23897           0 :         PyObject *in = NULL;
   23898           0 :         union netr_SendToSamMessage *out = NULL;
   23899             : 
   23900           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   23901             :                 discard_const_p(char *, kwnames),
   23902             :                 &mem_ctx_obj,
   23903             :                 &level,
   23904             :                 &in)) {
   23905           0 :                 return NULL;
   23906             :         }
   23907           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23908           0 :         if (mem_ctx == NULL) {
   23909           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23910           0 :                 return NULL;
   23911             :         }
   23912             : 
   23913           0 :         out = py_export_netr_SendToSamMessage(mem_ctx, level, in);
   23914           0 :         if (out == NULL) {
   23915           0 :                 return NULL;
   23916             :         }
   23917             : 
   23918           0 :         return pytalloc_GenericObject_reference(out);
   23919             : }
   23920             : 
   23921             : static PyMethodDef py_netr_SendToSamMessage_methods[] = {
   23922             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamMessage_import),
   23923             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23924             :                 "T.__import__(mem_ctx, level, in) => ret." },
   23925             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamMessage_export),
   23926             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23927             :                 "T.__export__(mem_ctx, level, in) => ret." },
   23928             :         { NULL, NULL, 0, NULL }
   23929             : };
   23930             : 
   23931           0 : static PyObject *py_netr_SendToSamMessage_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23932             : {
   23933           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   23934           0 :         return NULL;
   23935             : }
   23936             : 
   23937             : 
   23938             : static PyTypeObject netr_SendToSamMessage_Type = {
   23939             :         PyVarObject_HEAD_INIT(NULL, 0)
   23940             :         .tp_name = "netlogon.netr_SendToSamMessage",
   23941             :         .tp_getset = NULL,
   23942             :         .tp_methods = py_netr_SendToSamMessage_methods,
   23943             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23944             :         .tp_new = py_netr_SendToSamMessage_new,
   23945             : };
   23946             : 
   23947             : 
   23948           0 : static PyObject *py_netr_SendToSamBase_get_message_type(PyObject *obj, void *closure)
   23949             : {
   23950           0 :         struct netr_SendToSamBase *object = pytalloc_get_ptr(obj);
   23951           0 :         PyObject *py_message_type;
   23952           0 :         py_message_type = PyLong_FromLong((uint16_t)(object->message_type));
   23953           0 :         return py_message_type;
   23954             : }
   23955             : 
   23956           0 : static int py_netr_SendToSamBase_set_message_type(PyObject *py_obj, PyObject *value, void *closure)
   23957             : {
   23958           0 :         struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
   23959           0 :         if (value == NULL) {
   23960           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->message_type");
   23961           0 :                 return -1;
   23962             :         }
   23963             :         {
   23964           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->message_type));
   23965           0 :                 if (PyLong_Check(value)) {
   23966           0 :                         unsigned long long test_var;
   23967           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23968           0 :                         if (PyErr_Occurred() != NULL) {
   23969           0 :                                 return -1;
   23970             :                         }
   23971           0 :                         if (test_var > uint_max) {
   23972           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23973             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23974           0 :                                 return -1;
   23975             :                         }
   23976           0 :                         object->message_type = test_var;
   23977             :                 } else {
   23978           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23979             :                           PyLong_Type.tp_name);
   23980           0 :                         return -1;
   23981             :                 }
   23982             :         }
   23983           0 :         return 0;
   23984             : }
   23985             : 
   23986           0 : static PyObject *py_netr_SendToSamBase_get_message_size(PyObject *obj, void *closure)
   23987             : {
   23988           0 :         struct netr_SendToSamBase *object = pytalloc_get_ptr(obj);
   23989           0 :         PyObject *py_message_size;
   23990           0 :         py_message_size = PyLong_FromUnsignedLongLong((uint32_t)(object->message_size));
   23991           0 :         return py_message_size;
   23992             : }
   23993             : 
   23994           0 : static int py_netr_SendToSamBase_set_message_size(PyObject *py_obj, PyObject *value, void *closure)
   23995             : {
   23996           0 :         struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
   23997           0 :         if (value == NULL) {
   23998           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->message_size");
   23999           0 :                 return -1;
   24000             :         }
   24001             :         {
   24002           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->message_size));
   24003           0 :                 if (PyLong_Check(value)) {
   24004           0 :                         unsigned long long test_var;
   24005           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24006           0 :                         if (PyErr_Occurred() != NULL) {
   24007           0 :                                 return -1;
   24008             :                         }
   24009           0 :                         if (test_var > uint_max) {
   24010           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24011             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24012           0 :                                 return -1;
   24013             :                         }
   24014           0 :                         object->message_size = test_var;
   24015             :                 } else {
   24016           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24017             :                           PyLong_Type.tp_name);
   24018           0 :                         return -1;
   24019             :                 }
   24020             :         }
   24021           0 :         return 0;
   24022             : }
   24023             : 
   24024           0 : static PyObject *py_netr_SendToSamBase_get_message(PyObject *obj, void *closure)
   24025             : {
   24026           0 :         struct netr_SendToSamBase *object = pytalloc_get_ptr(obj);
   24027           0 :         PyObject *py_message;
   24028           0 :         py_message = pyrpc_import_union(&netr_SendToSamMessage_Type, pytalloc_get_mem_ctx(obj), object->message_type, &object->message, "union netr_SendToSamMessage");
   24029           0 :         if (py_message == NULL) {
   24030           0 :                 return NULL;
   24031             :         }
   24032           0 :         return py_message;
   24033             : }
   24034             : 
   24035           0 : static int py_netr_SendToSamBase_set_message(PyObject *py_obj, PyObject *value, void *closure)
   24036             : {
   24037           0 :         struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
   24038           0 :         if (value == NULL) {
   24039           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->message");
   24040           0 :                 return -1;
   24041             :         }
   24042             :         {
   24043           0 :                 union netr_SendToSamMessage *message_switch_1;
   24044           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");
   24045           0 :                 if (message_switch_1 == NULL) {
   24046           0 :                         return -1;
   24047             :                 }
   24048           0 :                 object->message = *message_switch_1;
   24049             :         }
   24050           0 :         return 0;
   24051             : }
   24052             : 
   24053             : static PyGetSetDef py_netr_SendToSamBase_getsetters[] = {
   24054             :         {
   24055             :                 .name = discard_const_p(char, "message_type"),
   24056             :                 .get = py_netr_SendToSamBase_get_message_type,
   24057             :                 .set = py_netr_SendToSamBase_set_message_type,
   24058             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamType")
   24059             :         },
   24060             :         {
   24061             :                 .name = discard_const_p(char, "message_size"),
   24062             :                 .get = py_netr_SendToSamBase_get_message_size,
   24063             :                 .set = py_netr_SendToSamBase_set_message_size,
   24064             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24065             :         },
   24066             :         {
   24067             :                 .name = discard_const_p(char, "message"),
   24068             :                 .get = py_netr_SendToSamBase_get_message,
   24069             :                 .set = py_netr_SendToSamBase_set_message,
   24070             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamMessage")
   24071             :         },
   24072             :         { .name = NULL }
   24073             : };
   24074             : 
   24075           0 : static PyObject *py_netr_SendToSamBase_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24076             : {
   24077           0 :         return pytalloc_new(struct netr_SendToSamBase, type);
   24078             : }
   24079             : 
   24080           0 : static PyObject *py_netr_SendToSamBase_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   24081             : {
   24082           0 :         struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
   24083           0 :         PyObject *ret = NULL;
   24084           0 :         DATA_BLOB blob;
   24085           0 :         enum ndr_err_code err;
   24086           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   24087           0 :         if (tmp_ctx == NULL) {
   24088           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   24089           0 :                 return NULL;
   24090             :         }
   24091           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SendToSamBase);
   24092           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   24093           0 :                 TALLOC_FREE(tmp_ctx);
   24094           0 :                 PyErr_SetNdrError(err);
   24095           0 :                 return NULL;
   24096             :         }
   24097             : 
   24098           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   24099           0 :         TALLOC_FREE(tmp_ctx);
   24100           0 :         return ret;
   24101             : }
   24102             : 
   24103           0 : static PyObject *py_netr_SendToSamBase_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   24104             : {
   24105           0 :         struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
   24106           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   24107           0 :         Py_ssize_t blob_length = 0;
   24108           0 :         enum ndr_err_code err;
   24109           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   24110           0 :         PyObject *allow_remaining_obj = NULL;
   24111           0 :         bool allow_remaining = false;
   24112             : 
   24113           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   24114             :                 discard_const_p(char *, kwnames),
   24115             :                 &blob.data, &blob_length,
   24116             :                 &allow_remaining_obj)) {
   24117           0 :                 return NULL;
   24118             :         }
   24119           0 :         blob.length = blob_length;
   24120             : 
   24121           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   24122           0 :                 allow_remaining = true;
   24123             :         }
   24124             : 
   24125           0 :         if (allow_remaining) {
   24126           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SendToSamBase);
   24127             :         } else {
   24128           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SendToSamBase);
   24129             :         }
   24130           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   24131           0 :                 PyErr_SetNdrError(err);
   24132           0 :                 return NULL;
   24133             :         }
   24134             : 
   24135           0 :         Py_RETURN_NONE;
   24136             : }
   24137             : 
   24138           0 : static PyObject *py_netr_SendToSamBase_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   24139             : {
   24140           0 :         struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
   24141           0 :         PyObject *ret;
   24142           0 :         char *retstr;
   24143             : 
   24144           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SendToSamBase, "netr_SendToSamBase", object);
   24145           0 :         ret = PyUnicode_FromString(retstr);
   24146           0 :         talloc_free(retstr);
   24147             : 
   24148           0 :         return ret;
   24149             : }
   24150             : 
   24151             : static PyMethodDef py_netr_SendToSamBase_methods[] = {
   24152             :         { "__ndr_pack__", (PyCFunction)py_netr_SendToSamBase_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   24153             :         { "__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" },
   24154             :         { "__ndr_print__", (PyCFunction)py_netr_SendToSamBase_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   24155             :         { NULL, NULL, 0, NULL }
   24156             : };
   24157             : 
   24158             : 
   24159             : static PyTypeObject netr_SendToSamBase_Type = {
   24160             :         PyVarObject_HEAD_INIT(NULL, 0)
   24161             :         .tp_name = "netlogon.netr_SendToSamBase",
   24162             :         .tp_getset = py_netr_SendToSamBase_getsetters,
   24163             :         .tp_methods = py_netr_SendToSamBase_methods,
   24164             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24165             :         .tp_new = py_netr_SendToSamBase_new,
   24166             : };
   24167             : 
   24168             : 
   24169           0 : static PyObject *py_netr_DsRAddressToSitenamesWCtr_get_count(PyObject *obj, void *closure)
   24170             : {
   24171           0 :         struct netr_DsRAddressToSitenamesWCtr *object = pytalloc_get_ptr(obj);
   24172           0 :         PyObject *py_count;
   24173           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   24174           0 :         return py_count;
   24175             : }
   24176             : 
   24177           0 : static int py_netr_DsRAddressToSitenamesWCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   24178             : {
   24179           0 :         struct netr_DsRAddressToSitenamesWCtr *object = pytalloc_get_ptr(py_obj);
   24180           0 :         if (value == NULL) {
   24181           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   24182           0 :                 return -1;
   24183             :         }
   24184             :         {
   24185           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   24186           0 :                 if (PyLong_Check(value)) {
   24187           0 :                         unsigned long long test_var;
   24188           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24189           0 :                         if (PyErr_Occurred() != NULL) {
   24190           0 :                                 return -1;
   24191             :                         }
   24192           0 :                         if (test_var > uint_max) {
   24193           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24194             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24195           0 :                                 return -1;
   24196             :                         }
   24197           0 :                         object->count = test_var;
   24198             :                 } else {
   24199           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24200             :                           PyLong_Type.tp_name);
   24201           0 :                         return -1;
   24202             :                 }
   24203             :         }
   24204           0 :         return 0;
   24205             : }
   24206             : 
   24207           0 : static PyObject *py_netr_DsRAddressToSitenamesWCtr_get_sitename(PyObject *obj, void *closure)
   24208             : {
   24209           0 :         struct netr_DsRAddressToSitenamesWCtr *object = pytalloc_get_ptr(obj);
   24210           0 :         PyObject *py_sitename;
   24211           0 :         if (object->sitename == NULL) {
   24212           0 :                 Py_RETURN_NONE;
   24213             :         }
   24214           0 :         if (object->sitename == NULL) {
   24215           0 :                 py_sitename = Py_None;
   24216           0 :                 Py_INCREF(py_sitename);
   24217             :         } else {
   24218           0 :                 py_sitename = PyList_New(object->count);
   24219           0 :                 if (py_sitename == NULL) {
   24220           0 :                         return NULL;
   24221             :                 }
   24222             :                 {
   24223             :                         int sitename_cntr_1;
   24224           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < (object->count); sitename_cntr_1++) {
   24225           0 :                                 PyObject *py_sitename_1;
   24226           0 :                                 py_sitename_1 = pytalloc_reference_ex(lsa_String_Type, object->sitename, &(object->sitename)[sitename_cntr_1]);
   24227           0 :                                 PyList_SetItem(py_sitename, sitename_cntr_1, py_sitename_1);
   24228             :                         }
   24229             :                 }
   24230             :         }
   24231           0 :         return py_sitename;
   24232             : }
   24233             : 
   24234           0 : static int py_netr_DsRAddressToSitenamesWCtr_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
   24235             : {
   24236           0 :         struct netr_DsRAddressToSitenamesWCtr *object = pytalloc_get_ptr(py_obj);
   24237           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sitename));
   24238           0 :         if (value == NULL) {
   24239           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sitename");
   24240           0 :                 return -1;
   24241             :         }
   24242           0 :         if (value == Py_None) {
   24243           0 :                 object->sitename = NULL;
   24244             :         } else {
   24245           0 :                 object->sitename = NULL;
   24246           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24247             :                 {
   24248           0 :                         int sitename_cntr_1;
   24249           0 :                         object->sitename = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sitename, PyList_GET_SIZE(value));
   24250           0 :                         if (!object->sitename) { return -1; }
   24251           0 :                         talloc_set_name_const(object->sitename, "ARRAY: object->sitename");
   24252           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < PyList_GET_SIZE(value); sitename_cntr_1++) {
   24253           0 :                                 if (PyList_GET_ITEM(value, sitename_cntr_1) == NULL) {
   24254           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sitename)[sitename_cntr_1]");
   24255           0 :                                         return -1;
   24256             :                                 }
   24257           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sitename_cntr_1), return -1;);
   24258           0 :                                 if (talloc_reference(object->sitename, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sitename_cntr_1))) == NULL) {
   24259           0 :                                         PyErr_NoMemory();
   24260           0 :                                         return -1;
   24261             :                                 }
   24262           0 :                                 (object->sitename)[sitename_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sitename_cntr_1));
   24263             :                         }
   24264             :                 }
   24265             :         }
   24266           0 :         return 0;
   24267             : }
   24268             : 
   24269             : static PyGetSetDef py_netr_DsRAddressToSitenamesWCtr_getsetters[] = {
   24270             :         {
   24271             :                 .name = discard_const_p(char, "count"),
   24272             :                 .get = py_netr_DsRAddressToSitenamesWCtr_get_count,
   24273             :                 .set = py_netr_DsRAddressToSitenamesWCtr_set_count,
   24274             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24275             :         },
   24276             :         {
   24277             :                 .name = discard_const_p(char, "sitename"),
   24278             :                 .get = py_netr_DsRAddressToSitenamesWCtr_get_sitename,
   24279             :                 .set = py_netr_DsRAddressToSitenamesWCtr_set_sitename,
   24280             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   24281             :         },
   24282             :         { .name = NULL }
   24283             : };
   24284             : 
   24285           0 : static PyObject *py_netr_DsRAddressToSitenamesWCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24286             : {
   24287           0 :         return pytalloc_new(struct netr_DsRAddressToSitenamesWCtr, type);
   24288             : }
   24289             : 
   24290             : 
   24291             : static PyTypeObject netr_DsRAddressToSitenamesWCtr_Type = {
   24292             :         PyVarObject_HEAD_INIT(NULL, 0)
   24293             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesWCtr",
   24294             :         .tp_getset = py_netr_DsRAddressToSitenamesWCtr_getsetters,
   24295             :         .tp_methods = NULL,
   24296             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24297             :         .tp_new = py_netr_DsRAddressToSitenamesWCtr_new,
   24298             : };
   24299             : 
   24300             : 
   24301           0 : static PyObject *py_netr_DsRAddress_get_buffer(PyObject *obj, void *closure)
   24302             : {
   24303           0 :         struct netr_DsRAddress *object = pytalloc_get_ptr(obj);
   24304           0 :         PyObject *py_buffer;
   24305           0 :         if (object->buffer == NULL) {
   24306           0 :                 Py_RETURN_NONE;
   24307             :         }
   24308           0 :         if (object->buffer == NULL) {
   24309           0 :                 py_buffer = Py_None;
   24310           0 :                 Py_INCREF(py_buffer);
   24311             :         } else {
   24312           0 :                 py_buffer = PyList_New(object->size);
   24313           0 :                 if (py_buffer == NULL) {
   24314           0 :                         return NULL;
   24315             :                 }
   24316             :                 {
   24317             :                         int buffer_cntr_1;
   24318           0 :                         for (buffer_cntr_1 = 0; buffer_cntr_1 < (object->size); buffer_cntr_1++) {
   24319           0 :                                 PyObject *py_buffer_1;
   24320           0 :                                 py_buffer_1 = PyLong_FromLong((uint16_t)((object->buffer)[buffer_cntr_1]));
   24321           0 :                                 PyList_SetItem(py_buffer, buffer_cntr_1, py_buffer_1);
   24322             :                         }
   24323             :                 }
   24324             :         }
   24325           0 :         return py_buffer;
   24326             : }
   24327             : 
   24328           0 : static int py_netr_DsRAddress_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   24329             : {
   24330           0 :         struct netr_DsRAddress *object = pytalloc_get_ptr(py_obj);
   24331           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->buffer));
   24332           0 :         if (value == NULL) {
   24333           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->buffer");
   24334           0 :                 return -1;
   24335             :         }
   24336           0 :         if (value == Py_None) {
   24337           0 :                 object->buffer = NULL;
   24338             :         } else {
   24339           0 :                 object->buffer = NULL;
   24340           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24341             :                 {
   24342           0 :                         int buffer_cntr_1;
   24343           0 :                         object->buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->buffer, PyList_GET_SIZE(value));
   24344           0 :                         if (!object->buffer) { return -1; }
   24345           0 :                         talloc_set_name_const(object->buffer, "ARRAY: object->buffer");
   24346           0 :                         for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(value); buffer_cntr_1++) {
   24347           0 :                                 if (PyList_GET_ITEM(value, buffer_cntr_1) == NULL) {
   24348           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->buffer)[buffer_cntr_1]");
   24349           0 :                                         return -1;
   24350             :                                 }
   24351             :                                 {
   24352           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->buffer)[buffer_cntr_1]));
   24353           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, buffer_cntr_1))) {
   24354           0 :                                                 unsigned long long test_var;
   24355           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, buffer_cntr_1));
   24356           0 :                                                 if (PyErr_Occurred() != NULL) {
   24357           0 :                                                         return -1;
   24358             :                                                 }
   24359           0 :                                                 if (test_var > uint_max) {
   24360           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24361             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   24362           0 :                                                         return -1;
   24363             :                                                 }
   24364           0 :                                                 (object->buffer)[buffer_cntr_1] = test_var;
   24365             :                                         } else {
   24366           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   24367             :                                                   PyLong_Type.tp_name);
   24368           0 :                                                 return -1;
   24369             :                                         }
   24370             :                                 }
   24371             :                         }
   24372             :                 }
   24373             :         }
   24374           0 :         return 0;
   24375             : }
   24376             : 
   24377           0 : static PyObject *py_netr_DsRAddress_get_size(PyObject *obj, void *closure)
   24378             : {
   24379           0 :         struct netr_DsRAddress *object = pytalloc_get_ptr(obj);
   24380           0 :         PyObject *py_size;
   24381           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
   24382           0 :         return py_size;
   24383             : }
   24384             : 
   24385           0 : static int py_netr_DsRAddress_set_size(PyObject *py_obj, PyObject *value, void *closure)
   24386             : {
   24387           0 :         struct netr_DsRAddress *object = pytalloc_get_ptr(py_obj);
   24388           0 :         if (value == NULL) {
   24389           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
   24390           0 :                 return -1;
   24391             :         }
   24392             :         {
   24393           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   24394           0 :                 if (PyLong_Check(value)) {
   24395           0 :                         unsigned long long test_var;
   24396           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24397           0 :                         if (PyErr_Occurred() != NULL) {
   24398           0 :                                 return -1;
   24399             :                         }
   24400           0 :                         if (test_var > uint_max) {
   24401           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24402             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24403           0 :                                 return -1;
   24404             :                         }
   24405           0 :                         object->size = test_var;
   24406             :                 } else {
   24407           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24408             :                           PyLong_Type.tp_name);
   24409           0 :                         return -1;
   24410             :                 }
   24411             :         }
   24412           0 :         return 0;
   24413             : }
   24414             : 
   24415             : static PyGetSetDef py_netr_DsRAddress_getsetters[] = {
   24416             :         {
   24417             :                 .name = discard_const_p(char, "buffer"),
   24418             :                 .get = py_netr_DsRAddress_get_buffer,
   24419             :                 .set = py_netr_DsRAddress_set_buffer,
   24420             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   24421             :         },
   24422             :         {
   24423             :                 .name = discard_const_p(char, "size"),
   24424             :                 .get = py_netr_DsRAddress_get_size,
   24425             :                 .set = py_netr_DsRAddress_set_size,
   24426             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24427             :         },
   24428             :         { .name = NULL }
   24429             : };
   24430             : 
   24431           0 : static PyObject *py_netr_DsRAddress_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24432             : {
   24433           0 :         return pytalloc_new(struct netr_DsRAddress, type);
   24434             : }
   24435             : 
   24436             : 
   24437             : static PyTypeObject netr_DsRAddress_Type = {
   24438             :         PyVarObject_HEAD_INIT(NULL, 0)
   24439             :         .tp_name = "netlogon.netr_DsRAddress",
   24440             :         .tp_getset = py_netr_DsRAddress_getsetters,
   24441             :         .tp_methods = NULL,
   24442             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24443             :         .tp_new = py_netr_DsRAddress_new,
   24444             : };
   24445             : 
   24446             : 
   24447           0 : static PyObject *py_netr_DomainTrust_get_netbios_name(PyObject *obj, void *closure)
   24448             : {
   24449           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
   24450           0 :         PyObject *py_netbios_name;
   24451           0 :         if (object->netbios_name == NULL) {
   24452           0 :                 Py_RETURN_NONE;
   24453             :         }
   24454           0 :         if (object->netbios_name == NULL) {
   24455           0 :                 py_netbios_name = Py_None;
   24456           0 :                 Py_INCREF(py_netbios_name);
   24457             :         } else {
   24458           0 :                 if (object->netbios_name == NULL) {
   24459           0 :                         py_netbios_name = Py_None;
   24460           0 :                         Py_INCREF(py_netbios_name);
   24461             :                 } else {
   24462           0 :                         py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
   24463             :                 }
   24464             :         }
   24465           0 :         return py_netbios_name;
   24466             : }
   24467             : 
   24468           0 : static int py_netr_DomainTrust_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
   24469             : {
   24470           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24471           0 :         if (value == NULL) {
   24472           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->netbios_name");
   24473           0 :                 return -1;
   24474             :         }
   24475           0 :         if (value == Py_None) {
   24476           0 :                 object->netbios_name = NULL;
   24477             :         } else {
   24478           0 :                 object->netbios_name = NULL;
   24479             :                 {
   24480           0 :                         const char *test_str;
   24481           0 :                         const char *talloc_str;
   24482           0 :                         PyObject *unicode = NULL;
   24483           0 :                         if (PyUnicode_Check(value)) {
   24484           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   24485           0 :                                 if (unicode == NULL) {
   24486           0 :                                         return -1;
   24487             :                                 }
   24488           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   24489           0 :                         } else if (PyBytes_Check(value)) {
   24490           0 :                                 test_str = PyBytes_AS_STRING(value);
   24491             :                         } else {
   24492           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   24493           0 :                                 return -1;
   24494             :                         }
   24495           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   24496           0 :                         if (unicode != NULL) {
   24497           0 :                                 Py_DECREF(unicode);
   24498             :                         }
   24499           0 :                         if (talloc_str == NULL) {
   24500           0 :                                 PyErr_NoMemory();
   24501           0 :                                 return -1;
   24502             :                         }
   24503           0 :                         object->netbios_name = talloc_str;
   24504             :                 }
   24505             :         }
   24506           0 :         return 0;
   24507             : }
   24508             : 
   24509          28 : static PyObject *py_netr_DomainTrust_get_dns_name(PyObject *obj, void *closure)
   24510             : {
   24511          28 :         struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
   24512           0 :         PyObject *py_dns_name;
   24513          28 :         if (object->dns_name == NULL) {
   24514           0 :                 Py_RETURN_NONE;
   24515             :         }
   24516          28 :         if (object->dns_name == NULL) {
   24517           0 :                 py_dns_name = Py_None;
   24518           0 :                 Py_INCREF(py_dns_name);
   24519             :         } else {
   24520          28 :                 if (object->dns_name == NULL) {
   24521           0 :                         py_dns_name = Py_None;
   24522           0 :                         Py_INCREF(py_dns_name);
   24523             :                 } else {
   24524          28 :                         py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
   24525             :                 }
   24526             :         }
   24527          28 :         return py_dns_name;
   24528             : }
   24529             : 
   24530           0 : static int py_netr_DomainTrust_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
   24531             : {
   24532           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24533           0 :         if (value == NULL) {
   24534           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_name");
   24535           0 :                 return -1;
   24536             :         }
   24537           0 :         if (value == Py_None) {
   24538           0 :                 object->dns_name = NULL;
   24539             :         } else {
   24540           0 :                 object->dns_name = NULL;
   24541             :                 {
   24542           0 :                         const char *test_str;
   24543           0 :                         const char *talloc_str;
   24544           0 :                         PyObject *unicode = NULL;
   24545           0 :                         if (PyUnicode_Check(value)) {
   24546           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   24547           0 :                                 if (unicode == NULL) {
   24548           0 :                                         return -1;
   24549             :                                 }
   24550           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   24551           0 :                         } else if (PyBytes_Check(value)) {
   24552           0 :                                 test_str = PyBytes_AS_STRING(value);
   24553             :                         } else {
   24554           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   24555           0 :                                 return -1;
   24556             :                         }
   24557           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   24558           0 :                         if (unicode != NULL) {
   24559           0 :                                 Py_DECREF(unicode);
   24560             :                         }
   24561           0 :                         if (talloc_str == NULL) {
   24562           0 :                                 PyErr_NoMemory();
   24563           0 :                                 return -1;
   24564             :                         }
   24565           0 :                         object->dns_name = talloc_str;
   24566             :                 }
   24567             :         }
   24568           0 :         return 0;
   24569             : }
   24570             : 
   24571         272 : static PyObject *py_netr_DomainTrust_get_trust_flags(PyObject *obj, void *closure)
   24572             : {
   24573         272 :         struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
   24574           0 :         PyObject *py_trust_flags;
   24575         272 :         py_trust_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_flags));
   24576         272 :         return py_trust_flags;
   24577             : }
   24578             : 
   24579           0 : static int py_netr_DomainTrust_set_trust_flags(PyObject *py_obj, PyObject *value, void *closure)
   24580             : {
   24581           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24582           0 :         if (value == NULL) {
   24583           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_flags");
   24584           0 :                 return -1;
   24585             :         }
   24586             :         {
   24587           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_flags));
   24588           0 :                 if (PyLong_Check(value)) {
   24589           0 :                         unsigned long long test_var;
   24590           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24591           0 :                         if (PyErr_Occurred() != NULL) {
   24592           0 :                                 return -1;
   24593             :                         }
   24594           0 :                         if (test_var > uint_max) {
   24595           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24596             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24597           0 :                                 return -1;
   24598             :                         }
   24599           0 :                         object->trust_flags = test_var;
   24600             :                 } else {
   24601           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24602             :                           PyLong_Type.tp_name);
   24603           0 :                         return -1;
   24604             :                 }
   24605             :         }
   24606           0 :         return 0;
   24607             : }
   24608             : 
   24609           0 : static PyObject *py_netr_DomainTrust_get_parent_index(PyObject *obj, void *closure)
   24610             : {
   24611           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
   24612           0 :         PyObject *py_parent_index;
   24613           0 :         py_parent_index = PyLong_FromUnsignedLongLong((uint32_t)(object->parent_index));
   24614           0 :         return py_parent_index;
   24615             : }
   24616             : 
   24617           0 : static int py_netr_DomainTrust_set_parent_index(PyObject *py_obj, PyObject *value, void *closure)
   24618             : {
   24619           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24620           0 :         if (value == NULL) {
   24621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->parent_index");
   24622           0 :                 return -1;
   24623             :         }
   24624             :         {
   24625           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parent_index));
   24626           0 :                 if (PyLong_Check(value)) {
   24627           0 :                         unsigned long long test_var;
   24628           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24629           0 :                         if (PyErr_Occurred() != NULL) {
   24630           0 :                                 return -1;
   24631             :                         }
   24632           0 :                         if (test_var > uint_max) {
   24633           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24634             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24635           0 :                                 return -1;
   24636             :                         }
   24637           0 :                         object->parent_index = test_var;
   24638             :                 } else {
   24639           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24640             :                           PyLong_Type.tp_name);
   24641           0 :                         return -1;
   24642             :                 }
   24643             :         }
   24644           0 :         return 0;
   24645             : }
   24646             : 
   24647          28 : static PyObject *py_netr_DomainTrust_get_trust_type(PyObject *obj, void *closure)
   24648             : {
   24649          28 :         struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
   24650           0 :         PyObject *py_trust_type;
   24651          28 :         py_trust_type = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_type));
   24652          28 :         return py_trust_type;
   24653             : }
   24654             : 
   24655           0 : static int py_netr_DomainTrust_set_trust_type(PyObject *py_obj, PyObject *value, void *closure)
   24656             : {
   24657           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24658           0 :         if (value == NULL) {
   24659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_type");
   24660           0 :                 return -1;
   24661             :         }
   24662             :         {
   24663           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_type));
   24664           0 :                 if (PyLong_Check(value)) {
   24665           0 :                         unsigned long long test_var;
   24666           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24667           0 :                         if (PyErr_Occurred() != NULL) {
   24668           0 :                                 return -1;
   24669             :                         }
   24670           0 :                         if (test_var > uint_max) {
   24671           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24672             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24673           0 :                                 return -1;
   24674             :                         }
   24675           0 :                         object->trust_type = test_var;
   24676             :                 } else {
   24677           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24678             :                           PyLong_Type.tp_name);
   24679           0 :                         return -1;
   24680             :                 }
   24681             :         }
   24682           0 :         return 0;
   24683             : }
   24684             : 
   24685          84 : static PyObject *py_netr_DomainTrust_get_trust_attributes(PyObject *obj, void *closure)
   24686             : {
   24687          84 :         struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
   24688           0 :         PyObject *py_trust_attributes;
   24689          84 :         py_trust_attributes = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_attributes));
   24690          84 :         return py_trust_attributes;
   24691             : }
   24692             : 
   24693           0 : static int py_netr_DomainTrust_set_trust_attributes(PyObject *py_obj, PyObject *value, void *closure)
   24694             : {
   24695           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24696           0 :         if (value == NULL) {
   24697           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_attributes");
   24698           0 :                 return -1;
   24699             :         }
   24700             :         {
   24701           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_attributes));
   24702           0 :                 if (PyLong_Check(value)) {
   24703           0 :                         unsigned long long test_var;
   24704           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24705           0 :                         if (PyErr_Occurred() != NULL) {
   24706           0 :                                 return -1;
   24707             :                         }
   24708           0 :                         if (test_var > uint_max) {
   24709           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24710             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24711           0 :                                 return -1;
   24712             :                         }
   24713           0 :                         object->trust_attributes = test_var;
   24714             :                 } else {
   24715           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24716             :                           PyLong_Type.tp_name);
   24717           0 :                         return -1;
   24718             :                 }
   24719             :         }
   24720           0 :         return 0;
   24721             : }
   24722             : 
   24723           0 : static PyObject *py_netr_DomainTrust_get_sid(PyObject *obj, void *closure)
   24724             : {
   24725           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
   24726           0 :         PyObject *py_sid;
   24727           0 :         if (object->sid == NULL) {
   24728           0 :                 Py_RETURN_NONE;
   24729             :         }
   24730           0 :         if (object->sid == NULL) {
   24731           0 :                 py_sid = Py_None;
   24732           0 :                 Py_INCREF(py_sid);
   24733             :         } else {
   24734           0 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
   24735             :         }
   24736           0 :         return py_sid;
   24737             : }
   24738             : 
   24739           0 : static int py_netr_DomainTrust_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   24740             : {
   24741           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24742           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
   24743           0 :         if (value == NULL) {
   24744           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sid");
   24745           0 :                 return -1;
   24746             :         }
   24747           0 :         if (value == Py_None) {
   24748           0 :                 object->sid = NULL;
   24749             :         } else {
   24750           0 :                 object->sid = NULL;
   24751           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   24752           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24753           0 :                         PyErr_NoMemory();
   24754           0 :                         return -1;
   24755             :                 }
   24756           0 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
   24757             :         }
   24758           0 :         return 0;
   24759             : }
   24760             : 
   24761           0 : static PyObject *py_netr_DomainTrust_get_guid(PyObject *obj, void *closure)
   24762             : {
   24763           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
   24764           0 :         PyObject *py_guid;
   24765           0 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
   24766           0 :         return py_guid;
   24767             : }
   24768             : 
   24769           0 : static int py_netr_DomainTrust_set_guid(PyObject *py_obj, PyObject *value, void *closure)
   24770             : {
   24771           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24772           0 :         if (value == NULL) {
   24773           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->guid");
   24774           0 :                 return -1;
   24775             :         }
   24776           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   24777           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24778           0 :                 PyErr_NoMemory();
   24779           0 :                 return -1;
   24780             :         }
   24781           0 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
   24782           0 :         return 0;
   24783             : }
   24784             : 
   24785             : static PyGetSetDef py_netr_DomainTrust_getsetters[] = {
   24786             :         {
   24787             :                 .name = discard_const_p(char, "netbios_name"),
   24788             :                 .get = py_netr_DomainTrust_get_netbios_name,
   24789             :                 .set = py_netr_DomainTrust_set_netbios_name,
   24790             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   24791             :         },
   24792             :         {
   24793             :                 .name = discard_const_p(char, "dns_name"),
   24794             :                 .get = py_netr_DomainTrust_get_dns_name,
   24795             :                 .set = py_netr_DomainTrust_set_dns_name,
   24796             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   24797             :         },
   24798             :         {
   24799             :                 .name = discard_const_p(char, "trust_flags"),
   24800             :                 .get = py_netr_DomainTrust_get_trust_flags,
   24801             :                 .set = py_netr_DomainTrust_set_trust_flags,
   24802             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
   24803             :         },
   24804             :         {
   24805             :                 .name = discard_const_p(char, "parent_index"),
   24806             :                 .get = py_netr_DomainTrust_get_parent_index,
   24807             :                 .set = py_netr_DomainTrust_set_parent_index,
   24808             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24809             :         },
   24810             :         {
   24811             :                 .name = discard_const_p(char, "trust_type"),
   24812             :                 .get = py_netr_DomainTrust_get_trust_type,
   24813             :                 .set = py_netr_DomainTrust_set_trust_type,
   24814             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustType")
   24815             :         },
   24816             :         {
   24817             :                 .name = discard_const_p(char, "trust_attributes"),
   24818             :                 .get = py_netr_DomainTrust_get_trust_attributes,
   24819             :                 .set = py_netr_DomainTrust_set_trust_attributes,
   24820             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustAttributes")
   24821             :         },
   24822             :         {
   24823             :                 .name = discard_const_p(char, "sid"),
   24824             :                 .get = py_netr_DomainTrust_get_sid,
   24825             :                 .set = py_netr_DomainTrust_set_sid,
   24826             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
   24827             :         },
   24828             :         {
   24829             :                 .name = discard_const_p(char, "guid"),
   24830             :                 .get = py_netr_DomainTrust_get_guid,
   24831             :                 .set = py_netr_DomainTrust_set_guid,
   24832             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   24833             :         },
   24834             :         { .name = NULL }
   24835             : };
   24836             : 
   24837           0 : static PyObject *py_netr_DomainTrust_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24838             : {
   24839           0 :         return pytalloc_new(struct netr_DomainTrust, type);
   24840             : }
   24841             : 
   24842           0 : static PyObject *py_netr_DomainTrust_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   24843             : {
   24844           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24845           0 :         PyObject *ret = NULL;
   24846           0 :         DATA_BLOB blob;
   24847           0 :         enum ndr_err_code err;
   24848           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   24849           0 :         if (tmp_ctx == NULL) {
   24850           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   24851           0 :                 return NULL;
   24852             :         }
   24853           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DomainTrust);
   24854           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   24855           0 :                 TALLOC_FREE(tmp_ctx);
   24856           0 :                 PyErr_SetNdrError(err);
   24857           0 :                 return NULL;
   24858             :         }
   24859             : 
   24860           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   24861           0 :         TALLOC_FREE(tmp_ctx);
   24862           0 :         return ret;
   24863             : }
   24864             : 
   24865           0 : static PyObject *py_netr_DomainTrust_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   24866             : {
   24867           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24868           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   24869           0 :         Py_ssize_t blob_length = 0;
   24870           0 :         enum ndr_err_code err;
   24871           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   24872           0 :         PyObject *allow_remaining_obj = NULL;
   24873           0 :         bool allow_remaining = false;
   24874             : 
   24875           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   24876             :                 discard_const_p(char *, kwnames),
   24877             :                 &blob.data, &blob_length,
   24878             :                 &allow_remaining_obj)) {
   24879           0 :                 return NULL;
   24880             :         }
   24881           0 :         blob.length = blob_length;
   24882             : 
   24883           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   24884           0 :                 allow_remaining = true;
   24885             :         }
   24886             : 
   24887           0 :         if (allow_remaining) {
   24888           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrust);
   24889             :         } else {
   24890           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrust);
   24891             :         }
   24892           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   24893           0 :                 PyErr_SetNdrError(err);
   24894           0 :                 return NULL;
   24895             :         }
   24896             : 
   24897           0 :         Py_RETURN_NONE;
   24898             : }
   24899             : 
   24900           0 : static PyObject *py_netr_DomainTrust_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   24901             : {
   24902           0 :         struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
   24903           0 :         PyObject *ret;
   24904           0 :         char *retstr;
   24905             : 
   24906           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DomainTrust, "netr_DomainTrust", object);
   24907           0 :         ret = PyUnicode_FromString(retstr);
   24908           0 :         talloc_free(retstr);
   24909             : 
   24910           0 :         return ret;
   24911             : }
   24912             : 
   24913             : static PyMethodDef py_netr_DomainTrust_methods[] = {
   24914             :         { "__ndr_pack__", (PyCFunction)py_netr_DomainTrust_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   24915             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainTrust_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   24916             :         { "__ndr_print__", (PyCFunction)py_netr_DomainTrust_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   24917             :         { NULL, NULL, 0, NULL }
   24918             : };
   24919             : 
   24920             : 
   24921             : static PyTypeObject netr_DomainTrust_Type = {
   24922             :         PyVarObject_HEAD_INIT(NULL, 0)
   24923             :         .tp_name = "netlogon.netr_DomainTrust",
   24924             :         .tp_getset = py_netr_DomainTrust_getsetters,
   24925             :         .tp_methods = py_netr_DomainTrust_methods,
   24926             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24927             :         .tp_new = py_netr_DomainTrust_new,
   24928             : };
   24929             : 
   24930             : 
   24931           0 : static PyObject *py_netr_DomainTrustList_get_count(PyObject *obj, void *closure)
   24932             : {
   24933           0 :         struct netr_DomainTrustList *object = pytalloc_get_ptr(obj);
   24934           0 :         PyObject *py_count;
   24935           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   24936           0 :         return py_count;
   24937             : }
   24938             : 
   24939           0 : static int py_netr_DomainTrustList_set_count(PyObject *py_obj, PyObject *value, void *closure)
   24940             : {
   24941           0 :         struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
   24942           0 :         if (value == NULL) {
   24943           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   24944           0 :                 return -1;
   24945             :         }
   24946             :         {
   24947           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   24948           0 :                 if (PyLong_Check(value)) {
   24949           0 :                         unsigned long long test_var;
   24950           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24951           0 :                         if (PyErr_Occurred() != NULL) {
   24952           0 :                                 return -1;
   24953             :                         }
   24954           0 :                         if (test_var > uint_max) {
   24955           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24956             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24957           0 :                                 return -1;
   24958             :                         }
   24959           0 :                         object->count = test_var;
   24960             :                 } else {
   24961           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24962             :                           PyLong_Type.tp_name);
   24963           0 :                         return -1;
   24964             :                 }
   24965             :         }
   24966           0 :         return 0;
   24967             : }
   24968             : 
   24969          18 : static PyObject *py_netr_DomainTrustList_get_array(PyObject *obj, void *closure)
   24970             : {
   24971          18 :         struct netr_DomainTrustList *object = pytalloc_get_ptr(obj);
   24972           0 :         PyObject *py_array;
   24973          18 :         if (object->array == NULL) {
   24974           0 :                 Py_RETURN_NONE;
   24975             :         }
   24976          18 :         if (object->array == NULL) {
   24977           0 :                 py_array = Py_None;
   24978           0 :                 Py_INCREF(py_array);
   24979             :         } else {
   24980          18 :                 py_array = PyList_New(object->count);
   24981          18 :                 if (py_array == NULL) {
   24982           0 :                         return NULL;
   24983             :                 }
   24984             :                 {
   24985             :                         int array_cntr_1;
   24986          64 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   24987           0 :                                 PyObject *py_array_1;
   24988          46 :                                 py_array_1 = pytalloc_reference_ex(&netr_DomainTrust_Type, object->array, &(object->array)[array_cntr_1]);
   24989          46 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   24990             :                         }
   24991             :                 }
   24992             :         }
   24993          18 :         return py_array;
   24994             : }
   24995             : 
   24996           0 : static int py_netr_DomainTrustList_set_array(PyObject *py_obj, PyObject *value, void *closure)
   24997             : {
   24998           0 :         struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
   24999           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   25000           0 :         if (value == NULL) {
   25001           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
   25002           0 :                 return -1;
   25003             :         }
   25004           0 :         if (value == Py_None) {
   25005           0 :                 object->array = NULL;
   25006             :         } else {
   25007           0 :                 object->array = NULL;
   25008           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25009             :                 {
   25010           0 :                         int array_cntr_1;
   25011           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   25012           0 :                         if (!object->array) { return -1; }
   25013           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   25014           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   25015           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   25016           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
   25017           0 :                                         return -1;
   25018             :                                 }
   25019           0 :                                 PY_CHECK_TYPE(&netr_DomainTrust_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   25020           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   25021           0 :                                         PyErr_NoMemory();
   25022           0 :                                         return -1;
   25023             :                                 }
   25024           0 :                                 (object->array)[array_cntr_1] = *(struct netr_DomainTrust *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   25025             :                         }
   25026             :                 }
   25027             :         }
   25028           0 :         return 0;
   25029             : }
   25030             : 
   25031             : static PyGetSetDef py_netr_DomainTrustList_getsetters[] = {
   25032             :         {
   25033             :                 .name = discard_const_p(char, "count"),
   25034             :                 .get = py_netr_DomainTrustList_get_count,
   25035             :                 .set = py_netr_DomainTrustList_set_count,
   25036             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25037             :         },
   25038             :         {
   25039             :                 .name = discard_const_p(char, "array"),
   25040             :                 .get = py_netr_DomainTrustList_get_array,
   25041             :                 .set = py_netr_DomainTrustList_set_array,
   25042             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrust")
   25043             :         },
   25044             :         { .name = NULL }
   25045             : };
   25046             : 
   25047           0 : static PyObject *py_netr_DomainTrustList_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25048             : {
   25049           0 :         return pytalloc_new(struct netr_DomainTrustList, type);
   25050             : }
   25051             : 
   25052           0 : static PyObject *py_netr_DomainTrustList_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   25053             : {
   25054           0 :         struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
   25055           0 :         PyObject *ret = NULL;
   25056           0 :         DATA_BLOB blob;
   25057           0 :         enum ndr_err_code err;
   25058           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   25059           0 :         if (tmp_ctx == NULL) {
   25060           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   25061           0 :                 return NULL;
   25062             :         }
   25063           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DomainTrustList);
   25064           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   25065           0 :                 TALLOC_FREE(tmp_ctx);
   25066           0 :                 PyErr_SetNdrError(err);
   25067           0 :                 return NULL;
   25068             :         }
   25069             : 
   25070           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   25071           0 :         TALLOC_FREE(tmp_ctx);
   25072           0 :         return ret;
   25073             : }
   25074             : 
   25075           0 : static PyObject *py_netr_DomainTrustList_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   25076             : {
   25077           0 :         struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
   25078           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   25079           0 :         Py_ssize_t blob_length = 0;
   25080           0 :         enum ndr_err_code err;
   25081           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   25082           0 :         PyObject *allow_remaining_obj = NULL;
   25083           0 :         bool allow_remaining = false;
   25084             : 
   25085           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   25086             :                 discard_const_p(char *, kwnames),
   25087             :                 &blob.data, &blob_length,
   25088             :                 &allow_remaining_obj)) {
   25089           0 :                 return NULL;
   25090             :         }
   25091           0 :         blob.length = blob_length;
   25092             : 
   25093           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   25094           0 :                 allow_remaining = true;
   25095             :         }
   25096             : 
   25097           0 :         if (allow_remaining) {
   25098           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrustList);
   25099             :         } else {
   25100           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrustList);
   25101             :         }
   25102           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   25103           0 :                 PyErr_SetNdrError(err);
   25104           0 :                 return NULL;
   25105             :         }
   25106             : 
   25107           0 :         Py_RETURN_NONE;
   25108             : }
   25109             : 
   25110           0 : static PyObject *py_netr_DomainTrustList_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   25111             : {
   25112           0 :         struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
   25113           0 :         PyObject *ret;
   25114           0 :         char *retstr;
   25115             : 
   25116           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DomainTrustList, "netr_DomainTrustList", object);
   25117           0 :         ret = PyUnicode_FromString(retstr);
   25118           0 :         talloc_free(retstr);
   25119             : 
   25120           0 :         return ret;
   25121             : }
   25122             : 
   25123             : static PyMethodDef py_netr_DomainTrustList_methods[] = {
   25124             :         { "__ndr_pack__", (PyCFunction)py_netr_DomainTrustList_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   25125             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainTrustList_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   25126             :         { "__ndr_print__", (PyCFunction)py_netr_DomainTrustList_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   25127             :         { NULL, NULL, 0, NULL }
   25128             : };
   25129             : 
   25130             : 
   25131             : static PyTypeObject netr_DomainTrustList_Type = {
   25132             :         PyVarObject_HEAD_INIT(NULL, 0)
   25133             :         .tp_name = "netlogon.netr_DomainTrustList",
   25134             :         .tp_getset = py_netr_DomainTrustList_getsetters,
   25135             :         .tp_methods = py_netr_DomainTrustList_methods,
   25136             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25137             :         .tp_new = py_netr_DomainTrustList_new,
   25138             : };
   25139             : 
   25140             : 
   25141           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_count(PyObject *obj, void *closure)
   25142             : {
   25143           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(obj);
   25144           0 :         PyObject *py_count;
   25145           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   25146           0 :         return py_count;
   25147             : }
   25148             : 
   25149           0 : static int py_netr_DsRAddressToSitenamesExWCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   25150             : {
   25151           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(py_obj);
   25152           0 :         if (value == NULL) {
   25153           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   25154           0 :                 return -1;
   25155             :         }
   25156             :         {
   25157           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   25158           0 :                 if (PyLong_Check(value)) {
   25159           0 :                         unsigned long long test_var;
   25160           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25161           0 :                         if (PyErr_Occurred() != NULL) {
   25162           0 :                                 return -1;
   25163             :                         }
   25164           0 :                         if (test_var > uint_max) {
   25165           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25166             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25167           0 :                                 return -1;
   25168             :                         }
   25169           0 :                         object->count = test_var;
   25170             :                 } else {
   25171           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25172             :                           PyLong_Type.tp_name);
   25173           0 :                         return -1;
   25174             :                 }
   25175             :         }
   25176           0 :         return 0;
   25177             : }
   25178             : 
   25179           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_sitename(PyObject *obj, void *closure)
   25180             : {
   25181           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(obj);
   25182           0 :         PyObject *py_sitename;
   25183           0 :         if (object->sitename == NULL) {
   25184           0 :                 Py_RETURN_NONE;
   25185             :         }
   25186           0 :         if (object->sitename == NULL) {
   25187           0 :                 py_sitename = Py_None;
   25188           0 :                 Py_INCREF(py_sitename);
   25189             :         } else {
   25190           0 :                 py_sitename = PyList_New(object->count);
   25191           0 :                 if (py_sitename == NULL) {
   25192           0 :                         return NULL;
   25193             :                 }
   25194             :                 {
   25195             :                         int sitename_cntr_1;
   25196           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < (object->count); sitename_cntr_1++) {
   25197           0 :                                 PyObject *py_sitename_1;
   25198           0 :                                 py_sitename_1 = pytalloc_reference_ex(lsa_String_Type, object->sitename, &(object->sitename)[sitename_cntr_1]);
   25199           0 :                                 PyList_SetItem(py_sitename, sitename_cntr_1, py_sitename_1);
   25200             :                         }
   25201             :                 }
   25202             :         }
   25203           0 :         return py_sitename;
   25204             : }
   25205             : 
   25206           0 : static int py_netr_DsRAddressToSitenamesExWCtr_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
   25207             : {
   25208           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(py_obj);
   25209           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sitename));
   25210           0 :         if (value == NULL) {
   25211           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sitename");
   25212           0 :                 return -1;
   25213             :         }
   25214           0 :         if (value == Py_None) {
   25215           0 :                 object->sitename = NULL;
   25216             :         } else {
   25217           0 :                 object->sitename = NULL;
   25218           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25219             :                 {
   25220           0 :                         int sitename_cntr_1;
   25221           0 :                         object->sitename = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sitename, PyList_GET_SIZE(value));
   25222           0 :                         if (!object->sitename) { return -1; }
   25223           0 :                         talloc_set_name_const(object->sitename, "ARRAY: object->sitename");
   25224           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < PyList_GET_SIZE(value); sitename_cntr_1++) {
   25225           0 :                                 if (PyList_GET_ITEM(value, sitename_cntr_1) == NULL) {
   25226           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sitename)[sitename_cntr_1]");
   25227           0 :                                         return -1;
   25228             :                                 }
   25229           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sitename_cntr_1), return -1;);
   25230           0 :                                 if (talloc_reference(object->sitename, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sitename_cntr_1))) == NULL) {
   25231           0 :                                         PyErr_NoMemory();
   25232           0 :                                         return -1;
   25233             :                                 }
   25234           0 :                                 (object->sitename)[sitename_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sitename_cntr_1));
   25235             :                         }
   25236             :                 }
   25237             :         }
   25238           0 :         return 0;
   25239             : }
   25240             : 
   25241           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_subnetname(PyObject *obj, void *closure)
   25242             : {
   25243           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(obj);
   25244           0 :         PyObject *py_subnetname;
   25245           0 :         if (object->subnetname == NULL) {
   25246           0 :                 Py_RETURN_NONE;
   25247             :         }
   25248           0 :         if (object->subnetname == NULL) {
   25249           0 :                 py_subnetname = Py_None;
   25250           0 :                 Py_INCREF(py_subnetname);
   25251             :         } else {
   25252           0 :                 py_subnetname = PyList_New(object->count);
   25253           0 :                 if (py_subnetname == NULL) {
   25254           0 :                         return NULL;
   25255             :                 }
   25256             :                 {
   25257             :                         int subnetname_cntr_1;
   25258           0 :                         for (subnetname_cntr_1 = 0; subnetname_cntr_1 < (object->count); subnetname_cntr_1++) {
   25259           0 :                                 PyObject *py_subnetname_1;
   25260           0 :                                 py_subnetname_1 = pytalloc_reference_ex(lsa_String_Type, object->subnetname, &(object->subnetname)[subnetname_cntr_1]);
   25261           0 :                                 PyList_SetItem(py_subnetname, subnetname_cntr_1, py_subnetname_1);
   25262             :                         }
   25263             :                 }
   25264             :         }
   25265           0 :         return py_subnetname;
   25266             : }
   25267             : 
   25268           0 : static int py_netr_DsRAddressToSitenamesExWCtr_set_subnetname(PyObject *py_obj, PyObject *value, void *closure)
   25269             : {
   25270           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(py_obj);
   25271           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->subnetname));
   25272           0 :         if (value == NULL) {
   25273           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->subnetname");
   25274           0 :                 return -1;
   25275             :         }
   25276           0 :         if (value == Py_None) {
   25277           0 :                 object->subnetname = NULL;
   25278             :         } else {
   25279           0 :                 object->subnetname = NULL;
   25280           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25281             :                 {
   25282           0 :                         int subnetname_cntr_1;
   25283           0 :                         object->subnetname = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->subnetname, PyList_GET_SIZE(value));
   25284           0 :                         if (!object->subnetname) { return -1; }
   25285           0 :                         talloc_set_name_const(object->subnetname, "ARRAY: object->subnetname");
   25286           0 :                         for (subnetname_cntr_1 = 0; subnetname_cntr_1 < PyList_GET_SIZE(value); subnetname_cntr_1++) {
   25287           0 :                                 if (PyList_GET_ITEM(value, subnetname_cntr_1) == NULL) {
   25288           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->subnetname)[subnetname_cntr_1]");
   25289           0 :                                         return -1;
   25290             :                                 }
   25291           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, subnetname_cntr_1), return -1;);
   25292           0 :                                 if (talloc_reference(object->subnetname, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, subnetname_cntr_1))) == NULL) {
   25293           0 :                                         PyErr_NoMemory();
   25294           0 :                                         return -1;
   25295             :                                 }
   25296           0 :                                 (object->subnetname)[subnetname_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, subnetname_cntr_1));
   25297             :                         }
   25298             :                 }
   25299             :         }
   25300           0 :         return 0;
   25301             : }
   25302             : 
   25303             : static PyGetSetDef py_netr_DsRAddressToSitenamesExWCtr_getsetters[] = {
   25304             :         {
   25305             :                 .name = discard_const_p(char, "count"),
   25306             :                 .get = py_netr_DsRAddressToSitenamesExWCtr_get_count,
   25307             :                 .set = py_netr_DsRAddressToSitenamesExWCtr_set_count,
   25308             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25309             :         },
   25310             :         {
   25311             :                 .name = discard_const_p(char, "sitename"),
   25312             :                 .get = py_netr_DsRAddressToSitenamesExWCtr_get_sitename,
   25313             :                 .set = py_netr_DsRAddressToSitenamesExWCtr_set_sitename,
   25314             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25315             :         },
   25316             :         {
   25317             :                 .name = discard_const_p(char, "subnetname"),
   25318             :                 .get = py_netr_DsRAddressToSitenamesExWCtr_get_subnetname,
   25319             :                 .set = py_netr_DsRAddressToSitenamesExWCtr_set_subnetname,
   25320             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25321             :         },
   25322             :         { .name = NULL }
   25323             : };
   25324             : 
   25325           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25326             : {
   25327           0 :         return pytalloc_new(struct netr_DsRAddressToSitenamesExWCtr, type);
   25328             : }
   25329             : 
   25330             : 
   25331             : static PyTypeObject netr_DsRAddressToSitenamesExWCtr_Type = {
   25332             :         PyVarObject_HEAD_INIT(NULL, 0)
   25333             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesExWCtr",
   25334             :         .tp_getset = py_netr_DsRAddressToSitenamesExWCtr_getsetters,
   25335             :         .tp_methods = NULL,
   25336             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25337             :         .tp_new = py_netr_DsRAddressToSitenamesExWCtr_new,
   25338             : };
   25339             : 
   25340             : 
   25341           0 : static PyObject *py_DcSitesCtr_get_num_sites(PyObject *obj, void *closure)
   25342             : {
   25343           0 :         struct DcSitesCtr *object = pytalloc_get_ptr(obj);
   25344           0 :         PyObject *py_num_sites;
   25345           0 :         py_num_sites = PyLong_FromUnsignedLongLong((uint32_t)(object->num_sites));
   25346           0 :         return py_num_sites;
   25347             : }
   25348             : 
   25349           0 : static int py_DcSitesCtr_set_num_sites(PyObject *py_obj, PyObject *value, void *closure)
   25350             : {
   25351           0 :         struct DcSitesCtr *object = pytalloc_get_ptr(py_obj);
   25352           0 :         if (value == NULL) {
   25353           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_sites");
   25354           0 :                 return -1;
   25355             :         }
   25356             :         {
   25357           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_sites));
   25358           0 :                 if (PyLong_Check(value)) {
   25359           0 :                         unsigned long long test_var;
   25360           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25361           0 :                         if (PyErr_Occurred() != NULL) {
   25362           0 :                                 return -1;
   25363             :                         }
   25364           0 :                         if (test_var > uint_max) {
   25365           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25366             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25367           0 :                                 return -1;
   25368             :                         }
   25369           0 :                         object->num_sites = test_var;
   25370             :                 } else {
   25371           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25372             :                           PyLong_Type.tp_name);
   25373           0 :                         return -1;
   25374             :                 }
   25375             :         }
   25376           0 :         return 0;
   25377             : }
   25378             : 
   25379           0 : static PyObject *py_DcSitesCtr_get_sites(PyObject *obj, void *closure)
   25380             : {
   25381           0 :         struct DcSitesCtr *object = pytalloc_get_ptr(obj);
   25382           0 :         PyObject *py_sites;
   25383           0 :         if (object->sites == NULL) {
   25384           0 :                 Py_RETURN_NONE;
   25385             :         }
   25386           0 :         if (object->sites == NULL) {
   25387           0 :                 py_sites = Py_None;
   25388           0 :                 Py_INCREF(py_sites);
   25389             :         } else {
   25390           0 :                 py_sites = PyList_New(object->num_sites);
   25391           0 :                 if (py_sites == NULL) {
   25392           0 :                         return NULL;
   25393             :                 }
   25394             :                 {
   25395             :                         int sites_cntr_1;
   25396           0 :                         for (sites_cntr_1 = 0; sites_cntr_1 < (object->num_sites); sites_cntr_1++) {
   25397           0 :                                 PyObject *py_sites_1;
   25398           0 :                                 py_sites_1 = pytalloc_reference_ex(lsa_String_Type, object->sites, &(object->sites)[sites_cntr_1]);
   25399           0 :                                 PyList_SetItem(py_sites, sites_cntr_1, py_sites_1);
   25400             :                         }
   25401             :                 }
   25402             :         }
   25403           0 :         return py_sites;
   25404             : }
   25405             : 
   25406           0 : static int py_DcSitesCtr_set_sites(PyObject *py_obj, PyObject *value, void *closure)
   25407             : {
   25408           0 :         struct DcSitesCtr *object = pytalloc_get_ptr(py_obj);
   25409           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sites));
   25410           0 :         if (value == NULL) {
   25411           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sites");
   25412           0 :                 return -1;
   25413             :         }
   25414           0 :         if (value == Py_None) {
   25415           0 :                 object->sites = NULL;
   25416             :         } else {
   25417           0 :                 object->sites = NULL;
   25418           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25419             :                 {
   25420           0 :                         int sites_cntr_1;
   25421           0 :                         object->sites = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sites, PyList_GET_SIZE(value));
   25422           0 :                         if (!object->sites) { return -1; }
   25423           0 :                         talloc_set_name_const(object->sites, "ARRAY: object->sites");
   25424           0 :                         for (sites_cntr_1 = 0; sites_cntr_1 < PyList_GET_SIZE(value); sites_cntr_1++) {
   25425           0 :                                 if (PyList_GET_ITEM(value, sites_cntr_1) == NULL) {
   25426           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sites)[sites_cntr_1]");
   25427           0 :                                         return -1;
   25428             :                                 }
   25429           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sites_cntr_1), return -1;);
   25430           0 :                                 if (talloc_reference(object->sites, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sites_cntr_1))) == NULL) {
   25431           0 :                                         PyErr_NoMemory();
   25432           0 :                                         return -1;
   25433             :                                 }
   25434           0 :                                 (object->sites)[sites_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sites_cntr_1));
   25435             :                         }
   25436             :                 }
   25437             :         }
   25438           0 :         return 0;
   25439             : }
   25440             : 
   25441             : static PyGetSetDef py_DcSitesCtr_getsetters[] = {
   25442             :         {
   25443             :                 .name = discard_const_p(char, "num_sites"),
   25444             :                 .get = py_DcSitesCtr_get_num_sites,
   25445             :                 .set = py_DcSitesCtr_set_num_sites,
   25446             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25447             :         },
   25448             :         {
   25449             :                 .name = discard_const_p(char, "sites"),
   25450             :                 .get = py_DcSitesCtr_get_sites,
   25451             :                 .set = py_DcSitesCtr_set_sites,
   25452             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25453             :         },
   25454             :         { .name = NULL }
   25455             : };
   25456             : 
   25457           0 : static PyObject *py_DcSitesCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25458             : {
   25459           0 :         return pytalloc_new(struct DcSitesCtr, type);
   25460             : }
   25461             : 
   25462             : 
   25463             : static PyTypeObject DcSitesCtr_Type = {
   25464             :         PyVarObject_HEAD_INIT(NULL, 0)
   25465             :         .tp_name = "netlogon.DcSitesCtr",
   25466             :         .tp_getset = py_DcSitesCtr_getsetters,
   25467             :         .tp_methods = NULL,
   25468             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25469             :         .tp_new = py_DcSitesCtr_new,
   25470             : };
   25471             : 
   25472             : 
   25473           0 : static PyObject *py_netr_TrustInfo_get_count(PyObject *obj, void *closure)
   25474             : {
   25475           0 :         struct netr_TrustInfo *object = pytalloc_get_ptr(obj);
   25476           0 :         PyObject *py_count;
   25477           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   25478           0 :         return py_count;
   25479             : }
   25480             : 
   25481           0 : static int py_netr_TrustInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
   25482             : {
   25483           0 :         struct netr_TrustInfo *object = pytalloc_get_ptr(py_obj);
   25484           0 :         if (value == NULL) {
   25485           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   25486           0 :                 return -1;
   25487             :         }
   25488             :         {
   25489           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   25490           0 :                 if (PyLong_Check(value)) {
   25491           0 :                         unsigned long long test_var;
   25492           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25493           0 :                         if (PyErr_Occurred() != NULL) {
   25494           0 :                                 return -1;
   25495             :                         }
   25496           0 :                         if (test_var > uint_max) {
   25497           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25498             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25499           0 :                                 return -1;
   25500             :                         }
   25501           0 :                         object->count = test_var;
   25502             :                 } else {
   25503           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25504             :                           PyLong_Type.tp_name);
   25505           0 :                         return -1;
   25506             :                 }
   25507             :         }
   25508           0 :         return 0;
   25509             : }
   25510             : 
   25511           0 : static PyObject *py_netr_TrustInfo_get_data(PyObject *obj, void *closure)
   25512             : {
   25513           0 :         struct netr_TrustInfo *object = pytalloc_get_ptr(obj);
   25514           0 :         PyObject *py_data;
   25515           0 :         if (object->data == NULL) {
   25516           0 :                 Py_RETURN_NONE;
   25517             :         }
   25518           0 :         if (object->data == NULL) {
   25519           0 :                 py_data = Py_None;
   25520           0 :                 Py_INCREF(py_data);
   25521             :         } else {
   25522           0 :                 py_data = PyList_New(object->count);
   25523           0 :                 if (py_data == NULL) {
   25524           0 :                         return NULL;
   25525             :                 }
   25526             :                 {
   25527             :                         int data_cntr_1;
   25528           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->count); data_cntr_1++) {
   25529           0 :                                 PyObject *py_data_1;
   25530           0 :                                 py_data_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->data)[data_cntr_1]));
   25531           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
   25532             :                         }
   25533             :                 }
   25534             :         }
   25535           0 :         return py_data;
   25536             : }
   25537             : 
   25538           0 : static int py_netr_TrustInfo_set_data(PyObject *py_obj, PyObject *value, void *closure)
   25539             : {
   25540           0 :         struct netr_TrustInfo *object = pytalloc_get_ptr(py_obj);
   25541           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
   25542           0 :         if (value == NULL) {
   25543           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
   25544           0 :                 return -1;
   25545             :         }
   25546           0 :         if (value == Py_None) {
   25547           0 :                 object->data = NULL;
   25548             :         } else {
   25549           0 :                 object->data = NULL;
   25550           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25551             :                 {
   25552           0 :                         int data_cntr_1;
   25553           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
   25554           0 :                         if (!object->data) { return -1; }
   25555           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
   25556           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
   25557           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
   25558           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
   25559           0 :                                         return -1;
   25560             :                                 }
   25561             :                                 {
   25562           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
   25563           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
   25564           0 :                                                 unsigned long long test_var;
   25565           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
   25566           0 :                                                 if (PyErr_Occurred() != NULL) {
   25567           0 :                                                         return -1;
   25568             :                                                 }
   25569           0 :                                                 if (test_var > uint_max) {
   25570           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25571             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   25572           0 :                                                         return -1;
   25573             :                                                 }
   25574           0 :                                                 (object->data)[data_cntr_1] = test_var;
   25575             :                                         } else {
   25576           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   25577             :                                                   PyLong_Type.tp_name);
   25578           0 :                                                 return -1;
   25579             :                                         }
   25580             :                                 }
   25581             :                         }
   25582             :                 }
   25583             :         }
   25584           0 :         return 0;
   25585             : }
   25586             : 
   25587           0 : static PyObject *py_netr_TrustInfo_get_entry_count(PyObject *obj, void *closure)
   25588             : {
   25589           0 :         struct netr_TrustInfo *object = pytalloc_get_ptr(obj);
   25590           0 :         PyObject *py_entry_count;
   25591           0 :         py_entry_count = PyLong_FromUnsignedLongLong((uint32_t)(object->entry_count));
   25592           0 :         return py_entry_count;
   25593             : }
   25594             : 
   25595           0 : static int py_netr_TrustInfo_set_entry_count(PyObject *py_obj, PyObject *value, void *closure)
   25596             : {
   25597           0 :         struct netr_TrustInfo *object = pytalloc_get_ptr(py_obj);
   25598           0 :         if (value == NULL) {
   25599           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->entry_count");
   25600           0 :                 return -1;
   25601             :         }
   25602             :         {
   25603           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->entry_count));
   25604           0 :                 if (PyLong_Check(value)) {
   25605           0 :                         unsigned long long test_var;
   25606           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25607           0 :                         if (PyErr_Occurred() != NULL) {
   25608           0 :                                 return -1;
   25609             :                         }
   25610           0 :                         if (test_var > uint_max) {
   25611           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25612             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25613           0 :                                 return -1;
   25614             :                         }
   25615           0 :                         object->entry_count = test_var;
   25616             :                 } else {
   25617           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25618             :                           PyLong_Type.tp_name);
   25619           0 :                         return -1;
   25620             :                 }
   25621             :         }
   25622           0 :         return 0;
   25623             : }
   25624             : 
   25625           0 : static PyObject *py_netr_TrustInfo_get_entries(PyObject *obj, void *closure)
   25626             : {
   25627           0 :         struct netr_TrustInfo *object = pytalloc_get_ptr(obj);
   25628           0 :         PyObject *py_entries;
   25629           0 :         if (object->entries == NULL) {
   25630           0 :                 Py_RETURN_NONE;
   25631             :         }
   25632           0 :         if (object->entries == NULL) {
   25633           0 :                 py_entries = Py_None;
   25634           0 :                 Py_INCREF(py_entries);
   25635             :         } else {
   25636           0 :                 py_entries = PyList_New(object->count);
   25637           0 :                 if (py_entries == NULL) {
   25638           0 :                         return NULL;
   25639             :                 }
   25640             :                 {
   25641             :                         int entries_cntr_1;
   25642           0 :                         for (entries_cntr_1 = 0; entries_cntr_1 < (object->count); entries_cntr_1++) {
   25643           0 :                                 PyObject *py_entries_1;
   25644           0 :                                 py_entries_1 = pytalloc_reference_ex(lsa_String_Type, object->entries, &(object->entries)[entries_cntr_1]);
   25645           0 :                                 PyList_SetItem(py_entries, entries_cntr_1, py_entries_1);
   25646             :                         }
   25647             :                 }
   25648             :         }
   25649           0 :         return py_entries;
   25650             : }
   25651             : 
   25652           0 : static int py_netr_TrustInfo_set_entries(PyObject *py_obj, PyObject *value, void *closure)
   25653             : {
   25654           0 :         struct netr_TrustInfo *object = pytalloc_get_ptr(py_obj);
   25655           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->entries));
   25656           0 :         if (value == NULL) {
   25657           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->entries");
   25658           0 :                 return -1;
   25659             :         }
   25660           0 :         if (value == Py_None) {
   25661           0 :                 object->entries = NULL;
   25662             :         } else {
   25663           0 :                 object->entries = NULL;
   25664           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25665             :                 {
   25666           0 :                         int entries_cntr_1;
   25667           0 :                         object->entries = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
   25668           0 :                         if (!object->entries) { return -1; }
   25669           0 :                         talloc_set_name_const(object->entries, "ARRAY: object->entries");
   25670           0 :                         for (entries_cntr_1 = 0; entries_cntr_1 < PyList_GET_SIZE(value); entries_cntr_1++) {
   25671           0 :                                 if (PyList_GET_ITEM(value, entries_cntr_1) == NULL) {
   25672           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->entries)[entries_cntr_1]");
   25673           0 :                                         return -1;
   25674             :                                 }
   25675           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, entries_cntr_1), return -1;);
   25676           0 :                                 if (talloc_reference(object->entries, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_1))) == NULL) {
   25677           0 :                                         PyErr_NoMemory();
   25678           0 :                                         return -1;
   25679             :                                 }
   25680           0 :                                 (object->entries)[entries_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_1));
   25681             :                         }
   25682             :                 }
   25683             :         }
   25684           0 :         return 0;
   25685             : }
   25686             : 
   25687             : static PyGetSetDef py_netr_TrustInfo_getsetters[] = {
   25688             :         {
   25689             :                 .name = discard_const_p(char, "count"),
   25690             :                 .get = py_netr_TrustInfo_get_count,
   25691             :                 .set = py_netr_TrustInfo_set_count,
   25692             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25693             :         },
   25694             :         {
   25695             :                 .name = discard_const_p(char, "data"),
   25696             :                 .get = py_netr_TrustInfo_get_data,
   25697             :                 .set = py_netr_TrustInfo_set_data,
   25698             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25699             :         },
   25700             :         {
   25701             :                 .name = discard_const_p(char, "entry_count"),
   25702             :                 .get = py_netr_TrustInfo_get_entry_count,
   25703             :                 .set = py_netr_TrustInfo_set_entry_count,
   25704             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25705             :         },
   25706             :         {
   25707             :                 .name = discard_const_p(char, "entries"),
   25708             :                 .get = py_netr_TrustInfo_get_entries,
   25709             :                 .set = py_netr_TrustInfo_set_entries,
   25710             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25711             :         },
   25712             :         { .name = NULL }
   25713             : };
   25714             : 
   25715           0 : static PyObject *py_netr_TrustInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25716             : {
   25717           0 :         return pytalloc_new(struct netr_TrustInfo, type);
   25718             : }
   25719             : 
   25720             : 
   25721             : static PyTypeObject netr_TrustInfo_Type = {
   25722             :         PyVarObject_HEAD_INIT(NULL, 0)
   25723             :         .tp_name = "netlogon.netr_TrustInfo",
   25724             :         .tp_getset = py_netr_TrustInfo_getsetters,
   25725             :         .tp_methods = NULL,
   25726             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25727             :         .tp_new = py_netr_TrustInfo_new,
   25728             : };
   25729             : 
   25730             : 
   25731           0 : static PyObject *py_NL_DNS_NAME_INFO_get_type(PyObject *obj, void *closure)
   25732             : {
   25733           0 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
   25734           0 :         PyObject *py_type;
   25735           0 :         py_type = PyLong_FromLong((uint16_t)(object->type));
   25736           0 :         return py_type;
   25737             : }
   25738             : 
   25739           5 : static int py_NL_DNS_NAME_INFO_set_type(PyObject *py_obj, PyObject *value, void *closure)
   25740             : {
   25741           5 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
   25742           5 :         if (value == NULL) {
   25743           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->type");
   25744           0 :                 return -1;
   25745             :         }
   25746             :         {
   25747           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
   25748           5 :                 if (PyLong_Check(value)) {
   25749           0 :                         unsigned long long test_var;
   25750           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25751           5 :                         if (PyErr_Occurred() != NULL) {
   25752           0 :                                 return -1;
   25753             :                         }
   25754           5 :                         if (test_var > uint_max) {
   25755           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25756             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25757           0 :                                 return -1;
   25758             :                         }
   25759           5 :                         object->type = test_var;
   25760             :                 } else {
   25761           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25762             :                           PyLong_Type.tp_name);
   25763           0 :                         return -1;
   25764             :                 }
   25765             :         }
   25766           5 :         return 0;
   25767             : }
   25768             : 
   25769           0 : static PyObject *py_NL_DNS_NAME_INFO_get_dns_domain_info(PyObject *obj, void *closure)
   25770             : {
   25771           0 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
   25772           0 :         PyObject *py_dns_domain_info;
   25773           0 :         if (object->dns_domain_info == NULL) {
   25774           0 :                 Py_RETURN_NONE;
   25775             :         }
   25776           0 :         if (object->dns_domain_info == NULL) {
   25777           0 :                 py_dns_domain_info = Py_None;
   25778           0 :                 Py_INCREF(py_dns_domain_info);
   25779             :         } else {
   25780           0 :                 if (object->dns_domain_info == NULL) {
   25781           0 :                         py_dns_domain_info = Py_None;
   25782           0 :                         Py_INCREF(py_dns_domain_info);
   25783             :                 } else {
   25784           0 :                         py_dns_domain_info = PyUnicode_Decode(object->dns_domain_info, strlen(object->dns_domain_info), "utf-8", "ignore");
   25785             :                 }
   25786             :         }
   25787           0 :         return py_dns_domain_info;
   25788             : }
   25789             : 
   25790           0 : static int py_NL_DNS_NAME_INFO_set_dns_domain_info(PyObject *py_obj, PyObject *value, void *closure)
   25791             : {
   25792           0 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
   25793           0 :         if (value == NULL) {
   25794           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_domain_info");
   25795           0 :                 return -1;
   25796             :         }
   25797           0 :         if (value == Py_None) {
   25798           0 :                 object->dns_domain_info = NULL;
   25799             :         } else {
   25800           0 :                 object->dns_domain_info = NULL;
   25801             :                 {
   25802           0 :                         const char *test_str;
   25803           0 :                         const char *talloc_str;
   25804           0 :                         PyObject *unicode = NULL;
   25805           0 :                         if (PyUnicode_Check(value)) {
   25806           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25807           0 :                                 if (unicode == NULL) {
   25808           0 :                                         return -1;
   25809             :                                 }
   25810           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   25811           0 :                         } else if (PyBytes_Check(value)) {
   25812           0 :                                 test_str = PyBytes_AS_STRING(value);
   25813             :                         } else {
   25814           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25815           0 :                                 return -1;
   25816             :                         }
   25817           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25818           0 :                         if (unicode != NULL) {
   25819           0 :                                 Py_DECREF(unicode);
   25820             :                         }
   25821           0 :                         if (talloc_str == NULL) {
   25822           0 :                                 PyErr_NoMemory();
   25823           0 :                                 return -1;
   25824             :                         }
   25825           0 :                         object->dns_domain_info = talloc_str;
   25826             :                 }
   25827             :         }
   25828           0 :         return 0;
   25829             : }
   25830             : 
   25831           0 : static PyObject *py_NL_DNS_NAME_INFO_get_dns_domain_info_type(PyObject *obj, void *closure)
   25832             : {
   25833           0 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
   25834           0 :         PyObject *py_dns_domain_info_type;
   25835           0 :         py_dns_domain_info_type = PyLong_FromLong((uint16_t)(object->dns_domain_info_type));
   25836           0 :         return py_dns_domain_info_type;
   25837             : }
   25838             : 
   25839           5 : static int py_NL_DNS_NAME_INFO_set_dns_domain_info_type(PyObject *py_obj, PyObject *value, void *closure)
   25840             : {
   25841           5 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
   25842           5 :         if (value == NULL) {
   25843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_domain_info_type");
   25844           0 :                 return -1;
   25845             :         }
   25846             :         {
   25847           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dns_domain_info_type));
   25848           5 :                 if (PyLong_Check(value)) {
   25849           0 :                         unsigned long long test_var;
   25850           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25851           5 :                         if (PyErr_Occurred() != NULL) {
   25852           0 :                                 return -1;
   25853             :                         }
   25854           5 :                         if (test_var > uint_max) {
   25855           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25856             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25857           0 :                                 return -1;
   25858             :                         }
   25859           5 :                         object->dns_domain_info_type = test_var;
   25860             :                 } else {
   25861           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25862             :                           PyLong_Type.tp_name);
   25863           0 :                         return -1;
   25864             :                 }
   25865             :         }
   25866           5 :         return 0;
   25867             : }
   25868             : 
   25869           0 : static PyObject *py_NL_DNS_NAME_INFO_get_priority(PyObject *obj, void *closure)
   25870             : {
   25871           0 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
   25872           0 :         PyObject *py_priority;
   25873           0 :         py_priority = PyLong_FromUnsignedLongLong((uint32_t)(object->priority));
   25874           0 :         return py_priority;
   25875             : }
   25876             : 
   25877           5 : static int py_NL_DNS_NAME_INFO_set_priority(PyObject *py_obj, PyObject *value, void *closure)
   25878             : {
   25879           5 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
   25880           5 :         if (value == NULL) {
   25881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->priority");
   25882           0 :                 return -1;
   25883             :         }
   25884             :         {
   25885           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
   25886           5 :                 if (PyLong_Check(value)) {
   25887           0 :                         unsigned long long test_var;
   25888           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25889           5 :                         if (PyErr_Occurred() != NULL) {
   25890           0 :                                 return -1;
   25891             :                         }
   25892           5 :                         if (test_var > uint_max) {
   25893           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25894             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25895           0 :                                 return -1;
   25896             :                         }
   25897           5 :                         object->priority = test_var;
   25898             :                 } else {
   25899           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25900             :                           PyLong_Type.tp_name);
   25901           0 :                         return -1;
   25902             :                 }
   25903             :         }
   25904           5 :         return 0;
   25905             : }
   25906             : 
   25907           0 : static PyObject *py_NL_DNS_NAME_INFO_get_weight(PyObject *obj, void *closure)
   25908             : {
   25909           0 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
   25910           0 :         PyObject *py_weight;
   25911           0 :         py_weight = PyLong_FromUnsignedLongLong((uint32_t)(object->weight));
   25912           0 :         return py_weight;
   25913             : }
   25914             : 
   25915           5 : static int py_NL_DNS_NAME_INFO_set_weight(PyObject *py_obj, PyObject *value, void *closure)
   25916             : {
   25917           5 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
   25918           5 :         if (value == NULL) {
   25919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->weight");
   25920           0 :                 return -1;
   25921             :         }
   25922             :         {
   25923           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->weight));
   25924           5 :                 if (PyLong_Check(value)) {
   25925           0 :                         unsigned long long test_var;
   25926           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25927           5 :                         if (PyErr_Occurred() != NULL) {
   25928           0 :                                 return -1;
   25929             :                         }
   25930           5 :                         if (test_var > uint_max) {
   25931           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25932             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25933           0 :                                 return -1;
   25934             :                         }
   25935           5 :                         object->weight = test_var;
   25936             :                 } else {
   25937           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25938             :                           PyLong_Type.tp_name);
   25939           0 :                         return -1;
   25940             :                 }
   25941             :         }
   25942           5 :         return 0;
   25943             : }
   25944             : 
   25945           0 : static PyObject *py_NL_DNS_NAME_INFO_get_port(PyObject *obj, void *closure)
   25946             : {
   25947           0 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
   25948           0 :         PyObject *py_port;
   25949           0 :         py_port = PyLong_FromUnsignedLongLong((uint32_t)(object->port));
   25950           0 :         return py_port;
   25951             : }
   25952             : 
   25953           4 : static int py_NL_DNS_NAME_INFO_set_port(PyObject *py_obj, PyObject *value, void *closure)
   25954             : {
   25955           4 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
   25956           4 :         if (value == NULL) {
   25957           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->port");
   25958           0 :                 return -1;
   25959             :         }
   25960             :         {
   25961           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->port));
   25962           4 :                 if (PyLong_Check(value)) {
   25963           0 :                         unsigned long long test_var;
   25964           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25965           4 :                         if (PyErr_Occurred() != NULL) {
   25966           0 :                                 return -1;
   25967             :                         }
   25968           4 :                         if (test_var > uint_max) {
   25969           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25970             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25971           0 :                                 return -1;
   25972             :                         }
   25973           4 :                         object->port = test_var;
   25974             :                 } else {
   25975           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25976             :                           PyLong_Type.tp_name);
   25977           0 :                         return -1;
   25978             :                 }
   25979             :         }
   25980           4 :         return 0;
   25981             : }
   25982             : 
   25983           0 : static PyObject *py_NL_DNS_NAME_INFO_get_dns_register(PyObject *obj, void *closure)
   25984             : {
   25985           0 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
   25986           0 :         PyObject *py_dns_register;
   25987           0 :         py_dns_register = PyLong_FromUnsignedLongLong((uint32_t)(object->dns_register));
   25988           0 :         return py_dns_register;
   25989             : }
   25990             : 
   25991           5 : static int py_NL_DNS_NAME_INFO_set_dns_register(PyObject *py_obj, PyObject *value, void *closure)
   25992             : {
   25993           5 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
   25994           5 :         if (value == NULL) {
   25995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_register");
   25996           0 :                 return -1;
   25997             :         }
   25998             :         {
   25999           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dns_register));
   26000           5 :                 if (PyLong_Check(value)) {
   26001           0 :                         unsigned long long test_var;
   26002           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26003           5 :                         if (PyErr_Occurred() != NULL) {
   26004           0 :                                 return -1;
   26005             :                         }
   26006           5 :                         if (test_var > uint_max) {
   26007           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26008             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26009           0 :                                 return -1;
   26010             :                         }
   26011           5 :                         object->dns_register = test_var;
   26012             :                 } else {
   26013           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26014             :                           PyLong_Type.tp_name);
   26015           0 :                         return -1;
   26016             :                 }
   26017             :         }
   26018           5 :         return 0;
   26019             : }
   26020             : 
   26021           5 : static PyObject *py_NL_DNS_NAME_INFO_get_status(PyObject *obj, void *closure)
   26022             : {
   26023           5 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
   26024           0 :         PyObject *py_status;
   26025           5 :         py_status = PyLong_FromUnsignedLongLong((uint32_t)(object->status));
   26026           5 :         return py_status;
   26027             : }
   26028             : 
   26029           0 : static int py_NL_DNS_NAME_INFO_set_status(PyObject *py_obj, PyObject *value, void *closure)
   26030             : {
   26031           0 :         struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
   26032           0 :         if (value == NULL) {
   26033           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->status");
   26034           0 :                 return -1;
   26035             :         }
   26036             :         {
   26037           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
   26038           0 :                 if (PyLong_Check(value)) {
   26039           0 :                         unsigned long long test_var;
   26040           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26041           0 :                         if (PyErr_Occurred() != NULL) {
   26042           0 :                                 return -1;
   26043             :                         }
   26044           0 :                         if (test_var > uint_max) {
   26045           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26046             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26047           0 :                                 return -1;
   26048             :                         }
   26049           0 :                         object->status = test_var;
   26050             :                 } else {
   26051           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26052             :                           PyLong_Type.tp_name);
   26053           0 :                         return -1;
   26054             :                 }
   26055             :         }
   26056           0 :         return 0;
   26057             : }
   26058             : 
   26059             : static PyGetSetDef py_NL_DNS_NAME_INFO_getsetters[] = {
   26060             :         {
   26061             :                 .name = discard_const_p(char, "type"),
   26062             :                 .get = py_NL_DNS_NAME_INFO_get_type,
   26063             :                 .set = py_NL_DNS_NAME_INFO_set_type,
   26064             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DnsType")
   26065             :         },
   26066             :         {
   26067             :                 .name = discard_const_p(char, "dns_domain_info"),
   26068             :                 .get = py_NL_DNS_NAME_INFO_get_dns_domain_info,
   26069             :                 .set = py_NL_DNS_NAME_INFO_set_dns_domain_info,
   26070             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26071             :         },
   26072             :         {
   26073             :                 .name = discard_const_p(char, "dns_domain_info_type"),
   26074             :                 .get = py_NL_DNS_NAME_INFO_get_dns_domain_info_type,
   26075             :                 .set = py_NL_DNS_NAME_INFO_set_dns_domain_info_type,
   26076             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DnsDomainInfoType")
   26077             :         },
   26078             :         {
   26079             :                 .name = discard_const_p(char, "priority"),
   26080             :                 .get = py_NL_DNS_NAME_INFO_get_priority,
   26081             :                 .set = py_NL_DNS_NAME_INFO_set_priority,
   26082             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26083             :         },
   26084             :         {
   26085             :                 .name = discard_const_p(char, "weight"),
   26086             :                 .get = py_NL_DNS_NAME_INFO_get_weight,
   26087             :                 .set = py_NL_DNS_NAME_INFO_set_weight,
   26088             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26089             :         },
   26090             :         {
   26091             :                 .name = discard_const_p(char, "port"),
   26092             :                 .get = py_NL_DNS_NAME_INFO_get_port,
   26093             :                 .set = py_NL_DNS_NAME_INFO_set_port,
   26094             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26095             :         },
   26096             :         {
   26097             :                 .name = discard_const_p(char, "dns_register"),
   26098             :                 .get = py_NL_DNS_NAME_INFO_get_dns_register,
   26099             :                 .set = py_NL_DNS_NAME_INFO_set_dns_register,
   26100             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26101             :         },
   26102             :         {
   26103             :                 .name = discard_const_p(char, "status"),
   26104             :                 .get = py_NL_DNS_NAME_INFO_get_status,
   26105             :                 .set = py_NL_DNS_NAME_INFO_set_status,
   26106             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26107             :         },
   26108             :         { .name = NULL }
   26109             : };
   26110             : 
   26111           5 : static PyObject *py_NL_DNS_NAME_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26112             : {
   26113           5 :         return pytalloc_new(struct NL_DNS_NAME_INFO, type);
   26114             : }
   26115             : 
   26116             : 
   26117             : static PyTypeObject NL_DNS_NAME_INFO_Type = {
   26118             :         PyVarObject_HEAD_INIT(NULL, 0)
   26119             :         .tp_name = "netlogon.NL_DNS_NAME_INFO",
   26120             :         .tp_getset = py_NL_DNS_NAME_INFO_getsetters,
   26121             :         .tp_methods = NULL,
   26122             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26123             :         .tp_new = py_NL_DNS_NAME_INFO_new,
   26124             : };
   26125             : 
   26126             : 
   26127           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_get_count(PyObject *obj, void *closure)
   26128             : {
   26129           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(obj);
   26130           0 :         PyObject *py_count;
   26131           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   26132           0 :         return py_count;
   26133             : }
   26134             : 
   26135           5 : static int py_NL_DNS_NAME_INFO_ARRAY_set_count(PyObject *py_obj, PyObject *value, void *closure)
   26136             : {
   26137           5 :         struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
   26138           5 :         if (value == NULL) {
   26139           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   26140           0 :                 return -1;
   26141             :         }
   26142             :         {
   26143           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   26144           5 :                 if (PyLong_Check(value)) {
   26145           0 :                         unsigned long long test_var;
   26146           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26147           5 :                         if (PyErr_Occurred() != NULL) {
   26148           0 :                                 return -1;
   26149             :                         }
   26150           5 :                         if (test_var > uint_max) {
   26151           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26152             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26153           0 :                                 return -1;
   26154             :                         }
   26155           5 :                         object->count = test_var;
   26156             :                 } else {
   26157           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26158             :                           PyLong_Type.tp_name);
   26159           0 :                         return -1;
   26160             :                 }
   26161             :         }
   26162           5 :         return 0;
   26163             : }
   26164             : 
   26165           5 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_get_names(PyObject *obj, void *closure)
   26166             : {
   26167           5 :         struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(obj);
   26168           0 :         PyObject *py_names;
   26169           5 :         if (object->names == NULL) {
   26170           0 :                 Py_RETURN_NONE;
   26171             :         }
   26172           5 :         if (object->names == NULL) {
   26173           0 :                 py_names = Py_None;
   26174           0 :                 Py_INCREF(py_names);
   26175             :         } else {
   26176           5 :                 py_names = PyList_New(object->count);
   26177           5 :                 if (py_names == NULL) {
   26178           0 :                         return NULL;
   26179             :                 }
   26180             :                 {
   26181             :                         int names_cntr_1;
   26182          10 :                         for (names_cntr_1 = 0; names_cntr_1 < (object->count); names_cntr_1++) {
   26183           0 :                                 PyObject *py_names_1;
   26184           5 :                                 py_names_1 = pytalloc_reference_ex(&NL_DNS_NAME_INFO_Type, object->names, &(object->names)[names_cntr_1]);
   26185           5 :                                 PyList_SetItem(py_names, names_cntr_1, py_names_1);
   26186             :                         }
   26187             :                 }
   26188             :         }
   26189           5 :         return py_names;
   26190             : }
   26191             : 
   26192           5 : static int py_NL_DNS_NAME_INFO_ARRAY_set_names(PyObject *py_obj, PyObject *value, void *closure)
   26193             : {
   26194           5 :         struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
   26195           5 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->names));
   26196           5 :         if (value == NULL) {
   26197           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->names");
   26198           0 :                 return -1;
   26199             :         }
   26200           5 :         if (value == Py_None) {
   26201           0 :                 object->names = NULL;
   26202             :         } else {
   26203           5 :                 object->names = NULL;
   26204           5 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   26205             :                 {
   26206           0 :                         int names_cntr_1;
   26207           5 :                         object->names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->names, PyList_GET_SIZE(value));
   26208           5 :                         if (!object->names) { return -1; }
   26209           5 :                         talloc_set_name_const(object->names, "ARRAY: object->names");
   26210          10 :                         for (names_cntr_1 = 0; names_cntr_1 < PyList_GET_SIZE(value); names_cntr_1++) {
   26211           5 :                                 if (PyList_GET_ITEM(value, names_cntr_1) == NULL) {
   26212           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->names)[names_cntr_1]");
   26213           0 :                                         return -1;
   26214             :                                 }
   26215           5 :                                 PY_CHECK_TYPE(&NL_DNS_NAME_INFO_Type, PyList_GET_ITEM(value, names_cntr_1), return -1;);
   26216           5 :                                 if (talloc_reference(object->names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, names_cntr_1))) == NULL) {
   26217           0 :                                         PyErr_NoMemory();
   26218           0 :                                         return -1;
   26219             :                                 }
   26220           5 :                                 (object->names)[names_cntr_1] = *(struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(PyList_GET_ITEM(value, names_cntr_1));
   26221             :                         }
   26222             :                 }
   26223             :         }
   26224           5 :         return 0;
   26225             : }
   26226             : 
   26227             : static PyGetSetDef py_NL_DNS_NAME_INFO_ARRAY_getsetters[] = {
   26228             :         {
   26229             :                 .name = discard_const_p(char, "count"),
   26230             :                 .get = py_NL_DNS_NAME_INFO_ARRAY_get_count,
   26231             :                 .set = py_NL_DNS_NAME_INFO_ARRAY_set_count,
   26232             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26233             :         },
   26234             :         {
   26235             :                 .name = discard_const_p(char, "names"),
   26236             :                 .get = py_NL_DNS_NAME_INFO_ARRAY_get_names,
   26237             :                 .set = py_NL_DNS_NAME_INFO_ARRAY_set_names,
   26238             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO")
   26239             :         },
   26240             :         { .name = NULL }
   26241             : };
   26242             : 
   26243           5 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26244             : {
   26245           5 :         return pytalloc_new(struct NL_DNS_NAME_INFO_ARRAY, type);
   26246             : }
   26247             : 
   26248           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   26249             : {
   26250           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
   26251           0 :         PyObject *ret = NULL;
   26252           0 :         DATA_BLOB blob;
   26253           0 :         enum ndr_err_code err;
   26254           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   26255           0 :         if (tmp_ctx == NULL) {
   26256           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   26257           0 :                 return NULL;
   26258             :         }
   26259           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_NL_DNS_NAME_INFO_ARRAY);
   26260           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26261           0 :                 TALLOC_FREE(tmp_ctx);
   26262           0 :                 PyErr_SetNdrError(err);
   26263           0 :                 return NULL;
   26264             :         }
   26265             : 
   26266           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   26267           0 :         TALLOC_FREE(tmp_ctx);
   26268           0 :         return ret;
   26269             : }
   26270             : 
   26271           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26272             : {
   26273           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
   26274           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   26275           0 :         Py_ssize_t blob_length = 0;
   26276           0 :         enum ndr_err_code err;
   26277           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   26278           0 :         PyObject *allow_remaining_obj = NULL;
   26279           0 :         bool allow_remaining = false;
   26280             : 
   26281           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   26282             :                 discard_const_p(char *, kwnames),
   26283             :                 &blob.data, &blob_length,
   26284             :                 &allow_remaining_obj)) {
   26285           0 :                 return NULL;
   26286             :         }
   26287           0 :         blob.length = blob_length;
   26288             : 
   26289           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   26290           0 :                 allow_remaining = true;
   26291             :         }
   26292             : 
   26293           0 :         if (allow_remaining) {
   26294           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);
   26295             :         } else {
   26296           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);
   26297             :         }
   26298           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26299           0 :                 PyErr_SetNdrError(err);
   26300           0 :                 return NULL;
   26301             :         }
   26302             : 
   26303           0 :         Py_RETURN_NONE;
   26304             : }
   26305             : 
   26306           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   26307             : {
   26308           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
   26309           0 :         PyObject *ret;
   26310           0 :         char *retstr;
   26311             : 
   26312           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);
   26313           0 :         ret = PyUnicode_FromString(retstr);
   26314           0 :         talloc_free(retstr);
   26315             : 
   26316           0 :         return ret;
   26317             : }
   26318             : 
   26319             : static PyMethodDef py_NL_DNS_NAME_INFO_ARRAY_methods[] = {
   26320             :         { "__ndr_pack__", (PyCFunction)py_NL_DNS_NAME_INFO_ARRAY_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   26321             :         { "__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" },
   26322             :         { "__ndr_print__", (PyCFunction)py_NL_DNS_NAME_INFO_ARRAY_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   26323             :         { NULL, NULL, 0, NULL }
   26324             : };
   26325             : 
   26326             : 
   26327             : static PyTypeObject NL_DNS_NAME_INFO_ARRAY_Type = {
   26328             :         PyVarObject_HEAD_INIT(NULL, 0)
   26329             :         .tp_name = "netlogon.NL_DNS_NAME_INFO_ARRAY",
   26330             :         .tp_getset = py_NL_DNS_NAME_INFO_ARRAY_getsetters,
   26331             :         .tp_methods = py_NL_DNS_NAME_INFO_ARRAY_methods,
   26332             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26333             :         .tp_new = py_NL_DNS_NAME_INFO_ARRAY_new,
   26334             : };
   26335             : 
   26336             : 
   26337             : 
   26338           0 : static PyObject *py_netr_LogonUasLogon_in_get_server_name(PyObject *obj, void *closure)
   26339             : {
   26340           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
   26341           0 :         PyObject *py_server_name;
   26342           0 :         if (object->in.server_name == NULL) {
   26343           0 :                 Py_RETURN_NONE;
   26344             :         }
   26345           0 :         if (object->in.server_name == NULL) {
   26346           0 :                 py_server_name = Py_None;
   26347           0 :                 Py_INCREF(py_server_name);
   26348             :         } else {
   26349           0 :                 if (object->in.server_name == NULL) {
   26350           0 :                         py_server_name = Py_None;
   26351           0 :                         Py_INCREF(py_server_name);
   26352             :                 } else {
   26353           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   26354             :                 }
   26355             :         }
   26356           0 :         return py_server_name;
   26357             : }
   26358             : 
   26359           0 : static int py_netr_LogonUasLogon_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   26360             : {
   26361           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
   26362           0 :         if (value == NULL) {
   26363           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   26364           0 :                 return -1;
   26365             :         }
   26366           0 :         if (value == Py_None) {
   26367           0 :                 object->in.server_name = NULL;
   26368             :         } else {
   26369           0 :                 object->in.server_name = NULL;
   26370             :                 {
   26371           0 :                         const char *test_str;
   26372           0 :                         const char *talloc_str;
   26373           0 :                         PyObject *unicode = NULL;
   26374           0 :                         if (PyUnicode_Check(value)) {
   26375           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26376           0 :                                 if (unicode == NULL) {
   26377           0 :                                         return -1;
   26378             :                                 }
   26379           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26380           0 :                         } else if (PyBytes_Check(value)) {
   26381           0 :                                 test_str = PyBytes_AS_STRING(value);
   26382             :                         } else {
   26383           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26384           0 :                                 return -1;
   26385             :                         }
   26386           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26387           0 :                         if (unicode != NULL) {
   26388           0 :                                 Py_DECREF(unicode);
   26389             :                         }
   26390           0 :                         if (talloc_str == NULL) {
   26391           0 :                                 PyErr_NoMemory();
   26392           0 :                                 return -1;
   26393             :                         }
   26394           0 :                         object->in.server_name = talloc_str;
   26395             :                 }
   26396             :         }
   26397           0 :         return 0;
   26398             : }
   26399             : 
   26400           0 : static PyObject *py_netr_LogonUasLogon_in_get_account_name(PyObject *obj, void *closure)
   26401             : {
   26402           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
   26403           0 :         PyObject *py_account_name;
   26404           0 :         if (object->in.account_name == NULL) {
   26405           0 :                 Py_RETURN_NONE;
   26406             :         }
   26407           0 :         if (object->in.account_name == NULL) {
   26408           0 :                 py_account_name = Py_None;
   26409           0 :                 Py_INCREF(py_account_name);
   26410             :         } else {
   26411           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   26412             :         }
   26413           0 :         return py_account_name;
   26414             : }
   26415             : 
   26416           0 : static int py_netr_LogonUasLogon_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   26417             : {
   26418           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
   26419           0 :         if (value == NULL) {
   26420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   26421           0 :                 return -1;
   26422             :         }
   26423           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   26424           0 :         if (object->in.account_name == NULL) {
   26425           0 :                 PyErr_NoMemory();
   26426           0 :                 return -1;
   26427             :         }
   26428             :         {
   26429           0 :                 const char *test_str;
   26430           0 :                 const char *talloc_str;
   26431           0 :                 PyObject *unicode = NULL;
   26432           0 :                 if (PyUnicode_Check(value)) {
   26433           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26434           0 :                         if (unicode == NULL) {
   26435           0 :                                 return -1;
   26436             :                         }
   26437           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26438           0 :                 } else if (PyBytes_Check(value)) {
   26439           0 :                         test_str = PyBytes_AS_STRING(value);
   26440             :                 } else {
   26441           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26442           0 :                         return -1;
   26443             :                 }
   26444           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26445           0 :                 if (unicode != NULL) {
   26446           0 :                         Py_DECREF(unicode);
   26447             :                 }
   26448           0 :                 if (talloc_str == NULL) {
   26449           0 :                         PyErr_NoMemory();
   26450           0 :                         return -1;
   26451             :                 }
   26452           0 :                 object->in.account_name = talloc_str;
   26453             :         }
   26454           0 :         return 0;
   26455             : }
   26456             : 
   26457           0 : static PyObject *py_netr_LogonUasLogon_in_get_workstation(PyObject *obj, void *closure)
   26458             : {
   26459           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
   26460           0 :         PyObject *py_workstation;
   26461           0 :         if (object->in.workstation == NULL) {
   26462           0 :                 Py_RETURN_NONE;
   26463             :         }
   26464           0 :         if (object->in.workstation == NULL) {
   26465           0 :                 py_workstation = Py_None;
   26466           0 :                 Py_INCREF(py_workstation);
   26467             :         } else {
   26468           0 :                 py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
   26469             :         }
   26470           0 :         return py_workstation;
   26471             : }
   26472             : 
   26473           0 : static int py_netr_LogonUasLogon_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
   26474             : {
   26475           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
   26476           0 :         if (value == NULL) {
   26477           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.workstation");
   26478           0 :                 return -1;
   26479             :         }
   26480           0 :         object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
   26481           0 :         if (object->in.workstation == NULL) {
   26482           0 :                 PyErr_NoMemory();
   26483           0 :                 return -1;
   26484             :         }
   26485             :         {
   26486           0 :                 const char *test_str;
   26487           0 :                 const char *talloc_str;
   26488           0 :                 PyObject *unicode = NULL;
   26489           0 :                 if (PyUnicode_Check(value)) {
   26490           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26491           0 :                         if (unicode == NULL) {
   26492           0 :                                 return -1;
   26493             :                         }
   26494           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26495           0 :                 } else if (PyBytes_Check(value)) {
   26496           0 :                         test_str = PyBytes_AS_STRING(value);
   26497             :                 } else {
   26498           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26499           0 :                         return -1;
   26500             :                 }
   26501           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26502           0 :                 if (unicode != NULL) {
   26503           0 :                         Py_DECREF(unicode);
   26504             :                 }
   26505           0 :                 if (talloc_str == NULL) {
   26506           0 :                         PyErr_NoMemory();
   26507           0 :                         return -1;
   26508             :                 }
   26509           0 :                 object->in.workstation = talloc_str;
   26510             :         }
   26511           0 :         return 0;
   26512             : }
   26513             : 
   26514           0 : static PyObject *py_netr_LogonUasLogon_out_get_info(PyObject *obj, void *closure)
   26515             : {
   26516           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
   26517           0 :         PyObject *py_info;
   26518           0 :         if (object->out.info == NULL) {
   26519           0 :                 Py_RETURN_NONE;
   26520             :         }
   26521           0 :         if (*object->out.info == NULL) {
   26522           0 :                 py_info = Py_None;
   26523           0 :                 Py_INCREF(py_info);
   26524             :         } else {
   26525           0 :                 py_info = pytalloc_reference_ex(&netr_UasInfo_Type, *object->out.info, *object->out.info);
   26526             :         }
   26527           0 :         return py_info;
   26528             : }
   26529             : 
   26530           0 : static int py_netr_LogonUasLogon_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   26531             : {
   26532           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
   26533           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   26534           0 :         if (value == NULL) {
   26535           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   26536           0 :                 return -1;
   26537             :         }
   26538           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   26539           0 :         if (object->out.info == NULL) {
   26540           0 :                 PyErr_NoMemory();
   26541           0 :                 return -1;
   26542             :         }
   26543           0 :         if (value == Py_None) {
   26544           0 :                 *object->out.info = NULL;
   26545             :         } else {
   26546           0 :                 *object->out.info = NULL;
   26547           0 :                 PY_CHECK_TYPE(&netr_UasInfo_Type, value, return -1;);
   26548           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   26549           0 :                         PyErr_NoMemory();
   26550           0 :                         return -1;
   26551             :                 }
   26552           0 :                 *object->out.info = (struct netr_UasInfo *)pytalloc_get_ptr(value);
   26553             :         }
   26554           0 :         return 0;
   26555             : }
   26556             : 
   26557           0 : static PyObject *py_netr_LogonUasLogon_get_result(PyObject *obj, void *closure)
   26558             : {
   26559           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
   26560           0 :         PyObject *py_result;
   26561           0 :         py_result = PyErr_FromWERROR(object->out.result);
   26562           0 :         return py_result;
   26563             : }
   26564             : 
   26565           0 : static int py_netr_LogonUasLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
   26566             : {
   26567           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
   26568           0 :         if (value == NULL) {
   26569           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   26570           0 :                 return -1;
   26571             :         }
   26572           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   26573           0 :         return 0;
   26574             : }
   26575             : 
   26576             : static PyGetSetDef py_netr_LogonUasLogon_getsetters[] = {
   26577             :         {
   26578             :                 .name = discard_const_p(char, "in_server_name"),
   26579             :                 .get = py_netr_LogonUasLogon_in_get_server_name,
   26580             :                 .set = py_netr_LogonUasLogon_in_set_server_name,
   26581             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26582             :         },
   26583             :         {
   26584             :                 .name = discard_const_p(char, "in_account_name"),
   26585             :                 .get = py_netr_LogonUasLogon_in_get_account_name,
   26586             :                 .set = py_netr_LogonUasLogon_in_set_account_name,
   26587             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26588             :         },
   26589             :         {
   26590             :                 .name = discard_const_p(char, "in_workstation"),
   26591             :                 .get = py_netr_LogonUasLogon_in_get_workstation,
   26592             :                 .set = py_netr_LogonUasLogon_in_set_workstation,
   26593             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26594             :         },
   26595             :         {
   26596             :                 .name = discard_const_p(char, "out_info"),
   26597             :                 .get = py_netr_LogonUasLogon_out_get_info,
   26598             :                 .set = py_netr_LogonUasLogon_out_set_info,
   26599             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UasInfo")
   26600             :         },
   26601             :         {
   26602             :                 .name = discard_const_p(char, "result"),
   26603             :                 .get = py_netr_LogonUasLogon_get_result,
   26604             :                 .set = py_netr_LogonUasLogon_set_result,
   26605             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   26606             :         },
   26607             :         { .name = NULL }
   26608             : };
   26609             : 
   26610           0 : static PyObject *py_netr_LogonUasLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26611             : {
   26612           0 :         PyObject *self = pytalloc_new(struct netr_LogonUasLogon, type);
   26613           0 :         struct netr_LogonUasLogon *_self = (struct netr_LogonUasLogon *)pytalloc_get_ptr(self);
   26614           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   26615             :         /* a pointer to a NULL pointer */
   26616           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_UasInfo *);
   26617           0 :         return self;
   26618             : }
   26619             : 
   26620           0 : static PyObject *py_netr_LogonUasLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   26621             : {
   26622             : 
   26623             : 
   26624           0 :         return PyLong_FromLong(0);
   26625             : }
   26626             : 
   26627           0 : static PyObject *py_netr_LogonUasLogon_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   26628             : {
   26629           0 :         const struct ndr_interface_call *call = NULL;
   26630           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
   26631           0 :         PyObject *ret = NULL;
   26632           0 :         struct ndr_push *push = NULL;
   26633           0 :         DATA_BLOB blob;
   26634           0 :         enum ndr_err_code err;
   26635             : 
   26636           0 :         if (ndr_table_netlogon.num_calls < 1) {
   26637           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_pack");
   26638           0 :                 return NULL;
   26639             :         }
   26640           0 :         call = &ndr_table_netlogon.calls[0];
   26641             : 
   26642           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   26643           0 :         if (push == NULL) {
   26644           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   26645           0 :                 return NULL;
   26646             :         }
   26647             : 
   26648           0 :         push->flags |= ndr_push_flags;
   26649             : 
   26650           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   26651           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26652           0 :                 TALLOC_FREE(push);
   26653           0 :                 PyErr_SetNdrError(err);
   26654           0 :                 return NULL;
   26655             :         }
   26656           0 :         blob = ndr_push_blob(push);
   26657           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   26658           0 :         TALLOC_FREE(push);
   26659           0 :         return ret;
   26660             : }
   26661             : 
   26662           0 : static PyObject *py_netr_LogonUasLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26663             : {
   26664           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   26665           0 :         PyObject *bigendian_obj = NULL;
   26666           0 :         PyObject *ndr64_obj = NULL;
   26667           0 :         libndr_flags ndr_push_flags = 0;
   26668             : 
   26669           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   26670             :                 discard_const_p(char *, kwnames),
   26671             :                 &bigendian_obj,
   26672             :                 &ndr64_obj)) {
   26673           0 :                 return NULL;
   26674             :         }
   26675             : 
   26676           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26677           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   26678             :         }
   26679           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26680           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   26681             :         }
   26682             : 
   26683           0 :         return py_netr_LogonUasLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   26684             : }
   26685             : 
   26686           0 : static PyObject *py_netr_LogonUasLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26687             : {
   26688           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   26689           0 :         PyObject *bigendian_obj = NULL;
   26690           0 :         PyObject *ndr64_obj = NULL;
   26691           0 :         libndr_flags ndr_push_flags = 0;
   26692             : 
   26693           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   26694             :                 discard_const_p(char *, kwnames),
   26695             :                 &bigendian_obj,
   26696             :                 &ndr64_obj)) {
   26697           0 :                 return NULL;
   26698             :         }
   26699             : 
   26700           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26701           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   26702             :         }
   26703           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26704           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   26705             :         }
   26706             : 
   26707           0 :         return py_netr_LogonUasLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   26708             : }
   26709             : 
   26710           0 : static PyObject *py_netr_LogonUasLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   26711             : {
   26712           0 :         const struct ndr_interface_call *call = NULL;
   26713           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
   26714           0 :         struct ndr_pull *pull = NULL;
   26715           0 :         enum ndr_err_code err;
   26716             : 
   26717           0 :         if (ndr_table_netlogon.num_calls < 1) {
   26718           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_unpack");
   26719           0 :                 return NULL;
   26720             :         }
   26721           0 :         call = &ndr_table_netlogon.calls[0];
   26722             : 
   26723           0 :         pull = ndr_pull_init_blob(blob, object);
   26724           0 :         if (pull == NULL) {
   26725           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   26726           0 :                 return NULL;
   26727             :         }
   26728             : 
   26729           0 :         pull->flags |= ndr_pull_flags;
   26730             : 
   26731           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   26732           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26733           0 :                 TALLOC_FREE(pull);
   26734           0 :                 PyErr_SetNdrError(err);
   26735           0 :                 return NULL;
   26736             :         }
   26737           0 :         if (!allow_remaining) {
   26738           0 :                 uint32_t highest_ofs;
   26739             : 
   26740           0 :                 if (pull->offset > pull->relative_highest_offset) {
   26741           0 :                         highest_ofs = pull->offset;
   26742             :                 } else {
   26743           0 :                         highest_ofs = pull->relative_highest_offset;
   26744             :                 }
   26745           0 :                 if (highest_ofs < pull->data_size) {
   26746           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   26747             :                                 "not all bytes consumed ofs[%u] size[%u]",
   26748             :                                 highest_ofs, pull->data_size);
   26749           0 :                         TALLOC_FREE(pull);
   26750           0 :                         PyErr_SetNdrError(err);
   26751           0 :                         return NULL;
   26752             :                 }
   26753             :         }
   26754             : 
   26755           0 :         TALLOC_FREE(pull);
   26756           0 :         Py_RETURN_NONE;
   26757             : }
   26758             : 
   26759           0 : static PyObject *py_netr_LogonUasLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26760             : {
   26761           0 :         DATA_BLOB blob;
   26762           0 :         Py_ssize_t blob_length = 0;
   26763           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   26764           0 :         PyObject *bigendian_obj = NULL;
   26765           0 :         PyObject *ndr64_obj = NULL;
   26766           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   26767           0 :         PyObject *allow_remaining_obj = NULL;
   26768           0 :         bool allow_remaining = false;
   26769             : 
   26770           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   26771             :                 discard_const_p(char *, kwnames),
   26772             :                 &blob.data, &blob_length,
   26773             :                 &bigendian_obj,
   26774             :                 &ndr64_obj,
   26775             :                 &allow_remaining_obj)) {
   26776           0 :                 return NULL;
   26777             :         }
   26778           0 :         blob.length = blob_length;
   26779             : 
   26780           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26781           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   26782             :         }
   26783           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26784           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   26785             :         }
   26786             : 
   26787           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   26788           0 :                 allow_remaining = true;
   26789             :         }
   26790             : 
   26791           0 :         return py_netr_LogonUasLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   26792             : }
   26793             : 
   26794           0 : static PyObject *py_netr_LogonUasLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26795             : {
   26796           0 :         DATA_BLOB blob;
   26797           0 :         Py_ssize_t blob_length = 0;
   26798           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   26799           0 :         PyObject *bigendian_obj = NULL;
   26800           0 :         PyObject *ndr64_obj = NULL;
   26801           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   26802           0 :         PyObject *allow_remaining_obj = NULL;
   26803           0 :         bool allow_remaining = false;
   26804             : 
   26805           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   26806             :                 discard_const_p(char *, kwnames),
   26807             :                 &blob.data, &blob_length,
   26808             :                 &bigendian_obj,
   26809             :                 &ndr64_obj,
   26810             :                 &allow_remaining_obj)) {
   26811           0 :                 return NULL;
   26812             :         }
   26813           0 :         blob.length = blob_length;
   26814             : 
   26815           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26816           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   26817             :         }
   26818           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26819           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   26820             :         }
   26821             : 
   26822           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   26823           0 :                 allow_remaining = true;
   26824             :         }
   26825             : 
   26826           0 :         return py_netr_LogonUasLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   26827             : }
   26828             : 
   26829           0 : static PyObject *py_netr_LogonUasLogon_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   26830             : {
   26831           0 :         const struct ndr_interface_call *call = NULL;
   26832           0 :         struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
   26833           0 :         PyObject *ret;
   26834           0 :         char *retstr;
   26835             : 
   26836           0 :         if (ndr_table_netlogon.num_calls < 1) {
   26837           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_print");
   26838           0 :                 return NULL;
   26839             :         }
   26840           0 :         call = &ndr_table_netlogon.calls[0];
   26841             : 
   26842           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   26843           0 :         ret = PyUnicode_FromString(retstr);
   26844           0 :         TALLOC_FREE(retstr);
   26845             : 
   26846           0 :         return ret;
   26847             : }
   26848             : 
   26849           0 : static PyObject *py_netr_LogonUasLogon_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   26850             : {
   26851           0 :         return py_netr_LogonUasLogon_ndr_print(py_obj, "netr_LogonUasLogon_in", NDR_IN);
   26852             : }
   26853             : 
   26854           0 : static PyObject *py_netr_LogonUasLogon_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   26855             : {
   26856           0 :         return py_netr_LogonUasLogon_ndr_print(py_obj, "netr_LogonUasLogon_out", NDR_OUT);
   26857             : }
   26858             : 
   26859             : static PyMethodDef py_netr_LogonUasLogon_methods[] = {
   26860             :         { "opnum", (PyCFunction)py_netr_LogonUasLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
   26861             :                 "netlogon.netr_LogonUasLogon.opnum() -> 0 (0x00) " },
   26862             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   26863             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   26864             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   26865             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   26866             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   26867             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   26868             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   26869             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   26870             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonUasLogon_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   26871             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonUasLogon_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   26872             :         { NULL, NULL, 0, NULL }
   26873             : };
   26874             : 
   26875             : 
   26876             : static PyTypeObject netr_LogonUasLogon_Type = {
   26877             :         PyVarObject_HEAD_INIT(NULL, 0)
   26878             :         .tp_name = "netlogon.netr_LogonUasLogon",
   26879             :         .tp_getset = py_netr_LogonUasLogon_getsetters,
   26880             :         .tp_methods = py_netr_LogonUasLogon_methods,
   26881             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26882             :         .tp_new = py_netr_LogonUasLogon_new,
   26883             : };
   26884             : 
   26885           0 : static bool pack_py_netr_LogonUasLogon_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonUasLogon *r)
   26886             : {
   26887           0 :         PyObject *py_server_name;
   26888           0 :         PyObject *py_account_name;
   26889           0 :         PyObject *py_workstation;
   26890           0 :         const char *kwnames[] = {
   26891             :                 "server_name", "account_name", "workstation", NULL
   26892             :         };
   26893             : 
   26894           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonUasLogon", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_workstation)) {
   26895           0 :                 return false;
   26896             :         }
   26897             : 
   26898           0 :         if (py_server_name == NULL) {
   26899           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   26900           0 :                 return false;
   26901             :         }
   26902           0 :         if (py_server_name == Py_None) {
   26903           0 :                 r->in.server_name = NULL;
   26904             :         } else {
   26905           0 :                 r->in.server_name = NULL;
   26906             :                 {
   26907           0 :                         const char *test_str;
   26908           0 :                         const char *talloc_str;
   26909           0 :                         PyObject *unicode = NULL;
   26910           0 :                         if (PyUnicode_Check(py_server_name)) {
   26911           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   26912           0 :                                 if (unicode == NULL) {
   26913           0 :                                         return false;
   26914             :                                 }
   26915           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26916           0 :                         } else if (PyBytes_Check(py_server_name)) {
   26917           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   26918             :                         } else {
   26919           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   26920           0 :                                 return false;
   26921             :                         }
   26922           0 :                         talloc_str = talloc_strdup(r, test_str);
   26923           0 :                         if (unicode != NULL) {
   26924           0 :                                 Py_DECREF(unicode);
   26925             :                         }
   26926           0 :                         if (talloc_str == NULL) {
   26927           0 :                                 PyErr_NoMemory();
   26928           0 :                                 return false;
   26929             :                         }
   26930           0 :                         r->in.server_name = talloc_str;
   26931             :                 }
   26932             :         }
   26933           0 :         if (py_account_name == NULL) {
   26934           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   26935           0 :                 return false;
   26936             :         }
   26937           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   26938           0 :         if (r->in.account_name == NULL) {
   26939           0 :                 PyErr_NoMemory();
   26940           0 :                 return false;
   26941             :         }
   26942             :         {
   26943           0 :                 const char *test_str;
   26944           0 :                 const char *talloc_str;
   26945           0 :                 PyObject *unicode = NULL;
   26946           0 :                 if (PyUnicode_Check(py_account_name)) {
   26947           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   26948           0 :                         if (unicode == NULL) {
   26949           0 :                                 return false;
   26950             :                         }
   26951           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26952           0 :                 } else if (PyBytes_Check(py_account_name)) {
   26953           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   26954             :                 } else {
   26955           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   26956           0 :                         return false;
   26957             :                 }
   26958           0 :                 talloc_str = talloc_strdup(r, test_str);
   26959           0 :                 if (unicode != NULL) {
   26960           0 :                         Py_DECREF(unicode);
   26961             :                 }
   26962           0 :                 if (talloc_str == NULL) {
   26963           0 :                         PyErr_NoMemory();
   26964           0 :                         return false;
   26965             :                 }
   26966           0 :                 r->in.account_name = talloc_str;
   26967             :         }
   26968           0 :         if (py_workstation == NULL) {
   26969           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.workstation");
   26970           0 :                 return false;
   26971             :         }
   26972           0 :         r->in.workstation = talloc_ptrtype(r, r->in.workstation);
   26973           0 :         if (r->in.workstation == NULL) {
   26974           0 :                 PyErr_NoMemory();
   26975           0 :                 return false;
   26976             :         }
   26977             :         {
   26978           0 :                 const char *test_str;
   26979           0 :                 const char *talloc_str;
   26980           0 :                 PyObject *unicode = NULL;
   26981           0 :                 if (PyUnicode_Check(py_workstation)) {
   26982           0 :                         unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
   26983           0 :                         if (unicode == NULL) {
   26984           0 :                                 return false;
   26985             :                         }
   26986           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26987           0 :                 } else if (PyBytes_Check(py_workstation)) {
   26988           0 :                         test_str = PyBytes_AS_STRING(py_workstation);
   26989             :                 } else {
   26990           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
   26991           0 :                         return false;
   26992             :                 }
   26993           0 :                 talloc_str = talloc_strdup(r, test_str);
   26994           0 :                 if (unicode != NULL) {
   26995           0 :                         Py_DECREF(unicode);
   26996             :                 }
   26997           0 :                 if (talloc_str == NULL) {
   26998           0 :                         PyErr_NoMemory();
   26999           0 :                         return false;
   27000             :                 }
   27001           0 :                 r->in.workstation = talloc_str;
   27002             :         }
   27003           0 :         return true;
   27004             : }
   27005             : 
   27006           0 : static PyObject *unpack_py_netr_LogonUasLogon_args_out(struct netr_LogonUasLogon *r)
   27007             : {
   27008           0 :         PyObject *result;
   27009           0 :         PyObject *py_info;
   27010           0 :         if (*r->out.info == NULL) {
   27011           0 :                 py_info = Py_None;
   27012           0 :                 Py_INCREF(py_info);
   27013             :         } else {
   27014           0 :                 py_info = pytalloc_reference_ex(&netr_UasInfo_Type, *r->out.info, *r->out.info);
   27015             :         }
   27016           0 :         result = py_info;
   27017           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   27018           0 :                 PyErr_SetWERROR(r->out.result);
   27019           0 :                 return NULL;
   27020             :         }
   27021             : 
   27022           0 :         return result;
   27023             : }
   27024             : 
   27025             : 
   27026           0 : static PyObject *py_netr_LogonUasLogoff_in_get_server_name(PyObject *obj, void *closure)
   27027             : {
   27028           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
   27029           0 :         PyObject *py_server_name;
   27030           0 :         if (object->in.server_name == NULL) {
   27031           0 :                 Py_RETURN_NONE;
   27032             :         }
   27033           0 :         if (object->in.server_name == NULL) {
   27034           0 :                 py_server_name = Py_None;
   27035           0 :                 Py_INCREF(py_server_name);
   27036             :         } else {
   27037           0 :                 if (object->in.server_name == NULL) {
   27038           0 :                         py_server_name = Py_None;
   27039           0 :                         Py_INCREF(py_server_name);
   27040             :                 } else {
   27041           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   27042             :                 }
   27043             :         }
   27044           0 :         return py_server_name;
   27045             : }
   27046             : 
   27047           0 : static int py_netr_LogonUasLogoff_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   27048             : {
   27049           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
   27050           0 :         if (value == NULL) {
   27051           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   27052           0 :                 return -1;
   27053             :         }
   27054           0 :         if (value == Py_None) {
   27055           0 :                 object->in.server_name = NULL;
   27056             :         } else {
   27057           0 :                 object->in.server_name = NULL;
   27058             :                 {
   27059           0 :                         const char *test_str;
   27060           0 :                         const char *talloc_str;
   27061           0 :                         PyObject *unicode = NULL;
   27062           0 :                         if (PyUnicode_Check(value)) {
   27063           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27064           0 :                                 if (unicode == NULL) {
   27065           0 :                                         return -1;
   27066             :                                 }
   27067           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27068           0 :                         } else if (PyBytes_Check(value)) {
   27069           0 :                                 test_str = PyBytes_AS_STRING(value);
   27070             :                         } else {
   27071           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27072           0 :                                 return -1;
   27073             :                         }
   27074           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27075           0 :                         if (unicode != NULL) {
   27076           0 :                                 Py_DECREF(unicode);
   27077             :                         }
   27078           0 :                         if (talloc_str == NULL) {
   27079           0 :                                 PyErr_NoMemory();
   27080           0 :                                 return -1;
   27081             :                         }
   27082           0 :                         object->in.server_name = talloc_str;
   27083             :                 }
   27084             :         }
   27085           0 :         return 0;
   27086             : }
   27087             : 
   27088           0 : static PyObject *py_netr_LogonUasLogoff_in_get_account_name(PyObject *obj, void *closure)
   27089             : {
   27090           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
   27091           0 :         PyObject *py_account_name;
   27092           0 :         if (object->in.account_name == NULL) {
   27093           0 :                 Py_RETURN_NONE;
   27094             :         }
   27095           0 :         if (object->in.account_name == NULL) {
   27096           0 :                 py_account_name = Py_None;
   27097           0 :                 Py_INCREF(py_account_name);
   27098             :         } else {
   27099           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   27100             :         }
   27101           0 :         return py_account_name;
   27102             : }
   27103             : 
   27104           0 : static int py_netr_LogonUasLogoff_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   27105             : {
   27106           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
   27107           0 :         if (value == NULL) {
   27108           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   27109           0 :                 return -1;
   27110             :         }
   27111           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   27112           0 :         if (object->in.account_name == NULL) {
   27113           0 :                 PyErr_NoMemory();
   27114           0 :                 return -1;
   27115             :         }
   27116             :         {
   27117           0 :                 const char *test_str;
   27118           0 :                 const char *talloc_str;
   27119           0 :                 PyObject *unicode = NULL;
   27120           0 :                 if (PyUnicode_Check(value)) {
   27121           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27122           0 :                         if (unicode == NULL) {
   27123           0 :                                 return -1;
   27124             :                         }
   27125           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27126           0 :                 } else if (PyBytes_Check(value)) {
   27127           0 :                         test_str = PyBytes_AS_STRING(value);
   27128             :                 } else {
   27129           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27130           0 :                         return -1;
   27131             :                 }
   27132           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27133           0 :                 if (unicode != NULL) {
   27134           0 :                         Py_DECREF(unicode);
   27135             :                 }
   27136           0 :                 if (talloc_str == NULL) {
   27137           0 :                         PyErr_NoMemory();
   27138           0 :                         return -1;
   27139             :                 }
   27140           0 :                 object->in.account_name = talloc_str;
   27141             :         }
   27142           0 :         return 0;
   27143             : }
   27144             : 
   27145           0 : static PyObject *py_netr_LogonUasLogoff_in_get_workstation(PyObject *obj, void *closure)
   27146             : {
   27147           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
   27148           0 :         PyObject *py_workstation;
   27149           0 :         if (object->in.workstation == NULL) {
   27150           0 :                 Py_RETURN_NONE;
   27151             :         }
   27152           0 :         if (object->in.workstation == NULL) {
   27153           0 :                 py_workstation = Py_None;
   27154           0 :                 Py_INCREF(py_workstation);
   27155             :         } else {
   27156           0 :                 py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
   27157             :         }
   27158           0 :         return py_workstation;
   27159             : }
   27160             : 
   27161           0 : static int py_netr_LogonUasLogoff_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
   27162             : {
   27163           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
   27164           0 :         if (value == NULL) {
   27165           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.workstation");
   27166           0 :                 return -1;
   27167             :         }
   27168           0 :         object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
   27169           0 :         if (object->in.workstation == NULL) {
   27170           0 :                 PyErr_NoMemory();
   27171           0 :                 return -1;
   27172             :         }
   27173             :         {
   27174           0 :                 const char *test_str;
   27175           0 :                 const char *talloc_str;
   27176           0 :                 PyObject *unicode = NULL;
   27177           0 :                 if (PyUnicode_Check(value)) {
   27178           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27179           0 :                         if (unicode == NULL) {
   27180           0 :                                 return -1;
   27181             :                         }
   27182           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27183           0 :                 } else if (PyBytes_Check(value)) {
   27184           0 :                         test_str = PyBytes_AS_STRING(value);
   27185             :                 } else {
   27186           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27187           0 :                         return -1;
   27188             :                 }
   27189           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27190           0 :                 if (unicode != NULL) {
   27191           0 :                         Py_DECREF(unicode);
   27192             :                 }
   27193           0 :                 if (talloc_str == NULL) {
   27194           0 :                         PyErr_NoMemory();
   27195           0 :                         return -1;
   27196             :                 }
   27197           0 :                 object->in.workstation = talloc_str;
   27198             :         }
   27199           0 :         return 0;
   27200             : }
   27201             : 
   27202           0 : static PyObject *py_netr_LogonUasLogoff_out_get_info(PyObject *obj, void *closure)
   27203             : {
   27204           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
   27205           0 :         PyObject *py_info;
   27206           0 :         if (object->out.info == NULL) {
   27207           0 :                 Py_RETURN_NONE;
   27208             :         }
   27209           0 :         py_info = pytalloc_reference_ex(&netr_UasLogoffInfo_Type, object->out.info, object->out.info);
   27210           0 :         return py_info;
   27211             : }
   27212             : 
   27213           0 : static int py_netr_LogonUasLogoff_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   27214             : {
   27215           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
   27216           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   27217           0 :         if (value == NULL) {
   27218           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   27219           0 :                 return -1;
   27220             :         }
   27221           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   27222           0 :         if (object->out.info == NULL) {
   27223           0 :                 PyErr_NoMemory();
   27224           0 :                 return -1;
   27225             :         }
   27226           0 :         PY_CHECK_TYPE(&netr_UasLogoffInfo_Type, value, return -1;);
   27227           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27228           0 :                 PyErr_NoMemory();
   27229           0 :                 return -1;
   27230             :         }
   27231           0 :         object->out.info = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(value);
   27232           0 :         return 0;
   27233             : }
   27234             : 
   27235           0 : static PyObject *py_netr_LogonUasLogoff_get_result(PyObject *obj, void *closure)
   27236             : {
   27237           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
   27238           0 :         PyObject *py_result;
   27239           0 :         py_result = PyErr_FromWERROR(object->out.result);
   27240           0 :         return py_result;
   27241             : }
   27242             : 
   27243           0 : static int py_netr_LogonUasLogoff_set_result(PyObject *py_obj, PyObject *value, void *closure)
   27244             : {
   27245           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
   27246           0 :         if (value == NULL) {
   27247           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   27248           0 :                 return -1;
   27249             :         }
   27250           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   27251           0 :         return 0;
   27252             : }
   27253             : 
   27254             : static PyGetSetDef py_netr_LogonUasLogoff_getsetters[] = {
   27255             :         {
   27256             :                 .name = discard_const_p(char, "in_server_name"),
   27257             :                 .get = py_netr_LogonUasLogoff_in_get_server_name,
   27258             :                 .set = py_netr_LogonUasLogoff_in_set_server_name,
   27259             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27260             :         },
   27261             :         {
   27262             :                 .name = discard_const_p(char, "in_account_name"),
   27263             :                 .get = py_netr_LogonUasLogoff_in_get_account_name,
   27264             :                 .set = py_netr_LogonUasLogoff_in_set_account_name,
   27265             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27266             :         },
   27267             :         {
   27268             :                 .name = discard_const_p(char, "in_workstation"),
   27269             :                 .get = py_netr_LogonUasLogoff_in_get_workstation,
   27270             :                 .set = py_netr_LogonUasLogoff_in_set_workstation,
   27271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27272             :         },
   27273             :         {
   27274             :                 .name = discard_const_p(char, "out_info"),
   27275             :                 .get = py_netr_LogonUasLogoff_out_get_info,
   27276             :                 .set = py_netr_LogonUasLogoff_out_set_info,
   27277             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UasLogoffInfo")
   27278             :         },
   27279             :         {
   27280             :                 .name = discard_const_p(char, "result"),
   27281             :                 .get = py_netr_LogonUasLogoff_get_result,
   27282             :                 .set = py_netr_LogonUasLogoff_set_result,
   27283             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   27284             :         },
   27285             :         { .name = NULL }
   27286             : };
   27287             : 
   27288           0 : static PyObject *py_netr_LogonUasLogoff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27289             : {
   27290           0 :         PyObject *self = pytalloc_new(struct netr_LogonUasLogoff, type);
   27291           0 :         struct netr_LogonUasLogoff *_self = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(self);
   27292           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   27293           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_UasLogoffInfo);
   27294           0 :         return self;
   27295             : }
   27296             : 
   27297           0 : static PyObject *py_netr_LogonUasLogoff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   27298             : {
   27299             : 
   27300             : 
   27301           0 :         return PyLong_FromLong(1);
   27302             : }
   27303             : 
   27304           0 : static PyObject *py_netr_LogonUasLogoff_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   27305             : {
   27306           0 :         const struct ndr_interface_call *call = NULL;
   27307           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
   27308           0 :         PyObject *ret = NULL;
   27309           0 :         struct ndr_push *push = NULL;
   27310           0 :         DATA_BLOB blob;
   27311           0 :         enum ndr_err_code err;
   27312             : 
   27313           0 :         if (ndr_table_netlogon.num_calls < 2) {
   27314           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_pack");
   27315           0 :                 return NULL;
   27316             :         }
   27317           0 :         call = &ndr_table_netlogon.calls[1];
   27318             : 
   27319           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   27320           0 :         if (push == NULL) {
   27321           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   27322           0 :                 return NULL;
   27323             :         }
   27324             : 
   27325           0 :         push->flags |= ndr_push_flags;
   27326             : 
   27327           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   27328           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   27329           0 :                 TALLOC_FREE(push);
   27330           0 :                 PyErr_SetNdrError(err);
   27331           0 :                 return NULL;
   27332             :         }
   27333           0 :         blob = ndr_push_blob(push);
   27334           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   27335           0 :         TALLOC_FREE(push);
   27336           0 :         return ret;
   27337             : }
   27338             : 
   27339           0 : static PyObject *py_netr_LogonUasLogoff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27340             : {
   27341           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   27342           0 :         PyObject *bigendian_obj = NULL;
   27343           0 :         PyObject *ndr64_obj = NULL;
   27344           0 :         libndr_flags ndr_push_flags = 0;
   27345             : 
   27346           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   27347             :                 discard_const_p(char *, kwnames),
   27348             :                 &bigendian_obj,
   27349             :                 &ndr64_obj)) {
   27350           0 :                 return NULL;
   27351             :         }
   27352             : 
   27353           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27354           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   27355             :         }
   27356           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27357           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   27358             :         }
   27359             : 
   27360           0 :         return py_netr_LogonUasLogoff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   27361             : }
   27362             : 
   27363           0 : static PyObject *py_netr_LogonUasLogoff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27364             : {
   27365           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   27366           0 :         PyObject *bigendian_obj = NULL;
   27367           0 :         PyObject *ndr64_obj = NULL;
   27368           0 :         libndr_flags ndr_push_flags = 0;
   27369             : 
   27370           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   27371             :                 discard_const_p(char *, kwnames),
   27372             :                 &bigendian_obj,
   27373             :                 &ndr64_obj)) {
   27374           0 :                 return NULL;
   27375             :         }
   27376             : 
   27377           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27378           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   27379             :         }
   27380           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27381           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   27382             :         }
   27383             : 
   27384           0 :         return py_netr_LogonUasLogoff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   27385             : }
   27386             : 
   27387           0 : static PyObject *py_netr_LogonUasLogoff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   27388             : {
   27389           0 :         const struct ndr_interface_call *call = NULL;
   27390           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
   27391           0 :         struct ndr_pull *pull = NULL;
   27392           0 :         enum ndr_err_code err;
   27393             : 
   27394           0 :         if (ndr_table_netlogon.num_calls < 2) {
   27395           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_unpack");
   27396           0 :                 return NULL;
   27397             :         }
   27398           0 :         call = &ndr_table_netlogon.calls[1];
   27399             : 
   27400           0 :         pull = ndr_pull_init_blob(blob, object);
   27401           0 :         if (pull == NULL) {
   27402           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   27403           0 :                 return NULL;
   27404             :         }
   27405             : 
   27406           0 :         pull->flags |= ndr_pull_flags;
   27407             : 
   27408           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   27409           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   27410           0 :                 TALLOC_FREE(pull);
   27411           0 :                 PyErr_SetNdrError(err);
   27412           0 :                 return NULL;
   27413             :         }
   27414           0 :         if (!allow_remaining) {
   27415           0 :                 uint32_t highest_ofs;
   27416             : 
   27417           0 :                 if (pull->offset > pull->relative_highest_offset) {
   27418           0 :                         highest_ofs = pull->offset;
   27419             :                 } else {
   27420           0 :                         highest_ofs = pull->relative_highest_offset;
   27421             :                 }
   27422           0 :                 if (highest_ofs < pull->data_size) {
   27423           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   27424             :                                 "not all bytes consumed ofs[%u] size[%u]",
   27425             :                                 highest_ofs, pull->data_size);
   27426           0 :                         TALLOC_FREE(pull);
   27427           0 :                         PyErr_SetNdrError(err);
   27428           0 :                         return NULL;
   27429             :                 }
   27430             :         }
   27431             : 
   27432           0 :         TALLOC_FREE(pull);
   27433           0 :         Py_RETURN_NONE;
   27434             : }
   27435             : 
   27436           0 : static PyObject *py_netr_LogonUasLogoff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27437             : {
   27438           0 :         DATA_BLOB blob;
   27439           0 :         Py_ssize_t blob_length = 0;
   27440           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   27441           0 :         PyObject *bigendian_obj = NULL;
   27442           0 :         PyObject *ndr64_obj = NULL;
   27443           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   27444           0 :         PyObject *allow_remaining_obj = NULL;
   27445           0 :         bool allow_remaining = false;
   27446             : 
   27447           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   27448             :                 discard_const_p(char *, kwnames),
   27449             :                 &blob.data, &blob_length,
   27450             :                 &bigendian_obj,
   27451             :                 &ndr64_obj,
   27452             :                 &allow_remaining_obj)) {
   27453           0 :                 return NULL;
   27454             :         }
   27455           0 :         blob.length = blob_length;
   27456             : 
   27457           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27458           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   27459             :         }
   27460           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27461           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   27462             :         }
   27463             : 
   27464           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   27465           0 :                 allow_remaining = true;
   27466             :         }
   27467             : 
   27468           0 :         return py_netr_LogonUasLogoff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   27469             : }
   27470             : 
   27471           0 : static PyObject *py_netr_LogonUasLogoff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27472             : {
   27473           0 :         DATA_BLOB blob;
   27474           0 :         Py_ssize_t blob_length = 0;
   27475           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   27476           0 :         PyObject *bigendian_obj = NULL;
   27477           0 :         PyObject *ndr64_obj = NULL;
   27478           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   27479           0 :         PyObject *allow_remaining_obj = NULL;
   27480           0 :         bool allow_remaining = false;
   27481             : 
   27482           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   27483             :                 discard_const_p(char *, kwnames),
   27484             :                 &blob.data, &blob_length,
   27485             :                 &bigendian_obj,
   27486             :                 &ndr64_obj,
   27487             :                 &allow_remaining_obj)) {
   27488           0 :                 return NULL;
   27489             :         }
   27490           0 :         blob.length = blob_length;
   27491             : 
   27492           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27493           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   27494             :         }
   27495           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27496           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   27497             :         }
   27498             : 
   27499           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   27500           0 :                 allow_remaining = true;
   27501             :         }
   27502             : 
   27503           0 :         return py_netr_LogonUasLogoff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   27504             : }
   27505             : 
   27506           0 : static PyObject *py_netr_LogonUasLogoff_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   27507             : {
   27508           0 :         const struct ndr_interface_call *call = NULL;
   27509           0 :         struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
   27510           0 :         PyObject *ret;
   27511           0 :         char *retstr;
   27512             : 
   27513           0 :         if (ndr_table_netlogon.num_calls < 2) {
   27514           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_print");
   27515           0 :                 return NULL;
   27516             :         }
   27517           0 :         call = &ndr_table_netlogon.calls[1];
   27518             : 
   27519           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   27520           0 :         ret = PyUnicode_FromString(retstr);
   27521           0 :         TALLOC_FREE(retstr);
   27522             : 
   27523           0 :         return ret;
   27524             : }
   27525             : 
   27526           0 : static PyObject *py_netr_LogonUasLogoff_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   27527             : {
   27528           0 :         return py_netr_LogonUasLogoff_ndr_print(py_obj, "netr_LogonUasLogoff_in", NDR_IN);
   27529             : }
   27530             : 
   27531           0 : static PyObject *py_netr_LogonUasLogoff_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   27532             : {
   27533           0 :         return py_netr_LogonUasLogoff_ndr_print(py_obj, "netr_LogonUasLogoff_out", NDR_OUT);
   27534             : }
   27535             : 
   27536             : static PyMethodDef py_netr_LogonUasLogoff_methods[] = {
   27537             :         { "opnum", (PyCFunction)py_netr_LogonUasLogoff_ndr_opnum, METH_NOARGS|METH_CLASS,
   27538             :                 "netlogon.netr_LogonUasLogoff.opnum() -> 1 (0x01) " },
   27539             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   27540             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   27541             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   27542             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   27543             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   27544             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   27545             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   27546             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   27547             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonUasLogoff_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   27548             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonUasLogoff_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   27549             :         { NULL, NULL, 0, NULL }
   27550             : };
   27551             : 
   27552             : 
   27553             : static PyTypeObject netr_LogonUasLogoff_Type = {
   27554             :         PyVarObject_HEAD_INIT(NULL, 0)
   27555             :         .tp_name = "netlogon.netr_LogonUasLogoff",
   27556             :         .tp_getset = py_netr_LogonUasLogoff_getsetters,
   27557             :         .tp_methods = py_netr_LogonUasLogoff_methods,
   27558             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27559             :         .tp_new = py_netr_LogonUasLogoff_new,
   27560             : };
   27561             : 
   27562           0 : static bool pack_py_netr_LogonUasLogoff_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonUasLogoff *r)
   27563             : {
   27564           0 :         PyObject *py_server_name;
   27565           0 :         PyObject *py_account_name;
   27566           0 :         PyObject *py_workstation;
   27567           0 :         const char *kwnames[] = {
   27568             :                 "server_name", "account_name", "workstation", NULL
   27569             :         };
   27570             : 
   27571           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonUasLogoff", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_workstation)) {
   27572           0 :                 return false;
   27573             :         }
   27574             : 
   27575           0 :         if (py_server_name == NULL) {
   27576           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   27577           0 :                 return false;
   27578             :         }
   27579           0 :         if (py_server_name == Py_None) {
   27580           0 :                 r->in.server_name = NULL;
   27581             :         } else {
   27582           0 :                 r->in.server_name = NULL;
   27583             :                 {
   27584           0 :                         const char *test_str;
   27585           0 :                         const char *talloc_str;
   27586           0 :                         PyObject *unicode = NULL;
   27587           0 :                         if (PyUnicode_Check(py_server_name)) {
   27588           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   27589           0 :                                 if (unicode == NULL) {
   27590           0 :                                         return false;
   27591             :                                 }
   27592           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27593           0 :                         } else if (PyBytes_Check(py_server_name)) {
   27594           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   27595             :                         } else {
   27596           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   27597           0 :                                 return false;
   27598             :                         }
   27599           0 :                         talloc_str = talloc_strdup(r, test_str);
   27600           0 :                         if (unicode != NULL) {
   27601           0 :                                 Py_DECREF(unicode);
   27602             :                         }
   27603           0 :                         if (talloc_str == NULL) {
   27604           0 :                                 PyErr_NoMemory();
   27605           0 :                                 return false;
   27606             :                         }
   27607           0 :                         r->in.server_name = talloc_str;
   27608             :                 }
   27609             :         }
   27610           0 :         if (py_account_name == NULL) {
   27611           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   27612           0 :                 return false;
   27613             :         }
   27614           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   27615           0 :         if (r->in.account_name == NULL) {
   27616           0 :                 PyErr_NoMemory();
   27617           0 :                 return false;
   27618             :         }
   27619             :         {
   27620           0 :                 const char *test_str;
   27621           0 :                 const char *talloc_str;
   27622           0 :                 PyObject *unicode = NULL;
   27623           0 :                 if (PyUnicode_Check(py_account_name)) {
   27624           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   27625           0 :                         if (unicode == NULL) {
   27626           0 :                                 return false;
   27627             :                         }
   27628           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27629           0 :                 } else if (PyBytes_Check(py_account_name)) {
   27630           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   27631             :                 } else {
   27632           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   27633           0 :                         return false;
   27634             :                 }
   27635           0 :                 talloc_str = talloc_strdup(r, test_str);
   27636           0 :                 if (unicode != NULL) {
   27637           0 :                         Py_DECREF(unicode);
   27638             :                 }
   27639           0 :                 if (talloc_str == NULL) {
   27640           0 :                         PyErr_NoMemory();
   27641           0 :                         return false;
   27642             :                 }
   27643           0 :                 r->in.account_name = talloc_str;
   27644             :         }
   27645           0 :         if (py_workstation == NULL) {
   27646           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.workstation");
   27647           0 :                 return false;
   27648             :         }
   27649           0 :         r->in.workstation = talloc_ptrtype(r, r->in.workstation);
   27650           0 :         if (r->in.workstation == NULL) {
   27651           0 :                 PyErr_NoMemory();
   27652           0 :                 return false;
   27653             :         }
   27654             :         {
   27655           0 :                 const char *test_str;
   27656           0 :                 const char *talloc_str;
   27657           0 :                 PyObject *unicode = NULL;
   27658           0 :                 if (PyUnicode_Check(py_workstation)) {
   27659           0 :                         unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
   27660           0 :                         if (unicode == NULL) {
   27661           0 :                                 return false;
   27662             :                         }
   27663           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27664           0 :                 } else if (PyBytes_Check(py_workstation)) {
   27665           0 :                         test_str = PyBytes_AS_STRING(py_workstation);
   27666             :                 } else {
   27667           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
   27668           0 :                         return false;
   27669             :                 }
   27670           0 :                 talloc_str = talloc_strdup(r, test_str);
   27671           0 :                 if (unicode != NULL) {
   27672           0 :                         Py_DECREF(unicode);
   27673             :                 }
   27674           0 :                 if (talloc_str == NULL) {
   27675           0 :                         PyErr_NoMemory();
   27676           0 :                         return false;
   27677             :                 }
   27678           0 :                 r->in.workstation = talloc_str;
   27679             :         }
   27680           0 :         return true;
   27681             : }
   27682             : 
   27683           0 : static PyObject *unpack_py_netr_LogonUasLogoff_args_out(struct netr_LogonUasLogoff *r)
   27684             : {
   27685           0 :         PyObject *result;
   27686           0 :         PyObject *py_info;
   27687           0 :         py_info = pytalloc_reference_ex(&netr_UasLogoffInfo_Type, r->out.info, r->out.info);
   27688           0 :         result = py_info;
   27689           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   27690           0 :                 PyErr_SetWERROR(r->out.result);
   27691           0 :                 return NULL;
   27692             :         }
   27693             : 
   27694           0 :         return result;
   27695             : }
   27696             : 
   27697             : 
   27698           0 : static PyObject *py_netr_LogonSamLogon_in_get_server_name(PyObject *obj, void *closure)
   27699             : {
   27700           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   27701           0 :         PyObject *py_server_name;
   27702           0 :         if (object->in.server_name == NULL) {
   27703           0 :                 Py_RETURN_NONE;
   27704             :         }
   27705           0 :         if (object->in.server_name == NULL) {
   27706           0 :                 py_server_name = Py_None;
   27707           0 :                 Py_INCREF(py_server_name);
   27708             :         } else {
   27709           0 :                 if (object->in.server_name == NULL) {
   27710           0 :                         py_server_name = Py_None;
   27711           0 :                         Py_INCREF(py_server_name);
   27712             :                 } else {
   27713           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   27714             :                 }
   27715             :         }
   27716           0 :         return py_server_name;
   27717             : }
   27718             : 
   27719           0 : static int py_netr_LogonSamLogon_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   27720             : {
   27721           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   27722           0 :         if (value == NULL) {
   27723           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   27724           0 :                 return -1;
   27725             :         }
   27726           0 :         if (value == Py_None) {
   27727           0 :                 object->in.server_name = NULL;
   27728             :         } else {
   27729           0 :                 object->in.server_name = NULL;
   27730             :                 {
   27731           0 :                         const char *test_str;
   27732           0 :                         const char *talloc_str;
   27733           0 :                         PyObject *unicode = NULL;
   27734           0 :                         if (PyUnicode_Check(value)) {
   27735           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27736           0 :                                 if (unicode == NULL) {
   27737           0 :                                         return -1;
   27738             :                                 }
   27739           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27740           0 :                         } else if (PyBytes_Check(value)) {
   27741           0 :                                 test_str = PyBytes_AS_STRING(value);
   27742             :                         } else {
   27743           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27744           0 :                                 return -1;
   27745             :                         }
   27746           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27747           0 :                         if (unicode != NULL) {
   27748           0 :                                 Py_DECREF(unicode);
   27749             :                         }
   27750           0 :                         if (talloc_str == NULL) {
   27751           0 :                                 PyErr_NoMemory();
   27752           0 :                                 return -1;
   27753             :                         }
   27754           0 :                         object->in.server_name = talloc_str;
   27755             :                 }
   27756             :         }
   27757           0 :         return 0;
   27758             : }
   27759             : 
   27760           0 : static PyObject *py_netr_LogonSamLogon_in_get_computer_name(PyObject *obj, void *closure)
   27761             : {
   27762           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   27763           0 :         PyObject *py_computer_name;
   27764           0 :         if (object->in.computer_name == NULL) {
   27765           0 :                 Py_RETURN_NONE;
   27766             :         }
   27767           0 :         if (object->in.computer_name == NULL) {
   27768           0 :                 py_computer_name = Py_None;
   27769           0 :                 Py_INCREF(py_computer_name);
   27770             :         } else {
   27771           0 :                 if (object->in.computer_name == NULL) {
   27772           0 :                         py_computer_name = Py_None;
   27773           0 :                         Py_INCREF(py_computer_name);
   27774             :                 } else {
   27775           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   27776             :                 }
   27777             :         }
   27778           0 :         return py_computer_name;
   27779             : }
   27780             : 
   27781           0 : static int py_netr_LogonSamLogon_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   27782             : {
   27783           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   27784           0 :         if (value == NULL) {
   27785           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   27786           0 :                 return -1;
   27787             :         }
   27788           0 :         if (value == Py_None) {
   27789           0 :                 object->in.computer_name = NULL;
   27790             :         } else {
   27791           0 :                 object->in.computer_name = NULL;
   27792             :                 {
   27793           0 :                         const char *test_str;
   27794           0 :                         const char *talloc_str;
   27795           0 :                         PyObject *unicode = NULL;
   27796           0 :                         if (PyUnicode_Check(value)) {
   27797           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27798           0 :                                 if (unicode == NULL) {
   27799           0 :                                         return -1;
   27800             :                                 }
   27801           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27802           0 :                         } else if (PyBytes_Check(value)) {
   27803           0 :                                 test_str = PyBytes_AS_STRING(value);
   27804             :                         } else {
   27805           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27806           0 :                                 return -1;
   27807             :                         }
   27808           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27809           0 :                         if (unicode != NULL) {
   27810           0 :                                 Py_DECREF(unicode);
   27811             :                         }
   27812           0 :                         if (talloc_str == NULL) {
   27813           0 :                                 PyErr_NoMemory();
   27814           0 :                                 return -1;
   27815             :                         }
   27816           0 :                         object->in.computer_name = talloc_str;
   27817             :                 }
   27818             :         }
   27819           0 :         return 0;
   27820             : }
   27821             : 
   27822           0 : static PyObject *py_netr_LogonSamLogon_in_get_credential(PyObject *obj, void *closure)
   27823             : {
   27824           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   27825           0 :         PyObject *py_credential;
   27826           0 :         if (object->in.credential == NULL) {
   27827           0 :                 Py_RETURN_NONE;
   27828             :         }
   27829           0 :         if (object->in.credential == NULL) {
   27830           0 :                 py_credential = Py_None;
   27831           0 :                 Py_INCREF(py_credential);
   27832             :         } else {
   27833           0 :                 py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   27834             :         }
   27835           0 :         return py_credential;
   27836             : }
   27837             : 
   27838           0 : static int py_netr_LogonSamLogon_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   27839             : {
   27840           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   27841           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   27842           0 :         if (value == NULL) {
   27843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   27844           0 :                 return -1;
   27845             :         }
   27846           0 :         if (value == Py_None) {
   27847           0 :                 object->in.credential = NULL;
   27848             :         } else {
   27849           0 :                 object->in.credential = NULL;
   27850           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   27851           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27852           0 :                         PyErr_NoMemory();
   27853           0 :                         return -1;
   27854             :                 }
   27855           0 :                 object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   27856             :         }
   27857           0 :         return 0;
   27858             : }
   27859             : 
   27860           0 : static PyObject *py_netr_LogonSamLogon_in_get_return_authenticator(PyObject *obj, void *closure)
   27861             : {
   27862           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   27863           0 :         PyObject *py_return_authenticator;
   27864           0 :         if (object->in.return_authenticator == NULL) {
   27865           0 :                 Py_RETURN_NONE;
   27866             :         }
   27867           0 :         if (object->in.return_authenticator == NULL) {
   27868           0 :                 py_return_authenticator = Py_None;
   27869           0 :                 Py_INCREF(py_return_authenticator);
   27870             :         } else {
   27871           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   27872             :         }
   27873           0 :         return py_return_authenticator;
   27874             : }
   27875             : 
   27876           0 : static int py_netr_LogonSamLogon_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   27877             : {
   27878           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   27879           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   27880           0 :         if (value == NULL) {
   27881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   27882           0 :                 return -1;
   27883             :         }
   27884           0 :         if (value == Py_None) {
   27885           0 :                 object->in.return_authenticator = NULL;
   27886             :         } else {
   27887           0 :                 object->in.return_authenticator = NULL;
   27888           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   27889           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27890           0 :                         PyErr_NoMemory();
   27891           0 :                         return -1;
   27892             :                 }
   27893           0 :                 object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   27894             :         }
   27895           0 :         return 0;
   27896             : }
   27897             : 
   27898           0 : static PyObject *py_netr_LogonSamLogon_out_get_return_authenticator(PyObject *obj, void *closure)
   27899             : {
   27900           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   27901           0 :         PyObject *py_return_authenticator;
   27902           0 :         if (object->out.return_authenticator == NULL) {
   27903           0 :                 Py_RETURN_NONE;
   27904             :         }
   27905           0 :         if (object->out.return_authenticator == NULL) {
   27906           0 :                 py_return_authenticator = Py_None;
   27907           0 :                 Py_INCREF(py_return_authenticator);
   27908             :         } else {
   27909           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   27910             :         }
   27911           0 :         return py_return_authenticator;
   27912             : }
   27913             : 
   27914           0 : static int py_netr_LogonSamLogon_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   27915             : {
   27916           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   27917           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   27918           0 :         if (value == NULL) {
   27919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   27920           0 :                 return -1;
   27921             :         }
   27922           0 :         if (value == Py_None) {
   27923           0 :                 object->out.return_authenticator = NULL;
   27924             :         } else {
   27925           0 :                 object->out.return_authenticator = NULL;
   27926           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   27927           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27928           0 :                         PyErr_NoMemory();
   27929           0 :                         return -1;
   27930             :                 }
   27931           0 :                 object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   27932             :         }
   27933           0 :         return 0;
   27934             : }
   27935             : 
   27936           0 : static PyObject *py_netr_LogonSamLogon_in_get_logon_level(PyObject *obj, void *closure)
   27937             : {
   27938           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   27939           0 :         PyObject *py_logon_level;
   27940           0 :         py_logon_level = PyLong_FromLong((uint16_t)(object->in.logon_level));
   27941           0 :         return py_logon_level;
   27942             : }
   27943             : 
   27944           0 : static int py_netr_LogonSamLogon_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   27945             : {
   27946           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   27947           0 :         if (value == NULL) {
   27948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_level");
   27949           0 :                 return -1;
   27950             :         }
   27951             :         {
   27952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   27953           0 :                 if (PyLong_Check(value)) {
   27954           0 :                         unsigned long long test_var;
   27955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27956           0 :                         if (PyErr_Occurred() != NULL) {
   27957           0 :                                 return -1;
   27958             :                         }
   27959           0 :                         if (test_var > uint_max) {
   27960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27961             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27962           0 :                                 return -1;
   27963             :                         }
   27964           0 :                         object->in.logon_level = test_var;
   27965             :                 } else {
   27966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27967             :                           PyLong_Type.tp_name);
   27968           0 :                         return -1;
   27969             :                 }
   27970             :         }
   27971           0 :         return 0;
   27972             : }
   27973             : 
   27974           0 : static PyObject *py_netr_LogonSamLogon_in_get_logon(PyObject *obj, void *closure)
   27975             : {
   27976           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   27977           0 :         PyObject *py_logon;
   27978           0 :         if (object->in.logon == NULL) {
   27979           0 :                 Py_RETURN_NONE;
   27980             :         }
   27981           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
   27982           0 :         if (py_logon == NULL) {
   27983           0 :                 return NULL;
   27984             :         }
   27985           0 :         return py_logon;
   27986             : }
   27987             : 
   27988           0 : static int py_netr_LogonSamLogon_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   27989             : {
   27990           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   27991           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
   27992           0 :         if (value == NULL) {
   27993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon");
   27994           0 :                 return -1;
   27995             :         }
   27996           0 :         object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
   27997           0 :         if (object->in.logon == NULL) {
   27998           0 :                 PyErr_NoMemory();
   27999           0 :                 return -1;
   28000             :         }
   28001             :         {
   28002           0 :                 union netr_LogonLevel *logon_switch_1;
   28003           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");
   28004           0 :                 if (logon_switch_1 == NULL) {
   28005           0 :                         return -1;
   28006             :                 }
   28007           0 :                 object->in.logon = logon_switch_1;
   28008             :         }
   28009           0 :         return 0;
   28010             : }
   28011             : 
   28012           0 : static PyObject *py_netr_LogonSamLogon_in_get_validation_level(PyObject *obj, void *closure)
   28013             : {
   28014           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   28015           0 :         PyObject *py_validation_level;
   28016           0 :         py_validation_level = PyLong_FromLong((uint16_t)(object->in.validation_level));
   28017           0 :         return py_validation_level;
   28018             : }
   28019             : 
   28020           0 : static int py_netr_LogonSamLogon_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   28021             : {
   28022           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   28023           0 :         if (value == NULL) {
   28024           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.validation_level");
   28025           0 :                 return -1;
   28026             :         }
   28027             :         {
   28028           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   28029           0 :                 if (PyLong_Check(value)) {
   28030           0 :                         unsigned long long test_var;
   28031           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28032           0 :                         if (PyErr_Occurred() != NULL) {
   28033           0 :                                 return -1;
   28034             :                         }
   28035           0 :                         if (test_var > uint_max) {
   28036           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28037             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28038           0 :                                 return -1;
   28039             :                         }
   28040           0 :                         object->in.validation_level = test_var;
   28041             :                 } else {
   28042           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28043             :                           PyLong_Type.tp_name);
   28044           0 :                         return -1;
   28045             :                 }
   28046             :         }
   28047           0 :         return 0;
   28048             : }
   28049             : 
   28050           0 : static PyObject *py_netr_LogonSamLogon_out_get_validation(PyObject *obj, void *closure)
   28051             : {
   28052           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   28053           0 :         PyObject *py_validation;
   28054           0 :         if (object->out.validation == NULL) {
   28055           0 :                 Py_RETURN_NONE;
   28056             :         }
   28057           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
   28058           0 :         if (py_validation == NULL) {
   28059           0 :                 return NULL;
   28060             :         }
   28061           0 :         return py_validation;
   28062             : }
   28063             : 
   28064           0 : static int py_netr_LogonSamLogon_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   28065             : {
   28066           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   28067           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   28068           0 :         if (value == NULL) {
   28069           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.validation");
   28070           0 :                 return -1;
   28071             :         }
   28072           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   28073           0 :         if (object->out.validation == NULL) {
   28074           0 :                 PyErr_NoMemory();
   28075           0 :                 return -1;
   28076             :         }
   28077             :         {
   28078           0 :                 union netr_Validation *validation_switch_1;
   28079           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");
   28080           0 :                 if (validation_switch_1 == NULL) {
   28081           0 :                         return -1;
   28082             :                 }
   28083           0 :                 object->out.validation = validation_switch_1;
   28084             :         }
   28085           0 :         return 0;
   28086             : }
   28087             : 
   28088           0 : static PyObject *py_netr_LogonSamLogon_out_get_authoritative(PyObject *obj, void *closure)
   28089             : {
   28090           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   28091           0 :         PyObject *py_authoritative;
   28092           0 :         if (object->out.authoritative == NULL) {
   28093           0 :                 Py_RETURN_NONE;
   28094             :         }
   28095           0 :         py_authoritative = PyLong_FromLong((uint16_t)(*object->out.authoritative));
   28096           0 :         return py_authoritative;
   28097             : }
   28098             : 
   28099           0 : static int py_netr_LogonSamLogon_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   28100             : {
   28101           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   28102           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   28103           0 :         if (value == NULL) {
   28104           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.authoritative");
   28105           0 :                 return -1;
   28106             :         }
   28107           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   28108           0 :         if (object->out.authoritative == NULL) {
   28109           0 :                 PyErr_NoMemory();
   28110           0 :                 return -1;
   28111             :         }
   28112             :         {
   28113           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   28114           0 :                 if (PyLong_Check(value)) {
   28115           0 :                         unsigned long long test_var;
   28116           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28117           0 :                         if (PyErr_Occurred() != NULL) {
   28118           0 :                                 return -1;
   28119             :                         }
   28120           0 :                         if (test_var > uint_max) {
   28121           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28122             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28123           0 :                                 return -1;
   28124             :                         }
   28125           0 :                         *object->out.authoritative = test_var;
   28126             :                 } else {
   28127           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28128             :                           PyLong_Type.tp_name);
   28129           0 :                         return -1;
   28130             :                 }
   28131             :         }
   28132           0 :         return 0;
   28133             : }
   28134             : 
   28135           0 : static PyObject *py_netr_LogonSamLogon_get_result(PyObject *obj, void *closure)
   28136             : {
   28137           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
   28138           0 :         PyObject *py_result;
   28139           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   28140           0 :         return py_result;
   28141             : }
   28142             : 
   28143           0 : static int py_netr_LogonSamLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
   28144             : {
   28145           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   28146           0 :         if (value == NULL) {
   28147           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   28148           0 :                 return -1;
   28149             :         }
   28150           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   28151           0 :         return 0;
   28152             : }
   28153             : 
   28154             : static PyGetSetDef py_netr_LogonSamLogon_getsetters[] = {
   28155             :         {
   28156             :                 .name = discard_const_p(char, "in_server_name"),
   28157             :                 .get = py_netr_LogonSamLogon_in_get_server_name,
   28158             :                 .set = py_netr_LogonSamLogon_in_set_server_name,
   28159             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28160             :         },
   28161             :         {
   28162             :                 .name = discard_const_p(char, "in_computer_name"),
   28163             :                 .get = py_netr_LogonSamLogon_in_get_computer_name,
   28164             :                 .set = py_netr_LogonSamLogon_in_set_computer_name,
   28165             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28166             :         },
   28167             :         {
   28168             :                 .name = discard_const_p(char, "in_credential"),
   28169             :                 .get = py_netr_LogonSamLogon_in_get_credential,
   28170             :                 .set = py_netr_LogonSamLogon_in_set_credential,
   28171             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   28172             :         },
   28173             :         {
   28174             :                 .name = discard_const_p(char, "in_return_authenticator"),
   28175             :                 .get = py_netr_LogonSamLogon_in_get_return_authenticator,
   28176             :                 .set = py_netr_LogonSamLogon_in_set_return_authenticator,
   28177             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   28178             :         },
   28179             :         {
   28180             :                 .name = discard_const_p(char, "out_return_authenticator"),
   28181             :                 .get = py_netr_LogonSamLogon_out_get_return_authenticator,
   28182             :                 .set = py_netr_LogonSamLogon_out_set_return_authenticator,
   28183             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   28184             :         },
   28185             :         {
   28186             :                 .name = discard_const_p(char, "in_logon_level"),
   28187             :                 .get = py_netr_LogonSamLogon_in_get_logon_level,
   28188             :                 .set = py_netr_LogonSamLogon_in_set_logon_level,
   28189             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   28190             :         },
   28191             :         {
   28192             :                 .name = discard_const_p(char, "in_logon"),
   28193             :                 .get = py_netr_LogonSamLogon_in_get_logon,
   28194             :                 .set = py_netr_LogonSamLogon_in_set_logon,
   28195             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   28196             :         },
   28197             :         {
   28198             :                 .name = discard_const_p(char, "in_validation_level"),
   28199             :                 .get = py_netr_LogonSamLogon_in_get_validation_level,
   28200             :                 .set = py_netr_LogonSamLogon_in_set_validation_level,
   28201             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28202             :         },
   28203             :         {
   28204             :                 .name = discard_const_p(char, "out_validation"),
   28205             :                 .get = py_netr_LogonSamLogon_out_get_validation,
   28206             :                 .set = py_netr_LogonSamLogon_out_set_validation,
   28207             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   28208             :         },
   28209             :         {
   28210             :                 .name = discard_const_p(char, "out_authoritative"),
   28211             :                 .get = py_netr_LogonSamLogon_out_get_authoritative,
   28212             :                 .set = py_netr_LogonSamLogon_out_set_authoritative,
   28213             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   28214             :         },
   28215             :         {
   28216             :                 .name = discard_const_p(char, "result"),
   28217             :                 .get = py_netr_LogonSamLogon_get_result,
   28218             :                 .set = py_netr_LogonSamLogon_set_result,
   28219             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   28220             :         },
   28221             :         { .name = NULL }
   28222             : };
   28223             : 
   28224           0 : static PyObject *py_netr_LogonSamLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28225             : {
   28226           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogon, type);
   28227           0 :         struct netr_LogonSamLogon *_self = (struct netr_LogonSamLogon *)pytalloc_get_ptr(self);
   28228           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   28229           0 :         _self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
   28230           0 :         _self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
   28231           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   28232           0 :         return self;
   28233             : }
   28234             : 
   28235           0 : static PyObject *py_netr_LogonSamLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   28236             : {
   28237             : 
   28238             : 
   28239           0 :         return PyLong_FromLong(2);
   28240             : }
   28241             : 
   28242           0 : static PyObject *py_netr_LogonSamLogon_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   28243             : {
   28244           0 :         const struct ndr_interface_call *call = NULL;
   28245           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   28246           0 :         PyObject *ret = NULL;
   28247           0 :         struct ndr_push *push = NULL;
   28248           0 :         DATA_BLOB blob;
   28249           0 :         enum ndr_err_code err;
   28250             : 
   28251           0 :         if (ndr_table_netlogon.num_calls < 3) {
   28252           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_pack");
   28253           0 :                 return NULL;
   28254             :         }
   28255           0 :         call = &ndr_table_netlogon.calls[2];
   28256             : 
   28257           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   28258           0 :         if (push == NULL) {
   28259           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   28260           0 :                 return NULL;
   28261             :         }
   28262             : 
   28263           0 :         push->flags |= ndr_push_flags;
   28264             : 
   28265           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   28266           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   28267           0 :                 TALLOC_FREE(push);
   28268           0 :                 PyErr_SetNdrError(err);
   28269           0 :                 return NULL;
   28270             :         }
   28271           0 :         blob = ndr_push_blob(push);
   28272           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   28273           0 :         TALLOC_FREE(push);
   28274           0 :         return ret;
   28275             : }
   28276             : 
   28277           0 : static PyObject *py_netr_LogonSamLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28278             : {
   28279           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   28280           0 :         PyObject *bigendian_obj = NULL;
   28281           0 :         PyObject *ndr64_obj = NULL;
   28282           0 :         libndr_flags ndr_push_flags = 0;
   28283             : 
   28284           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   28285             :                 discard_const_p(char *, kwnames),
   28286             :                 &bigendian_obj,
   28287             :                 &ndr64_obj)) {
   28288           0 :                 return NULL;
   28289             :         }
   28290             : 
   28291           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28292           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   28293             :         }
   28294           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28295           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   28296             :         }
   28297             : 
   28298           0 :         return py_netr_LogonSamLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   28299             : }
   28300             : 
   28301           0 : static PyObject *py_netr_LogonSamLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28302             : {
   28303           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   28304           0 :         PyObject *bigendian_obj = NULL;
   28305           0 :         PyObject *ndr64_obj = NULL;
   28306           0 :         libndr_flags ndr_push_flags = 0;
   28307             : 
   28308           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   28309             :                 discard_const_p(char *, kwnames),
   28310             :                 &bigendian_obj,
   28311             :                 &ndr64_obj)) {
   28312           0 :                 return NULL;
   28313             :         }
   28314             : 
   28315           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28316           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   28317             :         }
   28318           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28319           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   28320             :         }
   28321             : 
   28322           0 :         return py_netr_LogonSamLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   28323             : }
   28324             : 
   28325           0 : static PyObject *py_netr_LogonSamLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   28326             : {
   28327           0 :         const struct ndr_interface_call *call = NULL;
   28328           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   28329           0 :         struct ndr_pull *pull = NULL;
   28330           0 :         enum ndr_err_code err;
   28331             : 
   28332           0 :         if (ndr_table_netlogon.num_calls < 3) {
   28333           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_unpack");
   28334           0 :                 return NULL;
   28335             :         }
   28336           0 :         call = &ndr_table_netlogon.calls[2];
   28337             : 
   28338           0 :         pull = ndr_pull_init_blob(blob, object);
   28339           0 :         if (pull == NULL) {
   28340           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   28341           0 :                 return NULL;
   28342             :         }
   28343             : 
   28344           0 :         pull->flags |= ndr_pull_flags;
   28345             : 
   28346           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   28347           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   28348           0 :                 TALLOC_FREE(pull);
   28349           0 :                 PyErr_SetNdrError(err);
   28350           0 :                 return NULL;
   28351             :         }
   28352           0 :         if (!allow_remaining) {
   28353           0 :                 uint32_t highest_ofs;
   28354             : 
   28355           0 :                 if (pull->offset > pull->relative_highest_offset) {
   28356           0 :                         highest_ofs = pull->offset;
   28357             :                 } else {
   28358           0 :                         highest_ofs = pull->relative_highest_offset;
   28359             :                 }
   28360           0 :                 if (highest_ofs < pull->data_size) {
   28361           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   28362             :                                 "not all bytes consumed ofs[%u] size[%u]",
   28363             :                                 highest_ofs, pull->data_size);
   28364           0 :                         TALLOC_FREE(pull);
   28365           0 :                         PyErr_SetNdrError(err);
   28366           0 :                         return NULL;
   28367             :                 }
   28368             :         }
   28369             : 
   28370           0 :         TALLOC_FREE(pull);
   28371           0 :         Py_RETURN_NONE;
   28372             : }
   28373             : 
   28374           0 : static PyObject *py_netr_LogonSamLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28375             : {
   28376           0 :         DATA_BLOB blob;
   28377           0 :         Py_ssize_t blob_length = 0;
   28378           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   28379           0 :         PyObject *bigendian_obj = NULL;
   28380           0 :         PyObject *ndr64_obj = NULL;
   28381           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   28382           0 :         PyObject *allow_remaining_obj = NULL;
   28383           0 :         bool allow_remaining = false;
   28384             : 
   28385           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   28386             :                 discard_const_p(char *, kwnames),
   28387             :                 &blob.data, &blob_length,
   28388             :                 &bigendian_obj,
   28389             :                 &ndr64_obj,
   28390             :                 &allow_remaining_obj)) {
   28391           0 :                 return NULL;
   28392             :         }
   28393           0 :         blob.length = blob_length;
   28394             : 
   28395           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28396           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   28397             :         }
   28398           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28399           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   28400             :         }
   28401             : 
   28402           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   28403           0 :                 allow_remaining = true;
   28404             :         }
   28405             : 
   28406           0 :         return py_netr_LogonSamLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   28407             : }
   28408             : 
   28409           0 : static PyObject *py_netr_LogonSamLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28410             : {
   28411           0 :         DATA_BLOB blob;
   28412           0 :         Py_ssize_t blob_length = 0;
   28413           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   28414           0 :         PyObject *bigendian_obj = NULL;
   28415           0 :         PyObject *ndr64_obj = NULL;
   28416           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   28417           0 :         PyObject *allow_remaining_obj = NULL;
   28418           0 :         bool allow_remaining = false;
   28419             : 
   28420           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   28421             :                 discard_const_p(char *, kwnames),
   28422             :                 &blob.data, &blob_length,
   28423             :                 &bigendian_obj,
   28424             :                 &ndr64_obj,
   28425             :                 &allow_remaining_obj)) {
   28426           0 :                 return NULL;
   28427             :         }
   28428           0 :         blob.length = blob_length;
   28429             : 
   28430           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28431           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   28432             :         }
   28433           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28434           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   28435             :         }
   28436             : 
   28437           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   28438           0 :                 allow_remaining = true;
   28439             :         }
   28440             : 
   28441           0 :         return py_netr_LogonSamLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   28442             : }
   28443             : 
   28444           0 : static PyObject *py_netr_LogonSamLogon_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   28445             : {
   28446           0 :         const struct ndr_interface_call *call = NULL;
   28447           0 :         struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
   28448           0 :         PyObject *ret;
   28449           0 :         char *retstr;
   28450             : 
   28451           0 :         if (ndr_table_netlogon.num_calls < 3) {
   28452           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_print");
   28453           0 :                 return NULL;
   28454             :         }
   28455           0 :         call = &ndr_table_netlogon.calls[2];
   28456             : 
   28457           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   28458           0 :         ret = PyUnicode_FromString(retstr);
   28459           0 :         TALLOC_FREE(retstr);
   28460             : 
   28461           0 :         return ret;
   28462             : }
   28463             : 
   28464           0 : static PyObject *py_netr_LogonSamLogon_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   28465             : {
   28466           0 :         return py_netr_LogonSamLogon_ndr_print(py_obj, "netr_LogonSamLogon_in", NDR_IN);
   28467             : }
   28468             : 
   28469           0 : static PyObject *py_netr_LogonSamLogon_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   28470             : {
   28471           0 :         return py_netr_LogonSamLogon_ndr_print(py_obj, "netr_LogonSamLogon_out", NDR_OUT);
   28472             : }
   28473             : 
   28474             : static PyMethodDef py_netr_LogonSamLogon_methods[] = {
   28475             :         { "opnum", (PyCFunction)py_netr_LogonSamLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
   28476             :                 "netlogon.netr_LogonSamLogon.opnum() -> 2 (0x02) " },
   28477             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   28478             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   28479             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   28480             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   28481             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   28482             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   28483             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   28484             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   28485             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogon_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   28486             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogon_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   28487             :         { NULL, NULL, 0, NULL }
   28488             : };
   28489             : 
   28490             : 
   28491             : static PyTypeObject netr_LogonSamLogon_Type = {
   28492             :         PyVarObject_HEAD_INIT(NULL, 0)
   28493             :         .tp_name = "netlogon.netr_LogonSamLogon",
   28494             :         .tp_getset = py_netr_LogonSamLogon_getsetters,
   28495             :         .tp_methods = py_netr_LogonSamLogon_methods,
   28496             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28497             :         .tp_new = py_netr_LogonSamLogon_new,
   28498             : };
   28499             : 
   28500           0 : static bool pack_py_netr_LogonSamLogon_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogon *r)
   28501             : {
   28502           0 :         PyObject *py_server_name;
   28503           0 :         PyObject *py_computer_name;
   28504           0 :         PyObject *py_credential;
   28505           0 :         PyObject *py_return_authenticator;
   28506           0 :         PyObject *py_logon_level;
   28507           0 :         PyObject *py_logon;
   28508           0 :         PyObject *py_validation_level;
   28509           0 :         const char *kwnames[] = {
   28510             :                 "server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", "validation_level", NULL
   28511             :         };
   28512             : 
   28513           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)) {
   28514           0 :                 return false;
   28515             :         }
   28516             : 
   28517           0 :         if (py_server_name == NULL) {
   28518           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   28519           0 :                 return false;
   28520             :         }
   28521           0 :         if (py_server_name == Py_None) {
   28522           0 :                 r->in.server_name = NULL;
   28523             :         } else {
   28524           0 :                 r->in.server_name = NULL;
   28525             :                 {
   28526           0 :                         const char *test_str;
   28527           0 :                         const char *talloc_str;
   28528           0 :                         PyObject *unicode = NULL;
   28529           0 :                         if (PyUnicode_Check(py_server_name)) {
   28530           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   28531           0 :                                 if (unicode == NULL) {
   28532           0 :                                         return false;
   28533             :                                 }
   28534           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28535           0 :                         } else if (PyBytes_Check(py_server_name)) {
   28536           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   28537             :                         } else {
   28538           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   28539           0 :                                 return false;
   28540             :                         }
   28541           0 :                         talloc_str = talloc_strdup(r, test_str);
   28542           0 :                         if (unicode != NULL) {
   28543           0 :                                 Py_DECREF(unicode);
   28544             :                         }
   28545           0 :                         if (talloc_str == NULL) {
   28546           0 :                                 PyErr_NoMemory();
   28547           0 :                                 return false;
   28548             :                         }
   28549           0 :                         r->in.server_name = talloc_str;
   28550             :                 }
   28551             :         }
   28552           0 :         if (py_computer_name == NULL) {
   28553           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   28554           0 :                 return false;
   28555             :         }
   28556           0 :         if (py_computer_name == Py_None) {
   28557           0 :                 r->in.computer_name = NULL;
   28558             :         } else {
   28559           0 :                 r->in.computer_name = NULL;
   28560             :                 {
   28561           0 :                         const char *test_str;
   28562           0 :                         const char *talloc_str;
   28563           0 :                         PyObject *unicode = NULL;
   28564           0 :                         if (PyUnicode_Check(py_computer_name)) {
   28565           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   28566           0 :                                 if (unicode == NULL) {
   28567           0 :                                         return false;
   28568             :                                 }
   28569           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28570           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   28571           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   28572             :                         } else {
   28573           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   28574           0 :                                 return false;
   28575             :                         }
   28576           0 :                         talloc_str = talloc_strdup(r, test_str);
   28577           0 :                         if (unicode != NULL) {
   28578           0 :                                 Py_DECREF(unicode);
   28579             :                         }
   28580           0 :                         if (talloc_str == NULL) {
   28581           0 :                                 PyErr_NoMemory();
   28582           0 :                                 return false;
   28583             :                         }
   28584           0 :                         r->in.computer_name = talloc_str;
   28585             :                 }
   28586             :         }
   28587           0 :         if (py_credential == NULL) {
   28588           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   28589           0 :                 return false;
   28590             :         }
   28591           0 :         if (py_credential == Py_None) {
   28592           0 :                 r->in.credential = NULL;
   28593             :         } else {
   28594           0 :                 r->in.credential = NULL;
   28595           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   28596           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   28597           0 :                         PyErr_NoMemory();
   28598           0 :                         return false;
   28599             :                 }
   28600           0 :                 r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   28601             :         }
   28602           0 :         if (py_return_authenticator == NULL) {
   28603           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   28604           0 :                 return false;
   28605             :         }
   28606           0 :         if (py_return_authenticator == Py_None) {
   28607           0 :                 r->in.return_authenticator = NULL;
   28608             :         } else {
   28609           0 :                 r->in.return_authenticator = NULL;
   28610           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   28611           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   28612           0 :                         PyErr_NoMemory();
   28613           0 :                         return false;
   28614             :                 }
   28615           0 :                 r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   28616             :         }
   28617           0 :         if (py_logon_level == NULL) {
   28618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_level");
   28619           0 :                 return false;
   28620             :         }
   28621             :         {
   28622           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   28623           0 :                 if (PyLong_Check(py_logon_level)) {
   28624           0 :                         unsigned long long test_var;
   28625           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   28626           0 :                         if (PyErr_Occurred() != NULL) {
   28627           0 :                                 return false;
   28628             :                         }
   28629           0 :                         if (test_var > uint_max) {
   28630           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28631             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28632           0 :                                 return false;
   28633             :                         }
   28634           0 :                         r->in.logon_level = test_var;
   28635             :                 } else {
   28636           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28637             :                           PyLong_Type.tp_name);
   28638           0 :                         return false;
   28639             :                 }
   28640             :         }
   28641           0 :         if (py_logon == NULL) {
   28642           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon");
   28643           0 :                 return false;
   28644             :         }
   28645           0 :         r->in.logon = talloc_ptrtype(r, r->in.logon);
   28646           0 :         if (r->in.logon == NULL) {
   28647           0 :                 PyErr_NoMemory();
   28648           0 :                 return false;
   28649             :         }
   28650             :         {
   28651           0 :                 union netr_LogonLevel *logon_switch_1;
   28652           0 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   28653           0 :                 if (logon_switch_1 == NULL) {
   28654           0 :                         return false;
   28655             :                 }
   28656           0 :                 r->in.logon = logon_switch_1;
   28657             :         }
   28658           0 :         if (py_validation_level == NULL) {
   28659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.validation_level");
   28660           0 :                 return false;
   28661             :         }
   28662             :         {
   28663           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   28664           0 :                 if (PyLong_Check(py_validation_level)) {
   28665           0 :                         unsigned long long test_var;
   28666           0 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   28667           0 :                         if (PyErr_Occurred() != NULL) {
   28668           0 :                                 return false;
   28669             :                         }
   28670           0 :                         if (test_var > uint_max) {
   28671           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28672             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28673           0 :                                 return false;
   28674             :                         }
   28675           0 :                         r->in.validation_level = test_var;
   28676             :                 } else {
   28677           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28678             :                           PyLong_Type.tp_name);
   28679           0 :                         return false;
   28680             :                 }
   28681             :         }
   28682           0 :         return true;
   28683             : }
   28684             : 
   28685           0 : static PyObject *unpack_py_netr_LogonSamLogon_args_out(struct netr_LogonSamLogon *r)
   28686             : {
   28687           0 :         PyObject *result;
   28688           0 :         PyObject *py_return_authenticator;
   28689           0 :         PyObject *py_validation;
   28690           0 :         PyObject *py_authoritative;
   28691           0 :         result = PyTuple_New(3);
   28692           0 :         if (r->out.return_authenticator == NULL) {
   28693           0 :                 py_return_authenticator = Py_None;
   28694           0 :                 Py_INCREF(py_return_authenticator);
   28695             :         } else {
   28696           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   28697             :         }
   28698           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   28699           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
   28700           0 :         if (py_validation == NULL) {
   28701           0 :                 return NULL;
   28702             :         }
   28703           0 :         PyTuple_SetItem(result, 1, py_validation);
   28704           0 :         py_authoritative = PyLong_FromLong((uint16_t)(*r->out.authoritative));
   28705           0 :         PyTuple_SetItem(result, 2, py_authoritative);
   28706           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   28707           0 :                 PyErr_SetNTSTATUS(r->out.result);
   28708           0 :                 return NULL;
   28709             :         }
   28710             : 
   28711           0 :         return result;
   28712             : }
   28713             : 
   28714             : 
   28715           0 : static PyObject *py_netr_LogonSamLogoff_in_get_server_name(PyObject *obj, void *closure)
   28716             : {
   28717           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
   28718           0 :         PyObject *py_server_name;
   28719           0 :         if (object->in.server_name == NULL) {
   28720           0 :                 Py_RETURN_NONE;
   28721             :         }
   28722           0 :         if (object->in.server_name == NULL) {
   28723           0 :                 py_server_name = Py_None;
   28724           0 :                 Py_INCREF(py_server_name);
   28725             :         } else {
   28726           0 :                 if (object->in.server_name == NULL) {
   28727           0 :                         py_server_name = Py_None;
   28728           0 :                         Py_INCREF(py_server_name);
   28729             :                 } else {
   28730           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   28731             :                 }
   28732             :         }
   28733           0 :         return py_server_name;
   28734             : }
   28735             : 
   28736           0 : static int py_netr_LogonSamLogoff_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   28737             : {
   28738           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   28739           0 :         if (value == NULL) {
   28740           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   28741           0 :                 return -1;
   28742             :         }
   28743           0 :         if (value == Py_None) {
   28744           0 :                 object->in.server_name = NULL;
   28745             :         } else {
   28746           0 :                 object->in.server_name = NULL;
   28747             :                 {
   28748           0 :                         const char *test_str;
   28749           0 :                         const char *talloc_str;
   28750           0 :                         PyObject *unicode = NULL;
   28751           0 :                         if (PyUnicode_Check(value)) {
   28752           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28753           0 :                                 if (unicode == NULL) {
   28754           0 :                                         return -1;
   28755             :                                 }
   28756           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28757           0 :                         } else if (PyBytes_Check(value)) {
   28758           0 :                                 test_str = PyBytes_AS_STRING(value);
   28759             :                         } else {
   28760           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28761           0 :                                 return -1;
   28762             :                         }
   28763           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28764           0 :                         if (unicode != NULL) {
   28765           0 :                                 Py_DECREF(unicode);
   28766             :                         }
   28767           0 :                         if (talloc_str == NULL) {
   28768           0 :                                 PyErr_NoMemory();
   28769           0 :                                 return -1;
   28770             :                         }
   28771           0 :                         object->in.server_name = talloc_str;
   28772             :                 }
   28773             :         }
   28774           0 :         return 0;
   28775             : }
   28776             : 
   28777           0 : static PyObject *py_netr_LogonSamLogoff_in_get_computer_name(PyObject *obj, void *closure)
   28778             : {
   28779           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
   28780           0 :         PyObject *py_computer_name;
   28781           0 :         if (object->in.computer_name == NULL) {
   28782           0 :                 Py_RETURN_NONE;
   28783             :         }
   28784           0 :         if (object->in.computer_name == NULL) {
   28785           0 :                 py_computer_name = Py_None;
   28786           0 :                 Py_INCREF(py_computer_name);
   28787             :         } else {
   28788           0 :                 if (object->in.computer_name == NULL) {
   28789           0 :                         py_computer_name = Py_None;
   28790           0 :                         Py_INCREF(py_computer_name);
   28791             :                 } else {
   28792           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   28793             :                 }
   28794             :         }
   28795           0 :         return py_computer_name;
   28796             : }
   28797             : 
   28798           0 : static int py_netr_LogonSamLogoff_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   28799             : {
   28800           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   28801           0 :         if (value == NULL) {
   28802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   28803           0 :                 return -1;
   28804             :         }
   28805           0 :         if (value == Py_None) {
   28806           0 :                 object->in.computer_name = NULL;
   28807             :         } else {
   28808           0 :                 object->in.computer_name = NULL;
   28809             :                 {
   28810           0 :                         const char *test_str;
   28811           0 :                         const char *talloc_str;
   28812           0 :                         PyObject *unicode = NULL;
   28813           0 :                         if (PyUnicode_Check(value)) {
   28814           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28815           0 :                                 if (unicode == NULL) {
   28816           0 :                                         return -1;
   28817             :                                 }
   28818           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28819           0 :                         } else if (PyBytes_Check(value)) {
   28820           0 :                                 test_str = PyBytes_AS_STRING(value);
   28821             :                         } else {
   28822           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28823           0 :                                 return -1;
   28824             :                         }
   28825           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28826           0 :                         if (unicode != NULL) {
   28827           0 :                                 Py_DECREF(unicode);
   28828             :                         }
   28829           0 :                         if (talloc_str == NULL) {
   28830           0 :                                 PyErr_NoMemory();
   28831           0 :                                 return -1;
   28832             :                         }
   28833           0 :                         object->in.computer_name = talloc_str;
   28834             :                 }
   28835             :         }
   28836           0 :         return 0;
   28837             : }
   28838             : 
   28839           0 : static PyObject *py_netr_LogonSamLogoff_in_get_credential(PyObject *obj, void *closure)
   28840             : {
   28841           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
   28842           0 :         PyObject *py_credential;
   28843           0 :         if (object->in.credential == NULL) {
   28844           0 :                 Py_RETURN_NONE;
   28845             :         }
   28846           0 :         if (object->in.credential == NULL) {
   28847           0 :                 py_credential = Py_None;
   28848           0 :                 Py_INCREF(py_credential);
   28849             :         } else {
   28850           0 :                 py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   28851             :         }
   28852           0 :         return py_credential;
   28853             : }
   28854             : 
   28855           0 : static int py_netr_LogonSamLogoff_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   28856             : {
   28857           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   28858           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   28859           0 :         if (value == NULL) {
   28860           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   28861           0 :                 return -1;
   28862             :         }
   28863           0 :         if (value == Py_None) {
   28864           0 :                 object->in.credential = NULL;
   28865             :         } else {
   28866           0 :                 object->in.credential = NULL;
   28867           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   28868           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28869           0 :                         PyErr_NoMemory();
   28870           0 :                         return -1;
   28871             :                 }
   28872           0 :                 object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   28873             :         }
   28874           0 :         return 0;
   28875             : }
   28876             : 
   28877           0 : static PyObject *py_netr_LogonSamLogoff_in_get_return_authenticator(PyObject *obj, void *closure)
   28878             : {
   28879           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
   28880           0 :         PyObject *py_return_authenticator;
   28881           0 :         if (object->in.return_authenticator == NULL) {
   28882           0 :                 Py_RETURN_NONE;
   28883             :         }
   28884           0 :         if (object->in.return_authenticator == NULL) {
   28885           0 :                 py_return_authenticator = Py_None;
   28886           0 :                 Py_INCREF(py_return_authenticator);
   28887             :         } else {
   28888           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   28889             :         }
   28890           0 :         return py_return_authenticator;
   28891             : }
   28892             : 
   28893           0 : static int py_netr_LogonSamLogoff_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   28894             : {
   28895           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   28896           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   28897           0 :         if (value == NULL) {
   28898           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   28899           0 :                 return -1;
   28900             :         }
   28901           0 :         if (value == Py_None) {
   28902           0 :                 object->in.return_authenticator = NULL;
   28903             :         } else {
   28904           0 :                 object->in.return_authenticator = NULL;
   28905           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   28906           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28907           0 :                         PyErr_NoMemory();
   28908           0 :                         return -1;
   28909             :                 }
   28910           0 :                 object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   28911             :         }
   28912           0 :         return 0;
   28913             : }
   28914             : 
   28915           0 : static PyObject *py_netr_LogonSamLogoff_out_get_return_authenticator(PyObject *obj, void *closure)
   28916             : {
   28917           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
   28918           0 :         PyObject *py_return_authenticator;
   28919           0 :         if (object->out.return_authenticator == NULL) {
   28920           0 :                 Py_RETURN_NONE;
   28921             :         }
   28922           0 :         if (object->out.return_authenticator == NULL) {
   28923           0 :                 py_return_authenticator = Py_None;
   28924           0 :                 Py_INCREF(py_return_authenticator);
   28925             :         } else {
   28926           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   28927             :         }
   28928           0 :         return py_return_authenticator;
   28929             : }
   28930             : 
   28931           0 : static int py_netr_LogonSamLogoff_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   28932             : {
   28933           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   28934           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   28935           0 :         if (value == NULL) {
   28936           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   28937           0 :                 return -1;
   28938             :         }
   28939           0 :         if (value == Py_None) {
   28940           0 :                 object->out.return_authenticator = NULL;
   28941             :         } else {
   28942           0 :                 object->out.return_authenticator = NULL;
   28943           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   28944           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28945           0 :                         PyErr_NoMemory();
   28946           0 :                         return -1;
   28947             :                 }
   28948           0 :                 object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   28949             :         }
   28950           0 :         return 0;
   28951             : }
   28952             : 
   28953           0 : static PyObject *py_netr_LogonSamLogoff_in_get_logon_level(PyObject *obj, void *closure)
   28954             : {
   28955           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
   28956           0 :         PyObject *py_logon_level;
   28957           0 :         py_logon_level = PyLong_FromLong((uint16_t)(object->in.logon_level));
   28958           0 :         return py_logon_level;
   28959             : }
   28960             : 
   28961           0 : static int py_netr_LogonSamLogoff_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   28962             : {
   28963           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   28964           0 :         if (value == NULL) {
   28965           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_level");
   28966           0 :                 return -1;
   28967             :         }
   28968             :         {
   28969           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   28970           0 :                 if (PyLong_Check(value)) {
   28971           0 :                         unsigned long long test_var;
   28972           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28973           0 :                         if (PyErr_Occurred() != NULL) {
   28974           0 :                                 return -1;
   28975             :                         }
   28976           0 :                         if (test_var > uint_max) {
   28977           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28978             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28979           0 :                                 return -1;
   28980             :                         }
   28981           0 :                         object->in.logon_level = test_var;
   28982             :                 } else {
   28983           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28984             :                           PyLong_Type.tp_name);
   28985           0 :                         return -1;
   28986             :                 }
   28987             :         }
   28988           0 :         return 0;
   28989             : }
   28990             : 
   28991           0 : static PyObject *py_netr_LogonSamLogoff_in_get_logon(PyObject *obj, void *closure)
   28992             : {
   28993           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
   28994           0 :         PyObject *py_logon;
   28995           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(obj), object->in.logon_level, &object->in.logon, "union netr_LogonLevel");
   28996           0 :         if (py_logon == NULL) {
   28997           0 :                 return NULL;
   28998             :         }
   28999           0 :         return py_logon;
   29000             : }
   29001             : 
   29002           0 : static int py_netr_LogonSamLogoff_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   29003             : {
   29004           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   29005           0 :         if (value == NULL) {
   29006           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon");
   29007           0 :                 return -1;
   29008             :         }
   29009             :         {
   29010           0 :                 union netr_LogonLevel *logon_switch_0;
   29011           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");
   29012           0 :                 if (logon_switch_0 == NULL) {
   29013           0 :                         return -1;
   29014             :                 }
   29015           0 :                 object->in.logon = *logon_switch_0;
   29016             :         }
   29017           0 :         return 0;
   29018             : }
   29019             : 
   29020           0 : static PyObject *py_netr_LogonSamLogoff_get_result(PyObject *obj, void *closure)
   29021             : {
   29022           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
   29023           0 :         PyObject *py_result;
   29024           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   29025           0 :         return py_result;
   29026             : }
   29027             : 
   29028           0 : static int py_netr_LogonSamLogoff_set_result(PyObject *py_obj, PyObject *value, void *closure)
   29029             : {
   29030           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   29031           0 :         if (value == NULL) {
   29032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   29033           0 :                 return -1;
   29034             :         }
   29035           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   29036           0 :         return 0;
   29037             : }
   29038             : 
   29039             : static PyGetSetDef py_netr_LogonSamLogoff_getsetters[] = {
   29040             :         {
   29041             :                 .name = discard_const_p(char, "in_server_name"),
   29042             :                 .get = py_netr_LogonSamLogoff_in_get_server_name,
   29043             :                 .set = py_netr_LogonSamLogoff_in_set_server_name,
   29044             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29045             :         },
   29046             :         {
   29047             :                 .name = discard_const_p(char, "in_computer_name"),
   29048             :                 .get = py_netr_LogonSamLogoff_in_get_computer_name,
   29049             :                 .set = py_netr_LogonSamLogoff_in_set_computer_name,
   29050             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29051             :         },
   29052             :         {
   29053             :                 .name = discard_const_p(char, "in_credential"),
   29054             :                 .get = py_netr_LogonSamLogoff_in_get_credential,
   29055             :                 .set = py_netr_LogonSamLogoff_in_set_credential,
   29056             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   29057             :         },
   29058             :         {
   29059             :                 .name = discard_const_p(char, "in_return_authenticator"),
   29060             :                 .get = py_netr_LogonSamLogoff_in_get_return_authenticator,
   29061             :                 .set = py_netr_LogonSamLogoff_in_set_return_authenticator,
   29062             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   29063             :         },
   29064             :         {
   29065             :                 .name = discard_const_p(char, "out_return_authenticator"),
   29066             :                 .get = py_netr_LogonSamLogoff_out_get_return_authenticator,
   29067             :                 .set = py_netr_LogonSamLogoff_out_set_return_authenticator,
   29068             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   29069             :         },
   29070             :         {
   29071             :                 .name = discard_const_p(char, "in_logon_level"),
   29072             :                 .get = py_netr_LogonSamLogoff_in_get_logon_level,
   29073             :                 .set = py_netr_LogonSamLogoff_in_set_logon_level,
   29074             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   29075             :         },
   29076             :         {
   29077             :                 .name = discard_const_p(char, "in_logon"),
   29078             :                 .get = py_netr_LogonSamLogoff_in_get_logon,
   29079             :                 .set = py_netr_LogonSamLogoff_in_set_logon,
   29080             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   29081             :         },
   29082             :         {
   29083             :                 .name = discard_const_p(char, "result"),
   29084             :                 .get = py_netr_LogonSamLogoff_get_result,
   29085             :                 .set = py_netr_LogonSamLogoff_set_result,
   29086             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   29087             :         },
   29088             :         { .name = NULL }
   29089             : };
   29090             : 
   29091           0 : static PyObject *py_netr_LogonSamLogoff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29092             : {
   29093           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogoff, type);
   29094           0 :         return self;
   29095             : }
   29096             : 
   29097           0 : static PyObject *py_netr_LogonSamLogoff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   29098             : {
   29099             : 
   29100             : 
   29101           0 :         return PyLong_FromLong(3);
   29102             : }
   29103             : 
   29104           0 : static PyObject *py_netr_LogonSamLogoff_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   29105             : {
   29106           0 :         const struct ndr_interface_call *call = NULL;
   29107           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   29108           0 :         PyObject *ret = NULL;
   29109           0 :         struct ndr_push *push = NULL;
   29110           0 :         DATA_BLOB blob;
   29111           0 :         enum ndr_err_code err;
   29112             : 
   29113           0 :         if (ndr_table_netlogon.num_calls < 4) {
   29114           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_pack");
   29115           0 :                 return NULL;
   29116             :         }
   29117           0 :         call = &ndr_table_netlogon.calls[3];
   29118             : 
   29119           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   29120           0 :         if (push == NULL) {
   29121           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29122           0 :                 return NULL;
   29123             :         }
   29124             : 
   29125           0 :         push->flags |= ndr_push_flags;
   29126             : 
   29127           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   29128           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29129           0 :                 TALLOC_FREE(push);
   29130           0 :                 PyErr_SetNdrError(err);
   29131           0 :                 return NULL;
   29132             :         }
   29133           0 :         blob = ndr_push_blob(push);
   29134           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   29135           0 :         TALLOC_FREE(push);
   29136           0 :         return ret;
   29137             : }
   29138             : 
   29139           0 : static PyObject *py_netr_LogonSamLogoff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29140             : {
   29141           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29142           0 :         PyObject *bigendian_obj = NULL;
   29143           0 :         PyObject *ndr64_obj = NULL;
   29144           0 :         libndr_flags ndr_push_flags = 0;
   29145             : 
   29146           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   29147             :                 discard_const_p(char *, kwnames),
   29148             :                 &bigendian_obj,
   29149             :                 &ndr64_obj)) {
   29150           0 :                 return NULL;
   29151             :         }
   29152             : 
   29153           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29154           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29155             :         }
   29156           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29157           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29158             :         }
   29159             : 
   29160           0 :         return py_netr_LogonSamLogoff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   29161             : }
   29162             : 
   29163           0 : static PyObject *py_netr_LogonSamLogoff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29164             : {
   29165           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29166           0 :         PyObject *bigendian_obj = NULL;
   29167           0 :         PyObject *ndr64_obj = NULL;
   29168           0 :         libndr_flags ndr_push_flags = 0;
   29169             : 
   29170           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   29171             :                 discard_const_p(char *, kwnames),
   29172             :                 &bigendian_obj,
   29173             :                 &ndr64_obj)) {
   29174           0 :                 return NULL;
   29175             :         }
   29176             : 
   29177           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29178           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29179             :         }
   29180           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29181           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29182             :         }
   29183             : 
   29184           0 :         return py_netr_LogonSamLogoff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   29185             : }
   29186             : 
   29187           0 : static PyObject *py_netr_LogonSamLogoff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   29188             : {
   29189           0 :         const struct ndr_interface_call *call = NULL;
   29190           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   29191           0 :         struct ndr_pull *pull = NULL;
   29192           0 :         enum ndr_err_code err;
   29193             : 
   29194           0 :         if (ndr_table_netlogon.num_calls < 4) {
   29195           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_unpack");
   29196           0 :                 return NULL;
   29197             :         }
   29198           0 :         call = &ndr_table_netlogon.calls[3];
   29199             : 
   29200           0 :         pull = ndr_pull_init_blob(blob, object);
   29201           0 :         if (pull == NULL) {
   29202           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29203           0 :                 return NULL;
   29204             :         }
   29205             : 
   29206           0 :         pull->flags |= ndr_pull_flags;
   29207             : 
   29208           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   29209           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29210           0 :                 TALLOC_FREE(pull);
   29211           0 :                 PyErr_SetNdrError(err);
   29212           0 :                 return NULL;
   29213             :         }
   29214           0 :         if (!allow_remaining) {
   29215           0 :                 uint32_t highest_ofs;
   29216             : 
   29217           0 :                 if (pull->offset > pull->relative_highest_offset) {
   29218           0 :                         highest_ofs = pull->offset;
   29219             :                 } else {
   29220           0 :                         highest_ofs = pull->relative_highest_offset;
   29221             :                 }
   29222           0 :                 if (highest_ofs < pull->data_size) {
   29223           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   29224             :                                 "not all bytes consumed ofs[%u] size[%u]",
   29225             :                                 highest_ofs, pull->data_size);
   29226           0 :                         TALLOC_FREE(pull);
   29227           0 :                         PyErr_SetNdrError(err);
   29228           0 :                         return NULL;
   29229             :                 }
   29230             :         }
   29231             : 
   29232           0 :         TALLOC_FREE(pull);
   29233           0 :         Py_RETURN_NONE;
   29234             : }
   29235             : 
   29236           0 : static PyObject *py_netr_LogonSamLogoff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29237             : {
   29238           0 :         DATA_BLOB blob;
   29239           0 :         Py_ssize_t blob_length = 0;
   29240           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   29241           0 :         PyObject *bigendian_obj = NULL;
   29242           0 :         PyObject *ndr64_obj = NULL;
   29243           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   29244           0 :         PyObject *allow_remaining_obj = NULL;
   29245           0 :         bool allow_remaining = false;
   29246             : 
   29247           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   29248             :                 discard_const_p(char *, kwnames),
   29249             :                 &blob.data, &blob_length,
   29250             :                 &bigendian_obj,
   29251             :                 &ndr64_obj,
   29252             :                 &allow_remaining_obj)) {
   29253           0 :                 return NULL;
   29254             :         }
   29255           0 :         blob.length = blob_length;
   29256             : 
   29257           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29258           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   29259             :         }
   29260           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29261           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   29262             :         }
   29263             : 
   29264           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   29265           0 :                 allow_remaining = true;
   29266             :         }
   29267             : 
   29268           0 :         return py_netr_LogonSamLogoff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   29269             : }
   29270             : 
   29271           0 : static PyObject *py_netr_LogonSamLogoff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29272             : {
   29273           0 :         DATA_BLOB blob;
   29274           0 :         Py_ssize_t blob_length = 0;
   29275           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   29276           0 :         PyObject *bigendian_obj = NULL;
   29277           0 :         PyObject *ndr64_obj = NULL;
   29278           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   29279           0 :         PyObject *allow_remaining_obj = NULL;
   29280           0 :         bool allow_remaining = false;
   29281             : 
   29282           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   29283             :                 discard_const_p(char *, kwnames),
   29284             :                 &blob.data, &blob_length,
   29285             :                 &bigendian_obj,
   29286             :                 &ndr64_obj,
   29287             :                 &allow_remaining_obj)) {
   29288           0 :                 return NULL;
   29289             :         }
   29290           0 :         blob.length = blob_length;
   29291             : 
   29292           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29293           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   29294             :         }
   29295           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29296           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   29297             :         }
   29298             : 
   29299           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   29300           0 :                 allow_remaining = true;
   29301             :         }
   29302             : 
   29303           0 :         return py_netr_LogonSamLogoff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   29304             : }
   29305             : 
   29306           0 : static PyObject *py_netr_LogonSamLogoff_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   29307             : {
   29308           0 :         const struct ndr_interface_call *call = NULL;
   29309           0 :         struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
   29310           0 :         PyObject *ret;
   29311           0 :         char *retstr;
   29312             : 
   29313           0 :         if (ndr_table_netlogon.num_calls < 4) {
   29314           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_print");
   29315           0 :                 return NULL;
   29316             :         }
   29317           0 :         call = &ndr_table_netlogon.calls[3];
   29318             : 
   29319           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   29320           0 :         ret = PyUnicode_FromString(retstr);
   29321           0 :         TALLOC_FREE(retstr);
   29322             : 
   29323           0 :         return ret;
   29324             : }
   29325             : 
   29326           0 : static PyObject *py_netr_LogonSamLogoff_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   29327             : {
   29328           0 :         return py_netr_LogonSamLogoff_ndr_print(py_obj, "netr_LogonSamLogoff_in", NDR_IN);
   29329             : }
   29330             : 
   29331           0 : static PyObject *py_netr_LogonSamLogoff_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   29332             : {
   29333           0 :         return py_netr_LogonSamLogoff_ndr_print(py_obj, "netr_LogonSamLogoff_out", NDR_OUT);
   29334             : }
   29335             : 
   29336             : static PyMethodDef py_netr_LogonSamLogoff_methods[] = {
   29337             :         { "opnum", (PyCFunction)py_netr_LogonSamLogoff_ndr_opnum, METH_NOARGS|METH_CLASS,
   29338             :                 "netlogon.netr_LogonSamLogoff.opnum() -> 3 (0x03) " },
   29339             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   29340             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   29341             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   29342             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   29343             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   29344             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   29345             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   29346             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   29347             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogoff_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   29348             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogoff_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   29349             :         { NULL, NULL, 0, NULL }
   29350             : };
   29351             : 
   29352             : 
   29353             : static PyTypeObject netr_LogonSamLogoff_Type = {
   29354             :         PyVarObject_HEAD_INIT(NULL, 0)
   29355             :         .tp_name = "netlogon.netr_LogonSamLogoff",
   29356             :         .tp_getset = py_netr_LogonSamLogoff_getsetters,
   29357             :         .tp_methods = py_netr_LogonSamLogoff_methods,
   29358             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29359             :         .tp_new = py_netr_LogonSamLogoff_new,
   29360             : };
   29361             : 
   29362           0 : static bool pack_py_netr_LogonSamLogoff_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogoff *r)
   29363             : {
   29364           0 :         PyObject *py_server_name;
   29365           0 :         PyObject *py_computer_name;
   29366           0 :         PyObject *py_credential;
   29367           0 :         PyObject *py_return_authenticator;
   29368           0 :         PyObject *py_logon_level;
   29369           0 :         PyObject *py_logon;
   29370           0 :         const char *kwnames[] = {
   29371             :                 "server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", NULL
   29372             :         };
   29373             : 
   29374           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)) {
   29375           0 :                 return false;
   29376             :         }
   29377             : 
   29378           0 :         if (py_server_name == NULL) {
   29379           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   29380           0 :                 return false;
   29381             :         }
   29382           0 :         if (py_server_name == Py_None) {
   29383           0 :                 r->in.server_name = NULL;
   29384             :         } else {
   29385           0 :                 r->in.server_name = NULL;
   29386             :                 {
   29387           0 :                         const char *test_str;
   29388           0 :                         const char *talloc_str;
   29389           0 :                         PyObject *unicode = NULL;
   29390           0 :                         if (PyUnicode_Check(py_server_name)) {
   29391           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   29392           0 :                                 if (unicode == NULL) {
   29393           0 :                                         return false;
   29394             :                                 }
   29395           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29396           0 :                         } else if (PyBytes_Check(py_server_name)) {
   29397           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   29398             :                         } else {
   29399           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   29400           0 :                                 return false;
   29401             :                         }
   29402           0 :                         talloc_str = talloc_strdup(r, test_str);
   29403           0 :                         if (unicode != NULL) {
   29404           0 :                                 Py_DECREF(unicode);
   29405             :                         }
   29406           0 :                         if (talloc_str == NULL) {
   29407           0 :                                 PyErr_NoMemory();
   29408           0 :                                 return false;
   29409             :                         }
   29410           0 :                         r->in.server_name = talloc_str;
   29411             :                 }
   29412             :         }
   29413           0 :         if (py_computer_name == NULL) {
   29414           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   29415           0 :                 return false;
   29416             :         }
   29417           0 :         if (py_computer_name == Py_None) {
   29418           0 :                 r->in.computer_name = NULL;
   29419             :         } else {
   29420           0 :                 r->in.computer_name = NULL;
   29421             :                 {
   29422           0 :                         const char *test_str;
   29423           0 :                         const char *talloc_str;
   29424           0 :                         PyObject *unicode = NULL;
   29425           0 :                         if (PyUnicode_Check(py_computer_name)) {
   29426           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   29427           0 :                                 if (unicode == NULL) {
   29428           0 :                                         return false;
   29429             :                                 }
   29430           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29431           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   29432           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   29433             :                         } else {
   29434           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   29435           0 :                                 return false;
   29436             :                         }
   29437           0 :                         talloc_str = talloc_strdup(r, test_str);
   29438           0 :                         if (unicode != NULL) {
   29439           0 :                                 Py_DECREF(unicode);
   29440             :                         }
   29441           0 :                         if (talloc_str == NULL) {
   29442           0 :                                 PyErr_NoMemory();
   29443           0 :                                 return false;
   29444             :                         }
   29445           0 :                         r->in.computer_name = talloc_str;
   29446             :                 }
   29447             :         }
   29448           0 :         if (py_credential == NULL) {
   29449           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   29450           0 :                 return false;
   29451             :         }
   29452           0 :         if (py_credential == Py_None) {
   29453           0 :                 r->in.credential = NULL;
   29454             :         } else {
   29455           0 :                 r->in.credential = NULL;
   29456           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   29457           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   29458           0 :                         PyErr_NoMemory();
   29459           0 :                         return false;
   29460             :                 }
   29461           0 :                 r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   29462             :         }
   29463           0 :         if (py_return_authenticator == NULL) {
   29464           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   29465           0 :                 return false;
   29466             :         }
   29467           0 :         if (py_return_authenticator == Py_None) {
   29468           0 :                 r->in.return_authenticator = NULL;
   29469             :         } else {
   29470           0 :                 r->in.return_authenticator = NULL;
   29471           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   29472           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   29473           0 :                         PyErr_NoMemory();
   29474           0 :                         return false;
   29475             :                 }
   29476           0 :                 r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   29477             :         }
   29478           0 :         if (py_logon_level == NULL) {
   29479           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_level");
   29480           0 :                 return false;
   29481             :         }
   29482             :         {
   29483           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   29484           0 :                 if (PyLong_Check(py_logon_level)) {
   29485           0 :                         unsigned long long test_var;
   29486           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   29487           0 :                         if (PyErr_Occurred() != NULL) {
   29488           0 :                                 return false;
   29489             :                         }
   29490           0 :                         if (test_var > uint_max) {
   29491           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29492             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29493           0 :                                 return false;
   29494             :                         }
   29495           0 :                         r->in.logon_level = test_var;
   29496             :                 } else {
   29497           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29498             :                           PyLong_Type.tp_name);
   29499           0 :                         return false;
   29500             :                 }
   29501             :         }
   29502           0 :         if (py_logon == NULL) {
   29503           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon");
   29504           0 :                 return false;
   29505             :         }
   29506             :         {
   29507           0 :                 union netr_LogonLevel *logon_switch_0;
   29508           0 :                 logon_switch_0 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   29509           0 :                 if (logon_switch_0 == NULL) {
   29510           0 :                         return false;
   29511             :                 }
   29512           0 :                 r->in.logon = *logon_switch_0;
   29513             :         }
   29514           0 :         return true;
   29515             : }
   29516             : 
   29517           0 : static PyObject *unpack_py_netr_LogonSamLogoff_args_out(struct netr_LogonSamLogoff *r)
   29518             : {
   29519           0 :         PyObject *result;
   29520           0 :         PyObject *py_return_authenticator;
   29521           0 :         if (r->out.return_authenticator == NULL) {
   29522           0 :                 py_return_authenticator = Py_None;
   29523           0 :                 Py_INCREF(py_return_authenticator);
   29524             :         } else {
   29525           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   29526             :         }
   29527           0 :         result = py_return_authenticator;
   29528           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   29529           0 :                 PyErr_SetNTSTATUS(r->out.result);
   29530           0 :                 return NULL;
   29531             :         }
   29532             : 
   29533           0 :         return result;
   29534             : }
   29535             : 
   29536             : 
   29537           0 : static PyObject *py_netr_ServerReqChallenge_in_get_server_name(PyObject *obj, void *closure)
   29538             : {
   29539           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
   29540           0 :         PyObject *py_server_name;
   29541           0 :         if (object->in.server_name == NULL) {
   29542           0 :                 Py_RETURN_NONE;
   29543             :         }
   29544           0 :         if (object->in.server_name == NULL) {
   29545           0 :                 py_server_name = Py_None;
   29546           0 :                 Py_INCREF(py_server_name);
   29547             :         } else {
   29548           0 :                 if (object->in.server_name == NULL) {
   29549           0 :                         py_server_name = Py_None;
   29550           0 :                         Py_INCREF(py_server_name);
   29551             :                 } else {
   29552           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   29553             :                 }
   29554             :         }
   29555           0 :         return py_server_name;
   29556             : }
   29557             : 
   29558           0 : static int py_netr_ServerReqChallenge_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   29559             : {
   29560           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
   29561           0 :         if (value == NULL) {
   29562           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   29563           0 :                 return -1;
   29564             :         }
   29565           0 :         if (value == Py_None) {
   29566           0 :                 object->in.server_name = NULL;
   29567             :         } else {
   29568           0 :                 object->in.server_name = NULL;
   29569             :                 {
   29570           0 :                         const char *test_str;
   29571           0 :                         const char *talloc_str;
   29572           0 :                         PyObject *unicode = NULL;
   29573           0 :                         if (PyUnicode_Check(value)) {
   29574           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29575           0 :                                 if (unicode == NULL) {
   29576           0 :                                         return -1;
   29577             :                                 }
   29578           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29579           0 :                         } else if (PyBytes_Check(value)) {
   29580           0 :                                 test_str = PyBytes_AS_STRING(value);
   29581             :                         } else {
   29582           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29583           0 :                                 return -1;
   29584             :                         }
   29585           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29586           0 :                         if (unicode != NULL) {
   29587           0 :                                 Py_DECREF(unicode);
   29588             :                         }
   29589           0 :                         if (talloc_str == NULL) {
   29590           0 :                                 PyErr_NoMemory();
   29591           0 :                                 return -1;
   29592             :                         }
   29593           0 :                         object->in.server_name = talloc_str;
   29594             :                 }
   29595             :         }
   29596           0 :         return 0;
   29597             : }
   29598             : 
   29599           0 : static PyObject *py_netr_ServerReqChallenge_in_get_computer_name(PyObject *obj, void *closure)
   29600             : {
   29601           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
   29602           0 :         PyObject *py_computer_name;
   29603           0 :         if (object->in.computer_name == NULL) {
   29604           0 :                 Py_RETURN_NONE;
   29605             :         }
   29606           0 :         if (object->in.computer_name == NULL) {
   29607           0 :                 py_computer_name = Py_None;
   29608           0 :                 Py_INCREF(py_computer_name);
   29609             :         } else {
   29610           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   29611             :         }
   29612           0 :         return py_computer_name;
   29613             : }
   29614             : 
   29615           0 : static int py_netr_ServerReqChallenge_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   29616             : {
   29617           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
   29618           0 :         if (value == NULL) {
   29619           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   29620           0 :                 return -1;
   29621             :         }
   29622           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   29623           0 :         if (object->in.computer_name == NULL) {
   29624           0 :                 PyErr_NoMemory();
   29625           0 :                 return -1;
   29626             :         }
   29627             :         {
   29628           0 :                 const char *test_str;
   29629           0 :                 const char *talloc_str;
   29630           0 :                 PyObject *unicode = NULL;
   29631           0 :                 if (PyUnicode_Check(value)) {
   29632           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29633           0 :                         if (unicode == NULL) {
   29634           0 :                                 return -1;
   29635             :                         }
   29636           0 :                         test_str = PyBytes_AS_STRING(unicode);
   29637           0 :                 } else if (PyBytes_Check(value)) {
   29638           0 :                         test_str = PyBytes_AS_STRING(value);
   29639             :                 } else {
   29640           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29641           0 :                         return -1;
   29642             :                 }
   29643           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29644           0 :                 if (unicode != NULL) {
   29645           0 :                         Py_DECREF(unicode);
   29646             :                 }
   29647           0 :                 if (talloc_str == NULL) {
   29648           0 :                         PyErr_NoMemory();
   29649           0 :                         return -1;
   29650             :                 }
   29651           0 :                 object->in.computer_name = talloc_str;
   29652             :         }
   29653           0 :         return 0;
   29654             : }
   29655             : 
   29656           0 : static PyObject *py_netr_ServerReqChallenge_in_get_credentials(PyObject *obj, void *closure)
   29657             : {
   29658           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
   29659           0 :         PyObject *py_credentials;
   29660           0 :         if (object->in.credentials == NULL) {
   29661           0 :                 Py_RETURN_NONE;
   29662             :         }
   29663           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   29664           0 :         return py_credentials;
   29665             : }
   29666             : 
   29667           0 : static int py_netr_ServerReqChallenge_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   29668             : {
   29669           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
   29670           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   29671           0 :         if (value == NULL) {
   29672           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credentials");
   29673           0 :                 return -1;
   29674             :         }
   29675           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   29676           0 :         if (object->in.credentials == NULL) {
   29677           0 :                 PyErr_NoMemory();
   29678           0 :                 return -1;
   29679             :         }
   29680           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   29681           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29682           0 :                 PyErr_NoMemory();
   29683           0 :                 return -1;
   29684             :         }
   29685           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   29686           0 :         return 0;
   29687             : }
   29688             : 
   29689           0 : static PyObject *py_netr_ServerReqChallenge_out_get_return_credentials(PyObject *obj, void *closure)
   29690             : {
   29691           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
   29692           0 :         PyObject *py_return_credentials;
   29693           0 :         if (object->out.return_credentials == NULL) {
   29694           0 :                 Py_RETURN_NONE;
   29695             :         }
   29696           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   29697           0 :         return py_return_credentials;
   29698             : }
   29699             : 
   29700           0 : static int py_netr_ServerReqChallenge_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   29701             : {
   29702           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
   29703           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   29704           0 :         if (value == NULL) {
   29705           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_credentials");
   29706           0 :                 return -1;
   29707             :         }
   29708           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   29709           0 :         if (object->out.return_credentials == NULL) {
   29710           0 :                 PyErr_NoMemory();
   29711           0 :                 return -1;
   29712             :         }
   29713           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   29714           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29715           0 :                 PyErr_NoMemory();
   29716           0 :                 return -1;
   29717             :         }
   29718           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   29719           0 :         return 0;
   29720             : }
   29721             : 
   29722           0 : static PyObject *py_netr_ServerReqChallenge_get_result(PyObject *obj, void *closure)
   29723             : {
   29724           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
   29725           0 :         PyObject *py_result;
   29726           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   29727           0 :         return py_result;
   29728             : }
   29729             : 
   29730           0 : static int py_netr_ServerReqChallenge_set_result(PyObject *py_obj, PyObject *value, void *closure)
   29731             : {
   29732           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
   29733           0 :         if (value == NULL) {
   29734           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   29735           0 :                 return -1;
   29736             :         }
   29737           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   29738           0 :         return 0;
   29739             : }
   29740             : 
   29741             : static PyGetSetDef py_netr_ServerReqChallenge_getsetters[] = {
   29742             :         {
   29743             :                 .name = discard_const_p(char, "in_server_name"),
   29744             :                 .get = py_netr_ServerReqChallenge_in_get_server_name,
   29745             :                 .set = py_netr_ServerReqChallenge_in_set_server_name,
   29746             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29747             :         },
   29748             :         {
   29749             :                 .name = discard_const_p(char, "in_computer_name"),
   29750             :                 .get = py_netr_ServerReqChallenge_in_get_computer_name,
   29751             :                 .set = py_netr_ServerReqChallenge_in_set_computer_name,
   29752             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29753             :         },
   29754             :         {
   29755             :                 .name = discard_const_p(char, "in_credentials"),
   29756             :                 .get = py_netr_ServerReqChallenge_in_get_credentials,
   29757             :                 .set = py_netr_ServerReqChallenge_in_set_credentials,
   29758             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   29759             :         },
   29760             :         {
   29761             :                 .name = discard_const_p(char, "out_return_credentials"),
   29762             :                 .get = py_netr_ServerReqChallenge_out_get_return_credentials,
   29763             :                 .set = py_netr_ServerReqChallenge_out_set_return_credentials,
   29764             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   29765             :         },
   29766             :         {
   29767             :                 .name = discard_const_p(char, "result"),
   29768             :                 .get = py_netr_ServerReqChallenge_get_result,
   29769             :                 .set = py_netr_ServerReqChallenge_set_result,
   29770             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   29771             :         },
   29772             :         { .name = NULL }
   29773             : };
   29774             : 
   29775           0 : static PyObject *py_netr_ServerReqChallenge_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29776             : {
   29777           0 :         PyObject *self = pytalloc_new(struct netr_ServerReqChallenge, type);
   29778           0 :         struct netr_ServerReqChallenge *_self = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(self);
   29779           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   29780           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   29781           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   29782           0 :         return self;
   29783             : }
   29784             : 
   29785           0 : static PyObject *py_netr_ServerReqChallenge_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   29786             : {
   29787             : 
   29788             : 
   29789           0 :         return PyLong_FromLong(4);
   29790             : }
   29791             : 
   29792           0 : static PyObject *py_netr_ServerReqChallenge_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   29793             : {
   29794           0 :         const struct ndr_interface_call *call = NULL;
   29795           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
   29796           0 :         PyObject *ret = NULL;
   29797           0 :         struct ndr_push *push = NULL;
   29798           0 :         DATA_BLOB blob;
   29799           0 :         enum ndr_err_code err;
   29800             : 
   29801           0 :         if (ndr_table_netlogon.num_calls < 5) {
   29802           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_pack");
   29803           0 :                 return NULL;
   29804             :         }
   29805           0 :         call = &ndr_table_netlogon.calls[4];
   29806             : 
   29807           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   29808           0 :         if (push == NULL) {
   29809           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29810           0 :                 return NULL;
   29811             :         }
   29812             : 
   29813           0 :         push->flags |= ndr_push_flags;
   29814             : 
   29815           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   29816           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29817           0 :                 TALLOC_FREE(push);
   29818           0 :                 PyErr_SetNdrError(err);
   29819           0 :                 return NULL;
   29820             :         }
   29821           0 :         blob = ndr_push_blob(push);
   29822           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   29823           0 :         TALLOC_FREE(push);
   29824           0 :         return ret;
   29825             : }
   29826             : 
   29827           0 : static PyObject *py_netr_ServerReqChallenge_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29828             : {
   29829           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29830           0 :         PyObject *bigendian_obj = NULL;
   29831           0 :         PyObject *ndr64_obj = NULL;
   29832           0 :         libndr_flags ndr_push_flags = 0;
   29833             : 
   29834           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   29835             :                 discard_const_p(char *, kwnames),
   29836             :                 &bigendian_obj,
   29837             :                 &ndr64_obj)) {
   29838           0 :                 return NULL;
   29839             :         }
   29840             : 
   29841           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29842           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29843             :         }
   29844           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29845           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29846             :         }
   29847             : 
   29848           0 :         return py_netr_ServerReqChallenge_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   29849             : }
   29850             : 
   29851           0 : static PyObject *py_netr_ServerReqChallenge_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29852             : {
   29853           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29854           0 :         PyObject *bigendian_obj = NULL;
   29855           0 :         PyObject *ndr64_obj = NULL;
   29856           0 :         libndr_flags ndr_push_flags = 0;
   29857             : 
   29858           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   29859             :                 discard_const_p(char *, kwnames),
   29860             :                 &bigendian_obj,
   29861             :                 &ndr64_obj)) {
   29862           0 :                 return NULL;
   29863             :         }
   29864             : 
   29865           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29866           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29867             :         }
   29868           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29869           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29870             :         }
   29871             : 
   29872           0 :         return py_netr_ServerReqChallenge_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   29873             : }
   29874             : 
   29875           0 : static PyObject *py_netr_ServerReqChallenge_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   29876             : {
   29877           0 :         const struct ndr_interface_call *call = NULL;
   29878           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
   29879           0 :         struct ndr_pull *pull = NULL;
   29880           0 :         enum ndr_err_code err;
   29881             : 
   29882           0 :         if (ndr_table_netlogon.num_calls < 5) {
   29883           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_unpack");
   29884           0 :                 return NULL;
   29885             :         }
   29886           0 :         call = &ndr_table_netlogon.calls[4];
   29887             : 
   29888           0 :         pull = ndr_pull_init_blob(blob, object);
   29889           0 :         if (pull == NULL) {
   29890           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29891           0 :                 return NULL;
   29892             :         }
   29893             : 
   29894           0 :         pull->flags |= ndr_pull_flags;
   29895             : 
   29896           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   29897           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29898           0 :                 TALLOC_FREE(pull);
   29899           0 :                 PyErr_SetNdrError(err);
   29900           0 :                 return NULL;
   29901             :         }
   29902           0 :         if (!allow_remaining) {
   29903           0 :                 uint32_t highest_ofs;
   29904             : 
   29905           0 :                 if (pull->offset > pull->relative_highest_offset) {
   29906           0 :                         highest_ofs = pull->offset;
   29907             :                 } else {
   29908           0 :                         highest_ofs = pull->relative_highest_offset;
   29909             :                 }
   29910           0 :                 if (highest_ofs < pull->data_size) {
   29911           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   29912             :                                 "not all bytes consumed ofs[%u] size[%u]",
   29913             :                                 highest_ofs, pull->data_size);
   29914           0 :                         TALLOC_FREE(pull);
   29915           0 :                         PyErr_SetNdrError(err);
   29916           0 :                         return NULL;
   29917             :                 }
   29918             :         }
   29919             : 
   29920           0 :         TALLOC_FREE(pull);
   29921           0 :         Py_RETURN_NONE;
   29922             : }
   29923             : 
   29924           0 : static PyObject *py_netr_ServerReqChallenge_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29925             : {
   29926           0 :         DATA_BLOB blob;
   29927           0 :         Py_ssize_t blob_length = 0;
   29928           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   29929           0 :         PyObject *bigendian_obj = NULL;
   29930           0 :         PyObject *ndr64_obj = NULL;
   29931           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   29932           0 :         PyObject *allow_remaining_obj = NULL;
   29933           0 :         bool allow_remaining = false;
   29934             : 
   29935           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   29936             :                 discard_const_p(char *, kwnames),
   29937             :                 &blob.data, &blob_length,
   29938             :                 &bigendian_obj,
   29939             :                 &ndr64_obj,
   29940             :                 &allow_remaining_obj)) {
   29941           0 :                 return NULL;
   29942             :         }
   29943           0 :         blob.length = blob_length;
   29944             : 
   29945           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29946           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   29947             :         }
   29948           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29949           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   29950             :         }
   29951             : 
   29952           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   29953           0 :                 allow_remaining = true;
   29954             :         }
   29955             : 
   29956           0 :         return py_netr_ServerReqChallenge_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   29957             : }
   29958             : 
   29959           0 : static PyObject *py_netr_ServerReqChallenge_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29960             : {
   29961           0 :         DATA_BLOB blob;
   29962           0 :         Py_ssize_t blob_length = 0;
   29963           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   29964           0 :         PyObject *bigendian_obj = NULL;
   29965           0 :         PyObject *ndr64_obj = NULL;
   29966           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   29967           0 :         PyObject *allow_remaining_obj = NULL;
   29968           0 :         bool allow_remaining = false;
   29969             : 
   29970           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   29971             :                 discard_const_p(char *, kwnames),
   29972             :                 &blob.data, &blob_length,
   29973             :                 &bigendian_obj,
   29974             :                 &ndr64_obj,
   29975             :                 &allow_remaining_obj)) {
   29976           0 :                 return NULL;
   29977             :         }
   29978           0 :         blob.length = blob_length;
   29979             : 
   29980           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29981           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   29982             :         }
   29983           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29984           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   29985             :         }
   29986             : 
   29987           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   29988           0 :                 allow_remaining = true;
   29989             :         }
   29990             : 
   29991           0 :         return py_netr_ServerReqChallenge_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   29992             : }
   29993             : 
   29994           0 : static PyObject *py_netr_ServerReqChallenge_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   29995             : {
   29996           0 :         const struct ndr_interface_call *call = NULL;
   29997           0 :         struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
   29998           0 :         PyObject *ret;
   29999           0 :         char *retstr;
   30000             : 
   30001           0 :         if (ndr_table_netlogon.num_calls < 5) {
   30002           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_print");
   30003           0 :                 return NULL;
   30004             :         }
   30005           0 :         call = &ndr_table_netlogon.calls[4];
   30006             : 
   30007           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   30008           0 :         ret = PyUnicode_FromString(retstr);
   30009           0 :         TALLOC_FREE(retstr);
   30010             : 
   30011           0 :         return ret;
   30012             : }
   30013             : 
   30014           0 : static PyObject *py_netr_ServerReqChallenge_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30015             : {
   30016           0 :         return py_netr_ServerReqChallenge_ndr_print(py_obj, "netr_ServerReqChallenge_in", NDR_IN);
   30017             : }
   30018             : 
   30019           0 : static PyObject *py_netr_ServerReqChallenge_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30020             : {
   30021           0 :         return py_netr_ServerReqChallenge_ndr_print(py_obj, "netr_ServerReqChallenge_out", NDR_OUT);
   30022             : }
   30023             : 
   30024             : static PyMethodDef py_netr_ServerReqChallenge_methods[] = {
   30025             :         { "opnum", (PyCFunction)py_netr_ServerReqChallenge_ndr_opnum, METH_NOARGS|METH_CLASS,
   30026             :                 "netlogon.netr_ServerReqChallenge.opnum() -> 4 (0x04) " },
   30027             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   30028             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   30029             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   30030             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   30031             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   30032             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   30033             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   30034             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   30035             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerReqChallenge_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   30036             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerReqChallenge_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   30037             :         { NULL, NULL, 0, NULL }
   30038             : };
   30039             : 
   30040             : 
   30041             : static PyTypeObject netr_ServerReqChallenge_Type = {
   30042             :         PyVarObject_HEAD_INIT(NULL, 0)
   30043             :         .tp_name = "netlogon.netr_ServerReqChallenge",
   30044             :         .tp_getset = py_netr_ServerReqChallenge_getsetters,
   30045             :         .tp_methods = py_netr_ServerReqChallenge_methods,
   30046             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30047             :         .tp_new = py_netr_ServerReqChallenge_new,
   30048             : };
   30049             : 
   30050           4 : static bool pack_py_netr_ServerReqChallenge_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerReqChallenge *r)
   30051             : {
   30052           0 :         PyObject *py_server_name;
   30053           0 :         PyObject *py_computer_name;
   30054           0 :         PyObject *py_credentials;
   30055           4 :         const char *kwnames[] = {
   30056             :                 "server_name", "computer_name", "credentials", NULL
   30057             :         };
   30058             : 
   30059           4 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_ServerReqChallenge", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credentials)) {
   30060           0 :                 return false;
   30061             :         }
   30062             : 
   30063           4 :         if (py_server_name == NULL) {
   30064           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   30065           0 :                 return false;
   30066             :         }
   30067           4 :         if (py_server_name == Py_None) {
   30068           0 :                 r->in.server_name = NULL;
   30069             :         } else {
   30070           4 :                 r->in.server_name = NULL;
   30071             :                 {
   30072           0 :                         const char *test_str;
   30073           0 :                         const char *talloc_str;
   30074           4 :                         PyObject *unicode = NULL;
   30075           4 :                         if (PyUnicode_Check(py_server_name)) {
   30076           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   30077           4 :                                 if (unicode == NULL) {
   30078           0 :                                         return false;
   30079             :                                 }
   30080           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   30081           0 :                         } else if (PyBytes_Check(py_server_name)) {
   30082           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   30083             :                         } else {
   30084           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   30085           0 :                                 return false;
   30086             :                         }
   30087           4 :                         talloc_str = talloc_strdup(r, test_str);
   30088           4 :                         if (unicode != NULL) {
   30089           4 :                                 Py_DECREF(unicode);
   30090             :                         }
   30091           4 :                         if (talloc_str == NULL) {
   30092           0 :                                 PyErr_NoMemory();
   30093           0 :                                 return false;
   30094             :                         }
   30095           4 :                         r->in.server_name = talloc_str;
   30096             :                 }
   30097             :         }
   30098           4 :         if (py_computer_name == NULL) {
   30099           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   30100           0 :                 return false;
   30101             :         }
   30102           4 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   30103           4 :         if (r->in.computer_name == NULL) {
   30104           0 :                 PyErr_NoMemory();
   30105           0 :                 return false;
   30106             :         }
   30107             :         {
   30108           0 :                 const char *test_str;
   30109           0 :                 const char *talloc_str;
   30110           4 :                 PyObject *unicode = NULL;
   30111           4 :                 if (PyUnicode_Check(py_computer_name)) {
   30112           4 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   30113           4 :                         if (unicode == NULL) {
   30114           0 :                                 return false;
   30115             :                         }
   30116           4 :                         test_str = PyBytes_AS_STRING(unicode);
   30117           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   30118           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   30119             :                 } else {
   30120           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   30121           0 :                         return false;
   30122             :                 }
   30123           4 :                 talloc_str = talloc_strdup(r, test_str);
   30124           4 :                 if (unicode != NULL) {
   30125           4 :                         Py_DECREF(unicode);
   30126             :                 }
   30127           4 :                 if (talloc_str == NULL) {
   30128           0 :                         PyErr_NoMemory();
   30129           0 :                         return false;
   30130             :                 }
   30131           4 :                 r->in.computer_name = talloc_str;
   30132             :         }
   30133           4 :         if (py_credentials == NULL) {
   30134           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credentials");
   30135           0 :                 return false;
   30136             :         }
   30137           4 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   30138           4 :         if (r->in.credentials == NULL) {
   30139           0 :                 PyErr_NoMemory();
   30140           0 :                 return false;
   30141             :         }
   30142           4 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   30143           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   30144           0 :                 PyErr_NoMemory();
   30145           0 :                 return false;
   30146             :         }
   30147           4 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   30148           4 :         return true;
   30149             : }
   30150             : 
   30151           4 : static PyObject *unpack_py_netr_ServerReqChallenge_args_out(struct netr_ServerReqChallenge *r)
   30152             : {
   30153           0 :         PyObject *result;
   30154           0 :         PyObject *py_return_credentials;
   30155           4 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   30156           4 :         result = py_return_credentials;
   30157           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   30158           0 :                 PyErr_SetNTSTATUS(r->out.result);
   30159           0 :                 return NULL;
   30160             :         }
   30161             : 
   30162           4 :         return result;
   30163             : }
   30164             : 
   30165             : 
   30166           0 : static PyObject *py_netr_ServerAuthenticate_in_get_server_name(PyObject *obj, void *closure)
   30167             : {
   30168           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
   30169           0 :         PyObject *py_server_name;
   30170           0 :         if (object->in.server_name == NULL) {
   30171           0 :                 Py_RETURN_NONE;
   30172             :         }
   30173           0 :         if (object->in.server_name == NULL) {
   30174           0 :                 py_server_name = Py_None;
   30175           0 :                 Py_INCREF(py_server_name);
   30176             :         } else {
   30177           0 :                 if (object->in.server_name == NULL) {
   30178           0 :                         py_server_name = Py_None;
   30179           0 :                         Py_INCREF(py_server_name);
   30180             :                 } else {
   30181           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   30182             :                 }
   30183             :         }
   30184           0 :         return py_server_name;
   30185             : }
   30186             : 
   30187           0 : static int py_netr_ServerAuthenticate_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   30188             : {
   30189           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30190           0 :         if (value == NULL) {
   30191           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   30192           0 :                 return -1;
   30193             :         }
   30194           0 :         if (value == Py_None) {
   30195           0 :                 object->in.server_name = NULL;
   30196             :         } else {
   30197           0 :                 object->in.server_name = NULL;
   30198             :                 {
   30199           0 :                         const char *test_str;
   30200           0 :                         const char *talloc_str;
   30201           0 :                         PyObject *unicode = NULL;
   30202           0 :                         if (PyUnicode_Check(value)) {
   30203           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30204           0 :                                 if (unicode == NULL) {
   30205           0 :                                         return -1;
   30206             :                                 }
   30207           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30208           0 :                         } else if (PyBytes_Check(value)) {
   30209           0 :                                 test_str = PyBytes_AS_STRING(value);
   30210             :                         } else {
   30211           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30212           0 :                                 return -1;
   30213             :                         }
   30214           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30215           0 :                         if (unicode != NULL) {
   30216           0 :                                 Py_DECREF(unicode);
   30217             :                         }
   30218           0 :                         if (talloc_str == NULL) {
   30219           0 :                                 PyErr_NoMemory();
   30220           0 :                                 return -1;
   30221             :                         }
   30222           0 :                         object->in.server_name = talloc_str;
   30223             :                 }
   30224             :         }
   30225           0 :         return 0;
   30226             : }
   30227             : 
   30228           0 : static PyObject *py_netr_ServerAuthenticate_in_get_account_name(PyObject *obj, void *closure)
   30229             : {
   30230           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
   30231           0 :         PyObject *py_account_name;
   30232           0 :         if (object->in.account_name == NULL) {
   30233           0 :                 Py_RETURN_NONE;
   30234             :         }
   30235           0 :         if (object->in.account_name == NULL) {
   30236           0 :                 py_account_name = Py_None;
   30237           0 :                 Py_INCREF(py_account_name);
   30238             :         } else {
   30239           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   30240             :         }
   30241           0 :         return py_account_name;
   30242             : }
   30243             : 
   30244           0 : static int py_netr_ServerAuthenticate_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   30245             : {
   30246           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30247           0 :         if (value == NULL) {
   30248           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   30249           0 :                 return -1;
   30250             :         }
   30251           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   30252           0 :         if (object->in.account_name == NULL) {
   30253           0 :                 PyErr_NoMemory();
   30254           0 :                 return -1;
   30255             :         }
   30256             :         {
   30257           0 :                 const char *test_str;
   30258           0 :                 const char *talloc_str;
   30259           0 :                 PyObject *unicode = NULL;
   30260           0 :                 if (PyUnicode_Check(value)) {
   30261           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30262           0 :                         if (unicode == NULL) {
   30263           0 :                                 return -1;
   30264             :                         }
   30265           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30266           0 :                 } else if (PyBytes_Check(value)) {
   30267           0 :                         test_str = PyBytes_AS_STRING(value);
   30268             :                 } else {
   30269           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30270           0 :                         return -1;
   30271             :                 }
   30272           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30273           0 :                 if (unicode != NULL) {
   30274           0 :                         Py_DECREF(unicode);
   30275             :                 }
   30276           0 :                 if (talloc_str == NULL) {
   30277           0 :                         PyErr_NoMemory();
   30278           0 :                         return -1;
   30279             :                 }
   30280           0 :                 object->in.account_name = talloc_str;
   30281             :         }
   30282           0 :         return 0;
   30283             : }
   30284             : 
   30285           0 : static PyObject *py_netr_ServerAuthenticate_in_get_secure_channel_type(PyObject *obj, void *closure)
   30286             : {
   30287           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
   30288           0 :         PyObject *py_secure_channel_type;
   30289           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
   30290           0 :         return py_secure_channel_type;
   30291             : }
   30292             : 
   30293           0 : static int py_netr_ServerAuthenticate_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   30294             : {
   30295           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30296           0 :         if (value == NULL) {
   30297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
   30298           0 :                 return -1;
   30299             :         }
   30300             :         {
   30301           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   30302           0 :                 if (PyLong_Check(value)) {
   30303           0 :                         unsigned long long test_var;
   30304           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30305           0 :                         if (PyErr_Occurred() != NULL) {
   30306           0 :                                 return -1;
   30307             :                         }
   30308           0 :                         if (test_var > uint_max) {
   30309           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30310             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30311           0 :                                 return -1;
   30312             :                         }
   30313           0 :                         object->in.secure_channel_type = test_var;
   30314             :                 } else {
   30315           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30316             :                           PyLong_Type.tp_name);
   30317           0 :                         return -1;
   30318             :                 }
   30319             :         }
   30320           0 :         return 0;
   30321             : }
   30322             : 
   30323           0 : static PyObject *py_netr_ServerAuthenticate_in_get_computer_name(PyObject *obj, void *closure)
   30324             : {
   30325           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
   30326           0 :         PyObject *py_computer_name;
   30327           0 :         if (object->in.computer_name == NULL) {
   30328           0 :                 Py_RETURN_NONE;
   30329             :         }
   30330           0 :         if (object->in.computer_name == NULL) {
   30331           0 :                 py_computer_name = Py_None;
   30332           0 :                 Py_INCREF(py_computer_name);
   30333             :         } else {
   30334           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   30335             :         }
   30336           0 :         return py_computer_name;
   30337             : }
   30338             : 
   30339           0 : static int py_netr_ServerAuthenticate_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   30340             : {
   30341           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30342           0 :         if (value == NULL) {
   30343           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   30344           0 :                 return -1;
   30345             :         }
   30346           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   30347           0 :         if (object->in.computer_name == NULL) {
   30348           0 :                 PyErr_NoMemory();
   30349           0 :                 return -1;
   30350             :         }
   30351             :         {
   30352           0 :                 const char *test_str;
   30353           0 :                 const char *talloc_str;
   30354           0 :                 PyObject *unicode = NULL;
   30355           0 :                 if (PyUnicode_Check(value)) {
   30356           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30357           0 :                         if (unicode == NULL) {
   30358           0 :                                 return -1;
   30359             :                         }
   30360           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30361           0 :                 } else if (PyBytes_Check(value)) {
   30362           0 :                         test_str = PyBytes_AS_STRING(value);
   30363             :                 } else {
   30364           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30365           0 :                         return -1;
   30366             :                 }
   30367           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30368           0 :                 if (unicode != NULL) {
   30369           0 :                         Py_DECREF(unicode);
   30370             :                 }
   30371           0 :                 if (talloc_str == NULL) {
   30372           0 :                         PyErr_NoMemory();
   30373           0 :                         return -1;
   30374             :                 }
   30375           0 :                 object->in.computer_name = talloc_str;
   30376             :         }
   30377           0 :         return 0;
   30378             : }
   30379             : 
   30380           0 : static PyObject *py_netr_ServerAuthenticate_in_get_credentials(PyObject *obj, void *closure)
   30381             : {
   30382           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
   30383           0 :         PyObject *py_credentials;
   30384           0 :         if (object->in.credentials == NULL) {
   30385           0 :                 Py_RETURN_NONE;
   30386             :         }
   30387           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   30388           0 :         return py_credentials;
   30389             : }
   30390             : 
   30391           0 : static int py_netr_ServerAuthenticate_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   30392             : {
   30393           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30394           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   30395           0 :         if (value == NULL) {
   30396           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credentials");
   30397           0 :                 return -1;
   30398             :         }
   30399           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   30400           0 :         if (object->in.credentials == NULL) {
   30401           0 :                 PyErr_NoMemory();
   30402           0 :                 return -1;
   30403             :         }
   30404           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   30405           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30406           0 :                 PyErr_NoMemory();
   30407           0 :                 return -1;
   30408             :         }
   30409           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   30410           0 :         return 0;
   30411             : }
   30412             : 
   30413           0 : static PyObject *py_netr_ServerAuthenticate_out_get_return_credentials(PyObject *obj, void *closure)
   30414             : {
   30415           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
   30416           0 :         PyObject *py_return_credentials;
   30417           0 :         if (object->out.return_credentials == NULL) {
   30418           0 :                 Py_RETURN_NONE;
   30419             :         }
   30420           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   30421           0 :         return py_return_credentials;
   30422             : }
   30423             : 
   30424           0 : static int py_netr_ServerAuthenticate_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   30425             : {
   30426           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30427           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   30428           0 :         if (value == NULL) {
   30429           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_credentials");
   30430           0 :                 return -1;
   30431             :         }
   30432           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   30433           0 :         if (object->out.return_credentials == NULL) {
   30434           0 :                 PyErr_NoMemory();
   30435           0 :                 return -1;
   30436             :         }
   30437           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   30438           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30439           0 :                 PyErr_NoMemory();
   30440           0 :                 return -1;
   30441             :         }
   30442           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   30443           0 :         return 0;
   30444             : }
   30445             : 
   30446           0 : static PyObject *py_netr_ServerAuthenticate_get_result(PyObject *obj, void *closure)
   30447             : {
   30448           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
   30449           0 :         PyObject *py_result;
   30450           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   30451           0 :         return py_result;
   30452             : }
   30453             : 
   30454           0 : static int py_netr_ServerAuthenticate_set_result(PyObject *py_obj, PyObject *value, void *closure)
   30455             : {
   30456           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30457           0 :         if (value == NULL) {
   30458           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   30459           0 :                 return -1;
   30460             :         }
   30461           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   30462           0 :         return 0;
   30463             : }
   30464             : 
   30465             : static PyGetSetDef py_netr_ServerAuthenticate_getsetters[] = {
   30466             :         {
   30467             :                 .name = discard_const_p(char, "in_server_name"),
   30468             :                 .get = py_netr_ServerAuthenticate_in_get_server_name,
   30469             :                 .set = py_netr_ServerAuthenticate_in_set_server_name,
   30470             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30471             :         },
   30472             :         {
   30473             :                 .name = discard_const_p(char, "in_account_name"),
   30474             :                 .get = py_netr_ServerAuthenticate_in_get_account_name,
   30475             :                 .set = py_netr_ServerAuthenticate_in_set_account_name,
   30476             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30477             :         },
   30478             :         {
   30479             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   30480             :                 .get = py_netr_ServerAuthenticate_in_get_secure_channel_type,
   30481             :                 .set = py_netr_ServerAuthenticate_in_set_secure_channel_type,
   30482             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   30483             :         },
   30484             :         {
   30485             :                 .name = discard_const_p(char, "in_computer_name"),
   30486             :                 .get = py_netr_ServerAuthenticate_in_get_computer_name,
   30487             :                 .set = py_netr_ServerAuthenticate_in_set_computer_name,
   30488             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30489             :         },
   30490             :         {
   30491             :                 .name = discard_const_p(char, "in_credentials"),
   30492             :                 .get = py_netr_ServerAuthenticate_in_get_credentials,
   30493             :                 .set = py_netr_ServerAuthenticate_in_set_credentials,
   30494             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   30495             :         },
   30496             :         {
   30497             :                 .name = discard_const_p(char, "out_return_credentials"),
   30498             :                 .get = py_netr_ServerAuthenticate_out_get_return_credentials,
   30499             :                 .set = py_netr_ServerAuthenticate_out_set_return_credentials,
   30500             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   30501             :         },
   30502             :         {
   30503             :                 .name = discard_const_p(char, "result"),
   30504             :                 .get = py_netr_ServerAuthenticate_get_result,
   30505             :                 .set = py_netr_ServerAuthenticate_set_result,
   30506             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   30507             :         },
   30508             :         { .name = NULL }
   30509             : };
   30510             : 
   30511           0 : static PyObject *py_netr_ServerAuthenticate_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30512             : {
   30513           0 :         PyObject *self = pytalloc_new(struct netr_ServerAuthenticate, type);
   30514           0 :         struct netr_ServerAuthenticate *_self = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(self);
   30515           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   30516           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   30517           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   30518           0 :         return self;
   30519             : }
   30520             : 
   30521           0 : static PyObject *py_netr_ServerAuthenticate_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   30522             : {
   30523             : 
   30524             : 
   30525           0 :         return PyLong_FromLong(5);
   30526             : }
   30527             : 
   30528           0 : static PyObject *py_netr_ServerAuthenticate_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   30529             : {
   30530           0 :         const struct ndr_interface_call *call = NULL;
   30531           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30532           0 :         PyObject *ret = NULL;
   30533           0 :         struct ndr_push *push = NULL;
   30534           0 :         DATA_BLOB blob;
   30535           0 :         enum ndr_err_code err;
   30536             : 
   30537           0 :         if (ndr_table_netlogon.num_calls < 6) {
   30538           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_pack");
   30539           0 :                 return NULL;
   30540             :         }
   30541           0 :         call = &ndr_table_netlogon.calls[5];
   30542             : 
   30543           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   30544           0 :         if (push == NULL) {
   30545           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30546           0 :                 return NULL;
   30547             :         }
   30548             : 
   30549           0 :         push->flags |= ndr_push_flags;
   30550             : 
   30551           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   30552           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30553           0 :                 TALLOC_FREE(push);
   30554           0 :                 PyErr_SetNdrError(err);
   30555           0 :                 return NULL;
   30556             :         }
   30557           0 :         blob = ndr_push_blob(push);
   30558           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   30559           0 :         TALLOC_FREE(push);
   30560           0 :         return ret;
   30561             : }
   30562             : 
   30563           0 : static PyObject *py_netr_ServerAuthenticate_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30564             : {
   30565           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30566           0 :         PyObject *bigendian_obj = NULL;
   30567           0 :         PyObject *ndr64_obj = NULL;
   30568           0 :         libndr_flags ndr_push_flags = 0;
   30569             : 
   30570           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   30571             :                 discard_const_p(char *, kwnames),
   30572             :                 &bigendian_obj,
   30573             :                 &ndr64_obj)) {
   30574           0 :                 return NULL;
   30575             :         }
   30576             : 
   30577           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30578           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30579             :         }
   30580           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30581           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30582             :         }
   30583             : 
   30584           0 :         return py_netr_ServerAuthenticate_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   30585             : }
   30586             : 
   30587           0 : static PyObject *py_netr_ServerAuthenticate_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30588             : {
   30589           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30590           0 :         PyObject *bigendian_obj = NULL;
   30591           0 :         PyObject *ndr64_obj = NULL;
   30592           0 :         libndr_flags ndr_push_flags = 0;
   30593             : 
   30594           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   30595             :                 discard_const_p(char *, kwnames),
   30596             :                 &bigendian_obj,
   30597             :                 &ndr64_obj)) {
   30598           0 :                 return NULL;
   30599             :         }
   30600             : 
   30601           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30602           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30603             :         }
   30604           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30605           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30606             :         }
   30607             : 
   30608           0 :         return py_netr_ServerAuthenticate_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   30609             : }
   30610             : 
   30611           0 : static PyObject *py_netr_ServerAuthenticate_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   30612             : {
   30613           0 :         const struct ndr_interface_call *call = NULL;
   30614           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30615           0 :         struct ndr_pull *pull = NULL;
   30616           0 :         enum ndr_err_code err;
   30617             : 
   30618           0 :         if (ndr_table_netlogon.num_calls < 6) {
   30619           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_unpack");
   30620           0 :                 return NULL;
   30621             :         }
   30622           0 :         call = &ndr_table_netlogon.calls[5];
   30623             : 
   30624           0 :         pull = ndr_pull_init_blob(blob, object);
   30625           0 :         if (pull == NULL) {
   30626           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30627           0 :                 return NULL;
   30628             :         }
   30629             : 
   30630           0 :         pull->flags |= ndr_pull_flags;
   30631             : 
   30632           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   30633           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30634           0 :                 TALLOC_FREE(pull);
   30635           0 :                 PyErr_SetNdrError(err);
   30636           0 :                 return NULL;
   30637             :         }
   30638           0 :         if (!allow_remaining) {
   30639           0 :                 uint32_t highest_ofs;
   30640             : 
   30641           0 :                 if (pull->offset > pull->relative_highest_offset) {
   30642           0 :                         highest_ofs = pull->offset;
   30643             :                 } else {
   30644           0 :                         highest_ofs = pull->relative_highest_offset;
   30645             :                 }
   30646           0 :                 if (highest_ofs < pull->data_size) {
   30647           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   30648             :                                 "not all bytes consumed ofs[%u] size[%u]",
   30649             :                                 highest_ofs, pull->data_size);
   30650           0 :                         TALLOC_FREE(pull);
   30651           0 :                         PyErr_SetNdrError(err);
   30652           0 :                         return NULL;
   30653             :                 }
   30654             :         }
   30655             : 
   30656           0 :         TALLOC_FREE(pull);
   30657           0 :         Py_RETURN_NONE;
   30658             : }
   30659             : 
   30660           0 : static PyObject *py_netr_ServerAuthenticate_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30661             : {
   30662           0 :         DATA_BLOB blob;
   30663           0 :         Py_ssize_t blob_length = 0;
   30664           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30665           0 :         PyObject *bigendian_obj = NULL;
   30666           0 :         PyObject *ndr64_obj = NULL;
   30667           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30668           0 :         PyObject *allow_remaining_obj = NULL;
   30669           0 :         bool allow_remaining = false;
   30670             : 
   30671           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   30672             :                 discard_const_p(char *, kwnames),
   30673             :                 &blob.data, &blob_length,
   30674             :                 &bigendian_obj,
   30675             :                 &ndr64_obj,
   30676             :                 &allow_remaining_obj)) {
   30677           0 :                 return NULL;
   30678             :         }
   30679           0 :         blob.length = blob_length;
   30680             : 
   30681           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30682           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30683             :         }
   30684           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30685           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30686             :         }
   30687             : 
   30688           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30689           0 :                 allow_remaining = true;
   30690             :         }
   30691             : 
   30692           0 :         return py_netr_ServerAuthenticate_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   30693             : }
   30694             : 
   30695           0 : static PyObject *py_netr_ServerAuthenticate_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30696             : {
   30697           0 :         DATA_BLOB blob;
   30698           0 :         Py_ssize_t blob_length = 0;
   30699           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30700           0 :         PyObject *bigendian_obj = NULL;
   30701           0 :         PyObject *ndr64_obj = NULL;
   30702           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30703           0 :         PyObject *allow_remaining_obj = NULL;
   30704           0 :         bool allow_remaining = false;
   30705             : 
   30706           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   30707             :                 discard_const_p(char *, kwnames),
   30708             :                 &blob.data, &blob_length,
   30709             :                 &bigendian_obj,
   30710             :                 &ndr64_obj,
   30711             :                 &allow_remaining_obj)) {
   30712           0 :                 return NULL;
   30713             :         }
   30714           0 :         blob.length = blob_length;
   30715             : 
   30716           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30717           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30718             :         }
   30719           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30720           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30721             :         }
   30722             : 
   30723           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30724           0 :                 allow_remaining = true;
   30725             :         }
   30726             : 
   30727           0 :         return py_netr_ServerAuthenticate_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   30728             : }
   30729             : 
   30730           0 : static PyObject *py_netr_ServerAuthenticate_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   30731             : {
   30732           0 :         const struct ndr_interface_call *call = NULL;
   30733           0 :         struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
   30734           0 :         PyObject *ret;
   30735           0 :         char *retstr;
   30736             : 
   30737           0 :         if (ndr_table_netlogon.num_calls < 6) {
   30738           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_print");
   30739           0 :                 return NULL;
   30740             :         }
   30741           0 :         call = &ndr_table_netlogon.calls[5];
   30742             : 
   30743           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   30744           0 :         ret = PyUnicode_FromString(retstr);
   30745           0 :         TALLOC_FREE(retstr);
   30746             : 
   30747           0 :         return ret;
   30748             : }
   30749             : 
   30750           0 : static PyObject *py_netr_ServerAuthenticate_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30751             : {
   30752           0 :         return py_netr_ServerAuthenticate_ndr_print(py_obj, "netr_ServerAuthenticate_in", NDR_IN);
   30753             : }
   30754             : 
   30755           0 : static PyObject *py_netr_ServerAuthenticate_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30756             : {
   30757           0 :         return py_netr_ServerAuthenticate_ndr_print(py_obj, "netr_ServerAuthenticate_out", NDR_OUT);
   30758             : }
   30759             : 
   30760             : static PyMethodDef py_netr_ServerAuthenticate_methods[] = {
   30761             :         { "opnum", (PyCFunction)py_netr_ServerAuthenticate_ndr_opnum, METH_NOARGS|METH_CLASS,
   30762             :                 "netlogon.netr_ServerAuthenticate.opnum() -> 5 (0x05) " },
   30763             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   30764             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   30765             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   30766             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   30767             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   30768             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   30769             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   30770             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   30771             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerAuthenticate_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   30772             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerAuthenticate_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   30773             :         { NULL, NULL, 0, NULL }
   30774             : };
   30775             : 
   30776             : 
   30777             : static PyTypeObject netr_ServerAuthenticate_Type = {
   30778             :         PyVarObject_HEAD_INIT(NULL, 0)
   30779             :         .tp_name = "netlogon.netr_ServerAuthenticate",
   30780             :         .tp_getset = py_netr_ServerAuthenticate_getsetters,
   30781             :         .tp_methods = py_netr_ServerAuthenticate_methods,
   30782             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30783             :         .tp_new = py_netr_ServerAuthenticate_new,
   30784             : };
   30785             : 
   30786           0 : static bool pack_py_netr_ServerAuthenticate_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate *r)
   30787             : {
   30788           0 :         PyObject *py_server_name;
   30789           0 :         PyObject *py_account_name;
   30790           0 :         PyObject *py_secure_channel_type;
   30791           0 :         PyObject *py_computer_name;
   30792           0 :         PyObject *py_credentials;
   30793           0 :         const char *kwnames[] = {
   30794             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credentials", NULL
   30795             :         };
   30796             : 
   30797           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)) {
   30798           0 :                 return false;
   30799             :         }
   30800             : 
   30801           0 :         if (py_server_name == NULL) {
   30802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   30803           0 :                 return false;
   30804             :         }
   30805           0 :         if (py_server_name == Py_None) {
   30806           0 :                 r->in.server_name = NULL;
   30807             :         } else {
   30808           0 :                 r->in.server_name = NULL;
   30809             :                 {
   30810           0 :                         const char *test_str;
   30811           0 :                         const char *talloc_str;
   30812           0 :                         PyObject *unicode = NULL;
   30813           0 :                         if (PyUnicode_Check(py_server_name)) {
   30814           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   30815           0 :                                 if (unicode == NULL) {
   30816           0 :                                         return false;
   30817             :                                 }
   30818           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30819           0 :                         } else if (PyBytes_Check(py_server_name)) {
   30820           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   30821             :                         } else {
   30822           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   30823           0 :                                 return false;
   30824             :                         }
   30825           0 :                         talloc_str = talloc_strdup(r, test_str);
   30826           0 :                         if (unicode != NULL) {
   30827           0 :                                 Py_DECREF(unicode);
   30828             :                         }
   30829           0 :                         if (talloc_str == NULL) {
   30830           0 :                                 PyErr_NoMemory();
   30831           0 :                                 return false;
   30832             :                         }
   30833           0 :                         r->in.server_name = talloc_str;
   30834             :                 }
   30835             :         }
   30836           0 :         if (py_account_name == NULL) {
   30837           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   30838           0 :                 return false;
   30839             :         }
   30840           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   30841           0 :         if (r->in.account_name == NULL) {
   30842           0 :                 PyErr_NoMemory();
   30843           0 :                 return false;
   30844             :         }
   30845             :         {
   30846           0 :                 const char *test_str;
   30847           0 :                 const char *talloc_str;
   30848           0 :                 PyObject *unicode = NULL;
   30849           0 :                 if (PyUnicode_Check(py_account_name)) {
   30850           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   30851           0 :                         if (unicode == NULL) {
   30852           0 :                                 return false;
   30853             :                         }
   30854           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30855           0 :                 } else if (PyBytes_Check(py_account_name)) {
   30856           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   30857             :                 } else {
   30858           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   30859           0 :                         return false;
   30860             :                 }
   30861           0 :                 talloc_str = talloc_strdup(r, test_str);
   30862           0 :                 if (unicode != NULL) {
   30863           0 :                         Py_DECREF(unicode);
   30864             :                 }
   30865           0 :                 if (talloc_str == NULL) {
   30866           0 :                         PyErr_NoMemory();
   30867           0 :                         return false;
   30868             :                 }
   30869           0 :                 r->in.account_name = talloc_str;
   30870             :         }
   30871           0 :         if (py_secure_channel_type == NULL) {
   30872           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
   30873           0 :                 return false;
   30874             :         }
   30875             :         {
   30876           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   30877           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   30878           0 :                         unsigned long long test_var;
   30879           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   30880           0 :                         if (PyErr_Occurred() != NULL) {
   30881           0 :                                 return false;
   30882             :                         }
   30883           0 :                         if (test_var > uint_max) {
   30884           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30885             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30886           0 :                                 return false;
   30887             :                         }
   30888           0 :                         r->in.secure_channel_type = test_var;
   30889             :                 } else {
   30890           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30891             :                           PyLong_Type.tp_name);
   30892           0 :                         return false;
   30893             :                 }
   30894             :         }
   30895           0 :         if (py_computer_name == NULL) {
   30896           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   30897           0 :                 return false;
   30898             :         }
   30899           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   30900           0 :         if (r->in.computer_name == NULL) {
   30901           0 :                 PyErr_NoMemory();
   30902           0 :                 return false;
   30903             :         }
   30904             :         {
   30905           0 :                 const char *test_str;
   30906           0 :                 const char *talloc_str;
   30907           0 :                 PyObject *unicode = NULL;
   30908           0 :                 if (PyUnicode_Check(py_computer_name)) {
   30909           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   30910           0 :                         if (unicode == NULL) {
   30911           0 :                                 return false;
   30912             :                         }
   30913           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30914           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   30915           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   30916             :                 } else {
   30917           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   30918           0 :                         return false;
   30919             :                 }
   30920           0 :                 talloc_str = talloc_strdup(r, test_str);
   30921           0 :                 if (unicode != NULL) {
   30922           0 :                         Py_DECREF(unicode);
   30923             :                 }
   30924           0 :                 if (talloc_str == NULL) {
   30925           0 :                         PyErr_NoMemory();
   30926           0 :                         return false;
   30927             :                 }
   30928           0 :                 r->in.computer_name = talloc_str;
   30929             :         }
   30930           0 :         if (py_credentials == NULL) {
   30931           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credentials");
   30932           0 :                 return false;
   30933             :         }
   30934           0 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   30935           0 :         if (r->in.credentials == NULL) {
   30936           0 :                 PyErr_NoMemory();
   30937           0 :                 return false;
   30938             :         }
   30939           0 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   30940           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   30941           0 :                 PyErr_NoMemory();
   30942           0 :                 return false;
   30943             :         }
   30944           0 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   30945           0 :         return true;
   30946             : }
   30947             : 
   30948           0 : static PyObject *unpack_py_netr_ServerAuthenticate_args_out(struct netr_ServerAuthenticate *r)
   30949             : {
   30950           0 :         PyObject *result;
   30951           0 :         PyObject *py_return_credentials;
   30952           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   30953           0 :         result = py_return_credentials;
   30954           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   30955           0 :                 PyErr_SetNTSTATUS(r->out.result);
   30956           0 :                 return NULL;
   30957             :         }
   30958             : 
   30959           0 :         return result;
   30960             : }
   30961             : 
   30962             : 
   30963           0 : static PyObject *py_netr_ServerPasswordSet_in_get_server_name(PyObject *obj, void *closure)
   30964             : {
   30965           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
   30966           0 :         PyObject *py_server_name;
   30967           0 :         if (object->in.server_name == NULL) {
   30968           0 :                 Py_RETURN_NONE;
   30969             :         }
   30970           0 :         if (object->in.server_name == NULL) {
   30971           0 :                 py_server_name = Py_None;
   30972           0 :                 Py_INCREF(py_server_name);
   30973             :         } else {
   30974           0 :                 if (object->in.server_name == NULL) {
   30975           0 :                         py_server_name = Py_None;
   30976           0 :                         Py_INCREF(py_server_name);
   30977             :                 } else {
   30978           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   30979             :                 }
   30980             :         }
   30981           0 :         return py_server_name;
   30982             : }
   30983             : 
   30984           0 : static int py_netr_ServerPasswordSet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   30985             : {
   30986           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   30987           0 :         if (value == NULL) {
   30988           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   30989           0 :                 return -1;
   30990             :         }
   30991           0 :         if (value == Py_None) {
   30992           0 :                 object->in.server_name = NULL;
   30993             :         } else {
   30994           0 :                 object->in.server_name = NULL;
   30995             :                 {
   30996           0 :                         const char *test_str;
   30997           0 :                         const char *talloc_str;
   30998           0 :                         PyObject *unicode = NULL;
   30999           0 :                         if (PyUnicode_Check(value)) {
   31000           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31001           0 :                                 if (unicode == NULL) {
   31002           0 :                                         return -1;
   31003             :                                 }
   31004           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31005           0 :                         } else if (PyBytes_Check(value)) {
   31006           0 :                                 test_str = PyBytes_AS_STRING(value);
   31007             :                         } else {
   31008           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31009           0 :                                 return -1;
   31010             :                         }
   31011           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31012           0 :                         if (unicode != NULL) {
   31013           0 :                                 Py_DECREF(unicode);
   31014             :                         }
   31015           0 :                         if (talloc_str == NULL) {
   31016           0 :                                 PyErr_NoMemory();
   31017           0 :                                 return -1;
   31018             :                         }
   31019           0 :                         object->in.server_name = talloc_str;
   31020             :                 }
   31021             :         }
   31022           0 :         return 0;
   31023             : }
   31024             : 
   31025           0 : static PyObject *py_netr_ServerPasswordSet_in_get_account_name(PyObject *obj, void *closure)
   31026             : {
   31027           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
   31028           0 :         PyObject *py_account_name;
   31029           0 :         if (object->in.account_name == NULL) {
   31030           0 :                 Py_RETURN_NONE;
   31031             :         }
   31032           0 :         if (object->in.account_name == NULL) {
   31033           0 :                 py_account_name = Py_None;
   31034           0 :                 Py_INCREF(py_account_name);
   31035             :         } else {
   31036           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   31037             :         }
   31038           0 :         return py_account_name;
   31039             : }
   31040             : 
   31041           0 : static int py_netr_ServerPasswordSet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   31042             : {
   31043           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31044           0 :         if (value == NULL) {
   31045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   31046           0 :                 return -1;
   31047             :         }
   31048           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   31049           0 :         if (object->in.account_name == NULL) {
   31050           0 :                 PyErr_NoMemory();
   31051           0 :                 return -1;
   31052             :         }
   31053             :         {
   31054           0 :                 const char *test_str;
   31055           0 :                 const char *talloc_str;
   31056           0 :                 PyObject *unicode = NULL;
   31057           0 :                 if (PyUnicode_Check(value)) {
   31058           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31059           0 :                         if (unicode == NULL) {
   31060           0 :                                 return -1;
   31061             :                         }
   31062           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31063           0 :                 } else if (PyBytes_Check(value)) {
   31064           0 :                         test_str = PyBytes_AS_STRING(value);
   31065             :                 } else {
   31066           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31067           0 :                         return -1;
   31068             :                 }
   31069           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31070           0 :                 if (unicode != NULL) {
   31071           0 :                         Py_DECREF(unicode);
   31072             :                 }
   31073           0 :                 if (talloc_str == NULL) {
   31074           0 :                         PyErr_NoMemory();
   31075           0 :                         return -1;
   31076             :                 }
   31077           0 :                 object->in.account_name = talloc_str;
   31078             :         }
   31079           0 :         return 0;
   31080             : }
   31081             : 
   31082           0 : static PyObject *py_netr_ServerPasswordSet_in_get_secure_channel_type(PyObject *obj, void *closure)
   31083             : {
   31084           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
   31085           0 :         PyObject *py_secure_channel_type;
   31086           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
   31087           0 :         return py_secure_channel_type;
   31088             : }
   31089             : 
   31090           0 : static int py_netr_ServerPasswordSet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   31091             : {
   31092           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31093           0 :         if (value == NULL) {
   31094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
   31095           0 :                 return -1;
   31096             :         }
   31097             :         {
   31098           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   31099           0 :                 if (PyLong_Check(value)) {
   31100           0 :                         unsigned long long test_var;
   31101           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31102           0 :                         if (PyErr_Occurred() != NULL) {
   31103           0 :                                 return -1;
   31104             :                         }
   31105           0 :                         if (test_var > uint_max) {
   31106           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31107             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31108           0 :                                 return -1;
   31109             :                         }
   31110           0 :                         object->in.secure_channel_type = test_var;
   31111             :                 } else {
   31112           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31113             :                           PyLong_Type.tp_name);
   31114           0 :                         return -1;
   31115             :                 }
   31116             :         }
   31117           0 :         return 0;
   31118             : }
   31119             : 
   31120           0 : static PyObject *py_netr_ServerPasswordSet_in_get_computer_name(PyObject *obj, void *closure)
   31121             : {
   31122           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
   31123           0 :         PyObject *py_computer_name;
   31124           0 :         if (object->in.computer_name == NULL) {
   31125           0 :                 Py_RETURN_NONE;
   31126             :         }
   31127           0 :         if (object->in.computer_name == NULL) {
   31128           0 :                 py_computer_name = Py_None;
   31129           0 :                 Py_INCREF(py_computer_name);
   31130             :         } else {
   31131           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   31132             :         }
   31133           0 :         return py_computer_name;
   31134             : }
   31135             : 
   31136           0 : static int py_netr_ServerPasswordSet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   31137             : {
   31138           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31139           0 :         if (value == NULL) {
   31140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   31141           0 :                 return -1;
   31142             :         }
   31143           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   31144           0 :         if (object->in.computer_name == NULL) {
   31145           0 :                 PyErr_NoMemory();
   31146           0 :                 return -1;
   31147             :         }
   31148             :         {
   31149           0 :                 const char *test_str;
   31150           0 :                 const char *talloc_str;
   31151           0 :                 PyObject *unicode = NULL;
   31152           0 :                 if (PyUnicode_Check(value)) {
   31153           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31154           0 :                         if (unicode == NULL) {
   31155           0 :                                 return -1;
   31156             :                         }
   31157           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31158           0 :                 } else if (PyBytes_Check(value)) {
   31159           0 :                         test_str = PyBytes_AS_STRING(value);
   31160             :                 } else {
   31161           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31162           0 :                         return -1;
   31163             :                 }
   31164           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31165           0 :                 if (unicode != NULL) {
   31166           0 :                         Py_DECREF(unicode);
   31167             :                 }
   31168           0 :                 if (talloc_str == NULL) {
   31169           0 :                         PyErr_NoMemory();
   31170           0 :                         return -1;
   31171             :                 }
   31172           0 :                 object->in.computer_name = talloc_str;
   31173             :         }
   31174           0 :         return 0;
   31175             : }
   31176             : 
   31177           0 : static PyObject *py_netr_ServerPasswordSet_in_get_credential(PyObject *obj, void *closure)
   31178             : {
   31179           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
   31180           0 :         PyObject *py_credential;
   31181           0 :         if (object->in.credential == NULL) {
   31182           0 :                 Py_RETURN_NONE;
   31183             :         }
   31184           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   31185           0 :         return py_credential;
   31186             : }
   31187             : 
   31188           0 : static int py_netr_ServerPasswordSet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   31189             : {
   31190           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31191           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   31192           0 :         if (value == NULL) {
   31193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   31194           0 :                 return -1;
   31195             :         }
   31196           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   31197           0 :         if (object->in.credential == NULL) {
   31198           0 :                 PyErr_NoMemory();
   31199           0 :                 return -1;
   31200             :         }
   31201           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   31202           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31203           0 :                 PyErr_NoMemory();
   31204           0 :                 return -1;
   31205             :         }
   31206           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   31207           0 :         return 0;
   31208             : }
   31209             : 
   31210           0 : static PyObject *py_netr_ServerPasswordSet_out_get_return_authenticator(PyObject *obj, void *closure)
   31211             : {
   31212           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
   31213           0 :         PyObject *py_return_authenticator;
   31214           0 :         if (object->out.return_authenticator == NULL) {
   31215           0 :                 Py_RETURN_NONE;
   31216             :         }
   31217           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   31218           0 :         return py_return_authenticator;
   31219             : }
   31220             : 
   31221           0 : static int py_netr_ServerPasswordSet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   31222             : {
   31223           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31224           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   31225           0 :         if (value == NULL) {
   31226           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   31227           0 :                 return -1;
   31228             :         }
   31229           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   31230           0 :         if (object->out.return_authenticator == NULL) {
   31231           0 :                 PyErr_NoMemory();
   31232           0 :                 return -1;
   31233             :         }
   31234           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   31235           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31236           0 :                 PyErr_NoMemory();
   31237           0 :                 return -1;
   31238             :         }
   31239           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   31240           0 :         return 0;
   31241             : }
   31242             : 
   31243           0 : static PyObject *py_netr_ServerPasswordSet_in_get_new_password(PyObject *obj, void *closure)
   31244             : {
   31245           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
   31246           0 :         PyObject *py_new_password;
   31247           0 :         if (object->in.new_password == NULL) {
   31248           0 :                 Py_RETURN_NONE;
   31249             :         }
   31250           0 :         py_new_password = pytalloc_reference_ex(samr_Password_Type, object->in.new_password, object->in.new_password);
   31251           0 :         return py_new_password;
   31252             : }
   31253             : 
   31254           0 : static int py_netr_ServerPasswordSet_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
   31255             : {
   31256           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31257           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.new_password));
   31258           0 :         if (value == NULL) {
   31259           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.new_password");
   31260           0 :                 return -1;
   31261             :         }
   31262           0 :         object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
   31263           0 :         if (object->in.new_password == NULL) {
   31264           0 :                 PyErr_NoMemory();
   31265           0 :                 return -1;
   31266             :         }
   31267           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   31268           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31269           0 :                 PyErr_NoMemory();
   31270           0 :                 return -1;
   31271             :         }
   31272           0 :         object->in.new_password = (struct samr_Password *)pytalloc_get_ptr(value);
   31273           0 :         return 0;
   31274             : }
   31275             : 
   31276           0 : static PyObject *py_netr_ServerPasswordSet_get_result(PyObject *obj, void *closure)
   31277             : {
   31278           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
   31279           0 :         PyObject *py_result;
   31280           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   31281           0 :         return py_result;
   31282             : }
   31283             : 
   31284           0 : static int py_netr_ServerPasswordSet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   31285             : {
   31286           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31287           0 :         if (value == NULL) {
   31288           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   31289           0 :                 return -1;
   31290             :         }
   31291           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   31292           0 :         return 0;
   31293             : }
   31294             : 
   31295             : static PyGetSetDef py_netr_ServerPasswordSet_getsetters[] = {
   31296             :         {
   31297             :                 .name = discard_const_p(char, "in_server_name"),
   31298             :                 .get = py_netr_ServerPasswordSet_in_get_server_name,
   31299             :                 .set = py_netr_ServerPasswordSet_in_set_server_name,
   31300             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31301             :         },
   31302             :         {
   31303             :                 .name = discard_const_p(char, "in_account_name"),
   31304             :                 .get = py_netr_ServerPasswordSet_in_get_account_name,
   31305             :                 .set = py_netr_ServerPasswordSet_in_set_account_name,
   31306             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31307             :         },
   31308             :         {
   31309             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   31310             :                 .get = py_netr_ServerPasswordSet_in_get_secure_channel_type,
   31311             :                 .set = py_netr_ServerPasswordSet_in_set_secure_channel_type,
   31312             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   31313             :         },
   31314             :         {
   31315             :                 .name = discard_const_p(char, "in_computer_name"),
   31316             :                 .get = py_netr_ServerPasswordSet_in_get_computer_name,
   31317             :                 .set = py_netr_ServerPasswordSet_in_set_computer_name,
   31318             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31319             :         },
   31320             :         {
   31321             :                 .name = discard_const_p(char, "in_credential"),
   31322             :                 .get = py_netr_ServerPasswordSet_in_get_credential,
   31323             :                 .set = py_netr_ServerPasswordSet_in_set_credential,
   31324             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   31325             :         },
   31326             :         {
   31327             :                 .name = discard_const_p(char, "out_return_authenticator"),
   31328             :                 .get = py_netr_ServerPasswordSet_out_get_return_authenticator,
   31329             :                 .set = py_netr_ServerPasswordSet_out_set_return_authenticator,
   31330             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   31331             :         },
   31332             :         {
   31333             :                 .name = discard_const_p(char, "in_new_password"),
   31334             :                 .get = py_netr_ServerPasswordSet_in_get_new_password,
   31335             :                 .set = py_netr_ServerPasswordSet_in_set_new_password,
   31336             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   31337             :         },
   31338             :         {
   31339             :                 .name = discard_const_p(char, "result"),
   31340             :                 .get = py_netr_ServerPasswordSet_get_result,
   31341             :                 .set = py_netr_ServerPasswordSet_set_result,
   31342             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   31343             :         },
   31344             :         { .name = NULL }
   31345             : };
   31346             : 
   31347           0 : static PyObject *py_netr_ServerPasswordSet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   31348             : {
   31349           0 :         PyObject *self = pytalloc_new(struct netr_ServerPasswordSet, type);
   31350           0 :         struct netr_ServerPasswordSet *_self = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(self);
   31351           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   31352           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   31353           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   31354           0 :         _self->in.new_password = talloc_zero(mem_ctx, struct samr_Password);
   31355           0 :         return self;
   31356             : }
   31357             : 
   31358           0 : static PyObject *py_netr_ServerPasswordSet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   31359             : {
   31360             : 
   31361             : 
   31362           0 :         return PyLong_FromLong(6);
   31363             : }
   31364             : 
   31365           0 : static PyObject *py_netr_ServerPasswordSet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   31366             : {
   31367           0 :         const struct ndr_interface_call *call = NULL;
   31368           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31369           0 :         PyObject *ret = NULL;
   31370           0 :         struct ndr_push *push = NULL;
   31371           0 :         DATA_BLOB blob;
   31372           0 :         enum ndr_err_code err;
   31373             : 
   31374           0 :         if (ndr_table_netlogon.num_calls < 7) {
   31375           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_pack");
   31376           0 :                 return NULL;
   31377             :         }
   31378           0 :         call = &ndr_table_netlogon.calls[6];
   31379             : 
   31380           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   31381           0 :         if (push == NULL) {
   31382           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31383           0 :                 return NULL;
   31384             :         }
   31385             : 
   31386           0 :         push->flags |= ndr_push_flags;
   31387             : 
   31388           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   31389           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31390           0 :                 TALLOC_FREE(push);
   31391           0 :                 PyErr_SetNdrError(err);
   31392           0 :                 return NULL;
   31393             :         }
   31394           0 :         blob = ndr_push_blob(push);
   31395           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   31396           0 :         TALLOC_FREE(push);
   31397           0 :         return ret;
   31398             : }
   31399             : 
   31400           0 : static PyObject *py_netr_ServerPasswordSet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31401             : {
   31402           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31403           0 :         PyObject *bigendian_obj = NULL;
   31404           0 :         PyObject *ndr64_obj = NULL;
   31405           0 :         libndr_flags ndr_push_flags = 0;
   31406             : 
   31407           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   31408             :                 discard_const_p(char *, kwnames),
   31409             :                 &bigendian_obj,
   31410             :                 &ndr64_obj)) {
   31411           0 :                 return NULL;
   31412             :         }
   31413             : 
   31414           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31415           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31416             :         }
   31417           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31418           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31419             :         }
   31420             : 
   31421           0 :         return py_netr_ServerPasswordSet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   31422             : }
   31423             : 
   31424           0 : static PyObject *py_netr_ServerPasswordSet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31425             : {
   31426           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31427           0 :         PyObject *bigendian_obj = NULL;
   31428           0 :         PyObject *ndr64_obj = NULL;
   31429           0 :         libndr_flags ndr_push_flags = 0;
   31430             : 
   31431           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   31432             :                 discard_const_p(char *, kwnames),
   31433             :                 &bigendian_obj,
   31434             :                 &ndr64_obj)) {
   31435           0 :                 return NULL;
   31436             :         }
   31437             : 
   31438           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31439           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31440             :         }
   31441           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31442           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31443             :         }
   31444             : 
   31445           0 :         return py_netr_ServerPasswordSet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   31446             : }
   31447             : 
   31448           0 : static PyObject *py_netr_ServerPasswordSet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   31449             : {
   31450           0 :         const struct ndr_interface_call *call = NULL;
   31451           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31452           0 :         struct ndr_pull *pull = NULL;
   31453           0 :         enum ndr_err_code err;
   31454             : 
   31455           0 :         if (ndr_table_netlogon.num_calls < 7) {
   31456           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_unpack");
   31457           0 :                 return NULL;
   31458             :         }
   31459           0 :         call = &ndr_table_netlogon.calls[6];
   31460             : 
   31461           0 :         pull = ndr_pull_init_blob(blob, object);
   31462           0 :         if (pull == NULL) {
   31463           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31464           0 :                 return NULL;
   31465             :         }
   31466             : 
   31467           0 :         pull->flags |= ndr_pull_flags;
   31468             : 
   31469           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   31470           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31471           0 :                 TALLOC_FREE(pull);
   31472           0 :                 PyErr_SetNdrError(err);
   31473           0 :                 return NULL;
   31474             :         }
   31475           0 :         if (!allow_remaining) {
   31476           0 :                 uint32_t highest_ofs;
   31477             : 
   31478           0 :                 if (pull->offset > pull->relative_highest_offset) {
   31479           0 :                         highest_ofs = pull->offset;
   31480             :                 } else {
   31481           0 :                         highest_ofs = pull->relative_highest_offset;
   31482             :                 }
   31483           0 :                 if (highest_ofs < pull->data_size) {
   31484           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   31485             :                                 "not all bytes consumed ofs[%u] size[%u]",
   31486             :                                 highest_ofs, pull->data_size);
   31487           0 :                         TALLOC_FREE(pull);
   31488           0 :                         PyErr_SetNdrError(err);
   31489           0 :                         return NULL;
   31490             :                 }
   31491             :         }
   31492             : 
   31493           0 :         TALLOC_FREE(pull);
   31494           0 :         Py_RETURN_NONE;
   31495             : }
   31496             : 
   31497           0 : static PyObject *py_netr_ServerPasswordSet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31498             : {
   31499           0 :         DATA_BLOB blob;
   31500           0 :         Py_ssize_t blob_length = 0;
   31501           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31502           0 :         PyObject *bigendian_obj = NULL;
   31503           0 :         PyObject *ndr64_obj = NULL;
   31504           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31505           0 :         PyObject *allow_remaining_obj = NULL;
   31506           0 :         bool allow_remaining = false;
   31507             : 
   31508           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   31509             :                 discard_const_p(char *, kwnames),
   31510             :                 &blob.data, &blob_length,
   31511             :                 &bigendian_obj,
   31512             :                 &ndr64_obj,
   31513             :                 &allow_remaining_obj)) {
   31514           0 :                 return NULL;
   31515             :         }
   31516           0 :         blob.length = blob_length;
   31517             : 
   31518           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31519           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31520             :         }
   31521           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31522           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31523             :         }
   31524             : 
   31525           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31526           0 :                 allow_remaining = true;
   31527             :         }
   31528             : 
   31529           0 :         return py_netr_ServerPasswordSet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   31530             : }
   31531             : 
   31532           0 : static PyObject *py_netr_ServerPasswordSet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31533             : {
   31534           0 :         DATA_BLOB blob;
   31535           0 :         Py_ssize_t blob_length = 0;
   31536           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31537           0 :         PyObject *bigendian_obj = NULL;
   31538           0 :         PyObject *ndr64_obj = NULL;
   31539           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31540           0 :         PyObject *allow_remaining_obj = NULL;
   31541           0 :         bool allow_remaining = false;
   31542             : 
   31543           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   31544             :                 discard_const_p(char *, kwnames),
   31545             :                 &blob.data, &blob_length,
   31546             :                 &bigendian_obj,
   31547             :                 &ndr64_obj,
   31548             :                 &allow_remaining_obj)) {
   31549           0 :                 return NULL;
   31550             :         }
   31551           0 :         blob.length = blob_length;
   31552             : 
   31553           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31554           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31555             :         }
   31556           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31557           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31558             :         }
   31559             : 
   31560           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31561           0 :                 allow_remaining = true;
   31562             :         }
   31563             : 
   31564           0 :         return py_netr_ServerPasswordSet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   31565             : }
   31566             : 
   31567           0 : static PyObject *py_netr_ServerPasswordSet_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   31568             : {
   31569           0 :         const struct ndr_interface_call *call = NULL;
   31570           0 :         struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
   31571           0 :         PyObject *ret;
   31572           0 :         char *retstr;
   31573             : 
   31574           0 :         if (ndr_table_netlogon.num_calls < 7) {
   31575           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_print");
   31576           0 :                 return NULL;
   31577             :         }
   31578           0 :         call = &ndr_table_netlogon.calls[6];
   31579             : 
   31580           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   31581           0 :         ret = PyUnicode_FromString(retstr);
   31582           0 :         TALLOC_FREE(retstr);
   31583             : 
   31584           0 :         return ret;
   31585             : }
   31586             : 
   31587           0 : static PyObject *py_netr_ServerPasswordSet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31588             : {
   31589           0 :         return py_netr_ServerPasswordSet_ndr_print(py_obj, "netr_ServerPasswordSet_in", NDR_IN);
   31590             : }
   31591             : 
   31592           0 : static PyObject *py_netr_ServerPasswordSet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31593             : {
   31594           0 :         return py_netr_ServerPasswordSet_ndr_print(py_obj, "netr_ServerPasswordSet_out", NDR_OUT);
   31595             : }
   31596             : 
   31597             : static PyMethodDef py_netr_ServerPasswordSet_methods[] = {
   31598             :         { "opnum", (PyCFunction)py_netr_ServerPasswordSet_ndr_opnum, METH_NOARGS|METH_CLASS,
   31599             :                 "netlogon.netr_ServerPasswordSet.opnum() -> 6 (0x06) " },
   31600             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   31601             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   31602             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   31603             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   31604             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   31605             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   31606             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   31607             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   31608             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerPasswordSet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   31609             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerPasswordSet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   31610             :         { NULL, NULL, 0, NULL }
   31611             : };
   31612             : 
   31613             : 
   31614             : static PyTypeObject netr_ServerPasswordSet_Type = {
   31615             :         PyVarObject_HEAD_INIT(NULL, 0)
   31616             :         .tp_name = "netlogon.netr_ServerPasswordSet",
   31617             :         .tp_getset = py_netr_ServerPasswordSet_getsetters,
   31618             :         .tp_methods = py_netr_ServerPasswordSet_methods,
   31619             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31620             :         .tp_new = py_netr_ServerPasswordSet_new,
   31621             : };
   31622             : 
   31623           0 : static bool pack_py_netr_ServerPasswordSet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordSet *r)
   31624             : {
   31625           0 :         PyObject *py_server_name;
   31626           0 :         PyObject *py_account_name;
   31627           0 :         PyObject *py_secure_channel_type;
   31628           0 :         PyObject *py_computer_name;
   31629           0 :         PyObject *py_credential;
   31630           0 :         PyObject *py_new_password;
   31631           0 :         const char *kwnames[] = {
   31632             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", "new_password", NULL
   31633             :         };
   31634             : 
   31635           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)) {
   31636           0 :                 return false;
   31637             :         }
   31638             : 
   31639           0 :         if (py_server_name == NULL) {
   31640           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   31641           0 :                 return false;
   31642             :         }
   31643           0 :         if (py_server_name == Py_None) {
   31644           0 :                 r->in.server_name = NULL;
   31645             :         } else {
   31646           0 :                 r->in.server_name = NULL;
   31647             :                 {
   31648           0 :                         const char *test_str;
   31649           0 :                         const char *talloc_str;
   31650           0 :                         PyObject *unicode = NULL;
   31651           0 :                         if (PyUnicode_Check(py_server_name)) {
   31652           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   31653           0 :                                 if (unicode == NULL) {
   31654           0 :                                         return false;
   31655             :                                 }
   31656           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31657           0 :                         } else if (PyBytes_Check(py_server_name)) {
   31658           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   31659             :                         } else {
   31660           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   31661           0 :                                 return false;
   31662             :                         }
   31663           0 :                         talloc_str = talloc_strdup(r, test_str);
   31664           0 :                         if (unicode != NULL) {
   31665           0 :                                 Py_DECREF(unicode);
   31666             :                         }
   31667           0 :                         if (talloc_str == NULL) {
   31668           0 :                                 PyErr_NoMemory();
   31669           0 :                                 return false;
   31670             :                         }
   31671           0 :                         r->in.server_name = talloc_str;
   31672             :                 }
   31673             :         }
   31674           0 :         if (py_account_name == NULL) {
   31675           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   31676           0 :                 return false;
   31677             :         }
   31678           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   31679           0 :         if (r->in.account_name == NULL) {
   31680           0 :                 PyErr_NoMemory();
   31681           0 :                 return false;
   31682             :         }
   31683             :         {
   31684           0 :                 const char *test_str;
   31685           0 :                 const char *talloc_str;
   31686           0 :                 PyObject *unicode = NULL;
   31687           0 :                 if (PyUnicode_Check(py_account_name)) {
   31688           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   31689           0 :                         if (unicode == NULL) {
   31690           0 :                                 return false;
   31691             :                         }
   31692           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31693           0 :                 } else if (PyBytes_Check(py_account_name)) {
   31694           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   31695             :                 } else {
   31696           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   31697           0 :                         return false;
   31698             :                 }
   31699           0 :                 talloc_str = talloc_strdup(r, test_str);
   31700           0 :                 if (unicode != NULL) {
   31701           0 :                         Py_DECREF(unicode);
   31702             :                 }
   31703           0 :                 if (talloc_str == NULL) {
   31704           0 :                         PyErr_NoMemory();
   31705           0 :                         return false;
   31706             :                 }
   31707           0 :                 r->in.account_name = talloc_str;
   31708             :         }
   31709           0 :         if (py_secure_channel_type == NULL) {
   31710           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
   31711           0 :                 return false;
   31712             :         }
   31713             :         {
   31714           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   31715           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   31716           0 :                         unsigned long long test_var;
   31717           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   31718           0 :                         if (PyErr_Occurred() != NULL) {
   31719           0 :                                 return false;
   31720             :                         }
   31721           0 :                         if (test_var > uint_max) {
   31722           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31723             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31724           0 :                                 return false;
   31725             :                         }
   31726           0 :                         r->in.secure_channel_type = test_var;
   31727             :                 } else {
   31728           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31729             :                           PyLong_Type.tp_name);
   31730           0 :                         return false;
   31731             :                 }
   31732             :         }
   31733           0 :         if (py_computer_name == NULL) {
   31734           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   31735           0 :                 return false;
   31736             :         }
   31737           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   31738           0 :         if (r->in.computer_name == NULL) {
   31739           0 :                 PyErr_NoMemory();
   31740           0 :                 return false;
   31741             :         }
   31742             :         {
   31743           0 :                 const char *test_str;
   31744           0 :                 const char *talloc_str;
   31745           0 :                 PyObject *unicode = NULL;
   31746           0 :                 if (PyUnicode_Check(py_computer_name)) {
   31747           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   31748           0 :                         if (unicode == NULL) {
   31749           0 :                                 return false;
   31750             :                         }
   31751           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31752           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   31753           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   31754             :                 } else {
   31755           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   31756           0 :                         return false;
   31757             :                 }
   31758           0 :                 talloc_str = talloc_strdup(r, test_str);
   31759           0 :                 if (unicode != NULL) {
   31760           0 :                         Py_DECREF(unicode);
   31761             :                 }
   31762           0 :                 if (talloc_str == NULL) {
   31763           0 :                         PyErr_NoMemory();
   31764           0 :                         return false;
   31765             :                 }
   31766           0 :                 r->in.computer_name = talloc_str;
   31767             :         }
   31768           0 :         if (py_credential == NULL) {
   31769           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   31770           0 :                 return false;
   31771             :         }
   31772           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   31773           0 :         if (r->in.credential == NULL) {
   31774           0 :                 PyErr_NoMemory();
   31775           0 :                 return false;
   31776             :         }
   31777           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   31778           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   31779           0 :                 PyErr_NoMemory();
   31780           0 :                 return false;
   31781             :         }
   31782           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   31783           0 :         if (py_new_password == NULL) {
   31784           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.new_password");
   31785           0 :                 return false;
   31786             :         }
   31787           0 :         r->in.new_password = talloc_ptrtype(r, r->in.new_password);
   31788           0 :         if (r->in.new_password == NULL) {
   31789           0 :                 PyErr_NoMemory();
   31790           0 :                 return false;
   31791             :         }
   31792           0 :         PY_CHECK_TYPE(samr_Password_Type, py_new_password, return false;);
   31793           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_new_password)) == NULL) {
   31794           0 :                 PyErr_NoMemory();
   31795           0 :                 return false;
   31796             :         }
   31797           0 :         r->in.new_password = (struct samr_Password *)pytalloc_get_ptr(py_new_password);
   31798           0 :         return true;
   31799             : }
   31800             : 
   31801           0 : static PyObject *unpack_py_netr_ServerPasswordSet_args_out(struct netr_ServerPasswordSet *r)
   31802             : {
   31803           0 :         PyObject *result;
   31804           0 :         PyObject *py_return_authenticator;
   31805           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   31806           0 :         result = py_return_authenticator;
   31807           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   31808           0 :                 PyErr_SetNTSTATUS(r->out.result);
   31809           0 :                 return NULL;
   31810             :         }
   31811             : 
   31812           0 :         return result;
   31813             : }
   31814             : 
   31815             : 
   31816           0 : static PyObject *py_netr_DatabaseDeltas_in_get_logon_server(PyObject *obj, void *closure)
   31817             : {
   31818           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   31819           0 :         PyObject *py_logon_server;
   31820           0 :         if (object->in.logon_server == NULL) {
   31821           0 :                 Py_RETURN_NONE;
   31822             :         }
   31823           0 :         if (object->in.logon_server == NULL) {
   31824           0 :                 py_logon_server = Py_None;
   31825           0 :                 Py_INCREF(py_logon_server);
   31826             :         } else {
   31827           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   31828             :         }
   31829           0 :         return py_logon_server;
   31830             : }
   31831             : 
   31832           0 : static int py_netr_DatabaseDeltas_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   31833             : {
   31834           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   31835           0 :         if (value == NULL) {
   31836           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   31837           0 :                 return -1;
   31838             :         }
   31839           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   31840           0 :         if (object->in.logon_server == NULL) {
   31841           0 :                 PyErr_NoMemory();
   31842           0 :                 return -1;
   31843             :         }
   31844             :         {
   31845           0 :                 const char *test_str;
   31846           0 :                 const char *talloc_str;
   31847           0 :                 PyObject *unicode = NULL;
   31848           0 :                 if (PyUnicode_Check(value)) {
   31849           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31850           0 :                         if (unicode == NULL) {
   31851           0 :                                 return -1;
   31852             :                         }
   31853           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31854           0 :                 } else if (PyBytes_Check(value)) {
   31855           0 :                         test_str = PyBytes_AS_STRING(value);
   31856             :                 } else {
   31857           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31858           0 :                         return -1;
   31859             :                 }
   31860           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31861           0 :                 if (unicode != NULL) {
   31862           0 :                         Py_DECREF(unicode);
   31863             :                 }
   31864           0 :                 if (talloc_str == NULL) {
   31865           0 :                         PyErr_NoMemory();
   31866           0 :                         return -1;
   31867             :                 }
   31868           0 :                 object->in.logon_server = talloc_str;
   31869             :         }
   31870           0 :         return 0;
   31871             : }
   31872             : 
   31873           0 : static PyObject *py_netr_DatabaseDeltas_in_get_computername(PyObject *obj, void *closure)
   31874             : {
   31875           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   31876           0 :         PyObject *py_computername;
   31877           0 :         if (object->in.computername == NULL) {
   31878           0 :                 Py_RETURN_NONE;
   31879             :         }
   31880           0 :         if (object->in.computername == NULL) {
   31881           0 :                 py_computername = Py_None;
   31882           0 :                 Py_INCREF(py_computername);
   31883             :         } else {
   31884           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   31885             :         }
   31886           0 :         return py_computername;
   31887             : }
   31888             : 
   31889           0 : static int py_netr_DatabaseDeltas_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   31890             : {
   31891           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   31892           0 :         if (value == NULL) {
   31893           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
   31894           0 :                 return -1;
   31895             :         }
   31896           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   31897           0 :         if (object->in.computername == NULL) {
   31898           0 :                 PyErr_NoMemory();
   31899           0 :                 return -1;
   31900             :         }
   31901             :         {
   31902           0 :                 const char *test_str;
   31903           0 :                 const char *talloc_str;
   31904           0 :                 PyObject *unicode = NULL;
   31905           0 :                 if (PyUnicode_Check(value)) {
   31906           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31907           0 :                         if (unicode == NULL) {
   31908           0 :                                 return -1;
   31909             :                         }
   31910           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31911           0 :                 } else if (PyBytes_Check(value)) {
   31912           0 :                         test_str = PyBytes_AS_STRING(value);
   31913             :                 } else {
   31914           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31915           0 :                         return -1;
   31916             :                 }
   31917           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31918           0 :                 if (unicode != NULL) {
   31919           0 :                         Py_DECREF(unicode);
   31920             :                 }
   31921           0 :                 if (talloc_str == NULL) {
   31922           0 :                         PyErr_NoMemory();
   31923           0 :                         return -1;
   31924             :                 }
   31925           0 :                 object->in.computername = talloc_str;
   31926             :         }
   31927           0 :         return 0;
   31928             : }
   31929             : 
   31930           0 : static PyObject *py_netr_DatabaseDeltas_in_get_credential(PyObject *obj, void *closure)
   31931             : {
   31932           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   31933           0 :         PyObject *py_credential;
   31934           0 :         if (object->in.credential == NULL) {
   31935           0 :                 Py_RETURN_NONE;
   31936             :         }
   31937           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   31938           0 :         return py_credential;
   31939             : }
   31940             : 
   31941           0 : static int py_netr_DatabaseDeltas_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   31942             : {
   31943           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   31944           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   31945           0 :         if (value == NULL) {
   31946           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   31947           0 :                 return -1;
   31948             :         }
   31949           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   31950           0 :         if (object->in.credential == NULL) {
   31951           0 :                 PyErr_NoMemory();
   31952           0 :                 return -1;
   31953             :         }
   31954           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   31955           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31956           0 :                 PyErr_NoMemory();
   31957           0 :                 return -1;
   31958             :         }
   31959           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   31960           0 :         return 0;
   31961             : }
   31962             : 
   31963           0 : static PyObject *py_netr_DatabaseDeltas_in_get_return_authenticator(PyObject *obj, void *closure)
   31964             : {
   31965           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   31966           0 :         PyObject *py_return_authenticator;
   31967           0 :         if (object->in.return_authenticator == NULL) {
   31968           0 :                 Py_RETURN_NONE;
   31969             :         }
   31970           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   31971           0 :         return py_return_authenticator;
   31972             : }
   31973             : 
   31974           0 : static int py_netr_DatabaseDeltas_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   31975             : {
   31976           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   31977           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   31978           0 :         if (value == NULL) {
   31979           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   31980           0 :                 return -1;
   31981             :         }
   31982           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   31983           0 :         if (object->in.return_authenticator == NULL) {
   31984           0 :                 PyErr_NoMemory();
   31985           0 :                 return -1;
   31986             :         }
   31987           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   31988           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31989           0 :                 PyErr_NoMemory();
   31990           0 :                 return -1;
   31991             :         }
   31992           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   31993           0 :         return 0;
   31994             : }
   31995             : 
   31996           0 : static PyObject *py_netr_DatabaseDeltas_out_get_return_authenticator(PyObject *obj, void *closure)
   31997             : {
   31998           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   31999           0 :         PyObject *py_return_authenticator;
   32000           0 :         if (object->out.return_authenticator == NULL) {
   32001           0 :                 Py_RETURN_NONE;
   32002             :         }
   32003           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   32004           0 :         return py_return_authenticator;
   32005             : }
   32006             : 
   32007           0 : static int py_netr_DatabaseDeltas_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   32008             : {
   32009           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32010           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   32011           0 :         if (value == NULL) {
   32012           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   32013           0 :                 return -1;
   32014             :         }
   32015           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   32016           0 :         if (object->out.return_authenticator == NULL) {
   32017           0 :                 PyErr_NoMemory();
   32018           0 :                 return -1;
   32019             :         }
   32020           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   32021           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32022           0 :                 PyErr_NoMemory();
   32023           0 :                 return -1;
   32024             :         }
   32025           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   32026           0 :         return 0;
   32027             : }
   32028             : 
   32029           0 : static PyObject *py_netr_DatabaseDeltas_in_get_database_id(PyObject *obj, void *closure)
   32030             : {
   32031           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   32032           0 :         PyObject *py_database_id;
   32033           0 :         py_database_id = PyLong_FromUnsignedLongLong((uint32_t)(object->in.database_id));
   32034           0 :         return py_database_id;
   32035             : }
   32036             : 
   32037           0 : static int py_netr_DatabaseDeltas_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
   32038             : {
   32039           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32040           0 :         if (value == NULL) {
   32041           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.database_id");
   32042           0 :                 return -1;
   32043             :         }
   32044             :         {
   32045           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
   32046           0 :                 if (PyLong_Check(value)) {
   32047           0 :                         unsigned long long test_var;
   32048           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32049           0 :                         if (PyErr_Occurred() != NULL) {
   32050           0 :                                 return -1;
   32051             :                         }
   32052           0 :                         if (test_var > uint_max) {
   32053           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32054             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32055           0 :                                 return -1;
   32056             :                         }
   32057           0 :                         object->in.database_id = test_var;
   32058             :                 } else {
   32059           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32060             :                           PyLong_Type.tp_name);
   32061           0 :                         return -1;
   32062             :                 }
   32063             :         }
   32064           0 :         return 0;
   32065             : }
   32066             : 
   32067           0 : static PyObject *py_netr_DatabaseDeltas_in_get_sequence_num(PyObject *obj, void *closure)
   32068             : {
   32069           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   32070           0 :         PyObject *py_sequence_num;
   32071           0 :         if (object->in.sequence_num == NULL) {
   32072           0 :                 Py_RETURN_NONE;
   32073             :         }
   32074           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(*object->in.sequence_num);
   32075           0 :         return py_sequence_num;
   32076             : }
   32077             : 
   32078           0 : static int py_netr_DatabaseDeltas_in_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
   32079             : {
   32080           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32081           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sequence_num));
   32082           0 :         if (value == NULL) {
   32083           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sequence_num");
   32084           0 :                 return -1;
   32085             :         }
   32086           0 :         object->in.sequence_num = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sequence_num);
   32087           0 :         if (object->in.sequence_num == NULL) {
   32088           0 :                 PyErr_NoMemory();
   32089           0 :                 return -1;
   32090             :         }
   32091             :         {
   32092           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sequence_num));
   32093           0 :                 if (PyLong_Check(value)) {
   32094           0 :                         unsigned long long test_var;
   32095           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32096           0 :                         if (PyErr_Occurred() != NULL) {
   32097           0 :                                 return -1;
   32098             :                         }
   32099           0 :                         if (test_var > uint_max) {
   32100           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32101             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32102           0 :                                 return -1;
   32103             :                         }
   32104           0 :                         *object->in.sequence_num = test_var;
   32105             :                 } else {
   32106           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32107             :                           PyLong_Type.tp_name);
   32108           0 :                         return -1;
   32109             :                 }
   32110             :         }
   32111           0 :         return 0;
   32112             : }
   32113             : 
   32114           0 : static PyObject *py_netr_DatabaseDeltas_out_get_sequence_num(PyObject *obj, void *closure)
   32115             : {
   32116           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   32117           0 :         PyObject *py_sequence_num;
   32118           0 :         if (object->out.sequence_num == NULL) {
   32119           0 :                 Py_RETURN_NONE;
   32120             :         }
   32121           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(*object->out.sequence_num);
   32122           0 :         return py_sequence_num;
   32123             : }
   32124             : 
   32125           0 : static int py_netr_DatabaseDeltas_out_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
   32126             : {
   32127           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32128           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sequence_num));
   32129           0 :         if (value == NULL) {
   32130           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.sequence_num");
   32131           0 :                 return -1;
   32132             :         }
   32133           0 :         object->out.sequence_num = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sequence_num);
   32134           0 :         if (object->out.sequence_num == NULL) {
   32135           0 :                 PyErr_NoMemory();
   32136           0 :                 return -1;
   32137             :         }
   32138             :         {
   32139           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sequence_num));
   32140           0 :                 if (PyLong_Check(value)) {
   32141           0 :                         unsigned long long test_var;
   32142           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32143           0 :                         if (PyErr_Occurred() != NULL) {
   32144           0 :                                 return -1;
   32145             :                         }
   32146           0 :                         if (test_var > uint_max) {
   32147           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32148             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32149           0 :                                 return -1;
   32150             :                         }
   32151           0 :                         *object->out.sequence_num = test_var;
   32152             :                 } else {
   32153           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32154             :                           PyLong_Type.tp_name);
   32155           0 :                         return -1;
   32156             :                 }
   32157             :         }
   32158           0 :         return 0;
   32159             : }
   32160             : 
   32161           0 : static PyObject *py_netr_DatabaseDeltas_out_get_delta_enum_array(PyObject *obj, void *closure)
   32162             : {
   32163           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   32164           0 :         PyObject *py_delta_enum_array;
   32165           0 :         if (object->out.delta_enum_array == NULL) {
   32166           0 :                 Py_RETURN_NONE;
   32167             :         }
   32168           0 :         if (*object->out.delta_enum_array == NULL) {
   32169           0 :                 py_delta_enum_array = Py_None;
   32170           0 :                 Py_INCREF(py_delta_enum_array);
   32171             :         } else {
   32172           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   32173             :         }
   32174           0 :         return py_delta_enum_array;
   32175             : }
   32176             : 
   32177           0 : static int py_netr_DatabaseDeltas_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   32178             : {
   32179           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32180           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   32181           0 :         if (value == NULL) {
   32182           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.delta_enum_array");
   32183           0 :                 return -1;
   32184             :         }
   32185           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   32186           0 :         if (object->out.delta_enum_array == NULL) {
   32187           0 :                 PyErr_NoMemory();
   32188           0 :                 return -1;
   32189             :         }
   32190           0 :         if (value == Py_None) {
   32191           0 :                 *object->out.delta_enum_array = NULL;
   32192             :         } else {
   32193           0 :                 *object->out.delta_enum_array = NULL;
   32194           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   32195           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32196           0 :                         PyErr_NoMemory();
   32197           0 :                         return -1;
   32198             :                 }
   32199           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   32200             :         }
   32201           0 :         return 0;
   32202             : }
   32203             : 
   32204           0 : static PyObject *py_netr_DatabaseDeltas_in_get_preferredmaximumlength(PyObject *obj, void *closure)
   32205             : {
   32206           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   32207           0 :         PyObject *py_preferredmaximumlength;
   32208           0 :         py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)(object->in.preferredmaximumlength));
   32209           0 :         return py_preferredmaximumlength;
   32210             : }
   32211             : 
   32212           0 : static int py_netr_DatabaseDeltas_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
   32213             : {
   32214           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32215           0 :         if (value == NULL) {
   32216           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.preferredmaximumlength");
   32217           0 :                 return -1;
   32218             :         }
   32219             :         {
   32220           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
   32221           0 :                 if (PyLong_Check(value)) {
   32222           0 :                         unsigned long long test_var;
   32223           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32224           0 :                         if (PyErr_Occurred() != NULL) {
   32225           0 :                                 return -1;
   32226             :                         }
   32227           0 :                         if (test_var > uint_max) {
   32228           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32229             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32230           0 :                                 return -1;
   32231             :                         }
   32232           0 :                         object->in.preferredmaximumlength = test_var;
   32233             :                 } else {
   32234           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32235             :                           PyLong_Type.tp_name);
   32236           0 :                         return -1;
   32237             :                 }
   32238             :         }
   32239           0 :         return 0;
   32240             : }
   32241             : 
   32242           0 : static PyObject *py_netr_DatabaseDeltas_get_result(PyObject *obj, void *closure)
   32243             : {
   32244           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
   32245           0 :         PyObject *py_result;
   32246           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   32247           0 :         return py_result;
   32248             : }
   32249             : 
   32250           0 : static int py_netr_DatabaseDeltas_set_result(PyObject *py_obj, PyObject *value, void *closure)
   32251             : {
   32252           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32253           0 :         if (value == NULL) {
   32254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   32255           0 :                 return -1;
   32256             :         }
   32257           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   32258           0 :         return 0;
   32259             : }
   32260             : 
   32261             : static PyGetSetDef py_netr_DatabaseDeltas_getsetters[] = {
   32262             :         {
   32263             :                 .name = discard_const_p(char, "in_logon_server"),
   32264             :                 .get = py_netr_DatabaseDeltas_in_get_logon_server,
   32265             :                 .set = py_netr_DatabaseDeltas_in_set_logon_server,
   32266             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   32267             :         },
   32268             :         {
   32269             :                 .name = discard_const_p(char, "in_computername"),
   32270             :                 .get = py_netr_DatabaseDeltas_in_get_computername,
   32271             :                 .set = py_netr_DatabaseDeltas_in_set_computername,
   32272             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   32273             :         },
   32274             :         {
   32275             :                 .name = discard_const_p(char, "in_credential"),
   32276             :                 .get = py_netr_DatabaseDeltas_in_get_credential,
   32277             :                 .set = py_netr_DatabaseDeltas_in_set_credential,
   32278             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   32279             :         },
   32280             :         {
   32281             :                 .name = discard_const_p(char, "in_return_authenticator"),
   32282             :                 .get = py_netr_DatabaseDeltas_in_get_return_authenticator,
   32283             :                 .set = py_netr_DatabaseDeltas_in_set_return_authenticator,
   32284             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   32285             :         },
   32286             :         {
   32287             :                 .name = discard_const_p(char, "out_return_authenticator"),
   32288             :                 .get = py_netr_DatabaseDeltas_out_get_return_authenticator,
   32289             :                 .set = py_netr_DatabaseDeltas_out_set_return_authenticator,
   32290             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   32291             :         },
   32292             :         {
   32293             :                 .name = discard_const_p(char, "in_database_id"),
   32294             :                 .get = py_netr_DatabaseDeltas_in_get_database_id,
   32295             :                 .set = py_netr_DatabaseDeltas_in_set_database_id,
   32296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
   32297             :         },
   32298             :         {
   32299             :                 .name = discard_const_p(char, "in_sequence_num"),
   32300             :                 .get = py_netr_DatabaseDeltas_in_get_sequence_num,
   32301             :                 .set = py_netr_DatabaseDeltas_in_set_sequence_num,
   32302             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   32303             :         },
   32304             :         {
   32305             :                 .name = discard_const_p(char, "out_sequence_num"),
   32306             :                 .get = py_netr_DatabaseDeltas_out_get_sequence_num,
   32307             :                 .set = py_netr_DatabaseDeltas_out_set_sequence_num,
   32308             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   32309             :         },
   32310             :         {
   32311             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   32312             :                 .get = py_netr_DatabaseDeltas_out_get_delta_enum_array,
   32313             :                 .set = py_netr_DatabaseDeltas_out_set_delta_enum_array,
   32314             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   32315             :         },
   32316             :         {
   32317             :                 .name = discard_const_p(char, "in_preferredmaximumlength"),
   32318             :                 .get = py_netr_DatabaseDeltas_in_get_preferredmaximumlength,
   32319             :                 .set = py_netr_DatabaseDeltas_in_set_preferredmaximumlength,
   32320             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32321             :         },
   32322             :         {
   32323             :                 .name = discard_const_p(char, "result"),
   32324             :                 .get = py_netr_DatabaseDeltas_get_result,
   32325             :                 .set = py_netr_DatabaseDeltas_set_result,
   32326             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   32327             :         },
   32328             :         { .name = NULL }
   32329             : };
   32330             : 
   32331           0 : static PyObject *py_netr_DatabaseDeltas_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32332             : {
   32333           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseDeltas, type);
   32334           0 :         struct netr_DatabaseDeltas *_self = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(self);
   32335           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   32336           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   32337           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   32338           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   32339           0 :         _self->in.sequence_num = talloc_zero(mem_ctx, uint64_t);
   32340           0 :         _self->out.sequence_num = talloc_zero(mem_ctx, uint64_t);
   32341             :         /* a pointer to a NULL pointer */
   32342           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   32343           0 :         return self;
   32344             : }
   32345             : 
   32346           0 : static PyObject *py_netr_DatabaseDeltas_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   32347             : {
   32348             : 
   32349             : 
   32350           0 :         return PyLong_FromLong(7);
   32351             : }
   32352             : 
   32353           0 : static PyObject *py_netr_DatabaseDeltas_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   32354             : {
   32355           0 :         const struct ndr_interface_call *call = NULL;
   32356           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32357           0 :         PyObject *ret = NULL;
   32358           0 :         struct ndr_push *push = NULL;
   32359           0 :         DATA_BLOB blob;
   32360           0 :         enum ndr_err_code err;
   32361             : 
   32362           0 :         if (ndr_table_netlogon.num_calls < 8) {
   32363           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_pack");
   32364           0 :                 return NULL;
   32365             :         }
   32366           0 :         call = &ndr_table_netlogon.calls[7];
   32367             : 
   32368           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   32369           0 :         if (push == NULL) {
   32370           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32371           0 :                 return NULL;
   32372             :         }
   32373             : 
   32374           0 :         push->flags |= ndr_push_flags;
   32375             : 
   32376           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   32377           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32378           0 :                 TALLOC_FREE(push);
   32379           0 :                 PyErr_SetNdrError(err);
   32380           0 :                 return NULL;
   32381             :         }
   32382           0 :         blob = ndr_push_blob(push);
   32383           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   32384           0 :         TALLOC_FREE(push);
   32385           0 :         return ret;
   32386             : }
   32387             : 
   32388           0 : static PyObject *py_netr_DatabaseDeltas_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32389             : {
   32390           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32391           0 :         PyObject *bigendian_obj = NULL;
   32392           0 :         PyObject *ndr64_obj = NULL;
   32393           0 :         libndr_flags ndr_push_flags = 0;
   32394             : 
   32395           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   32396             :                 discard_const_p(char *, kwnames),
   32397             :                 &bigendian_obj,
   32398             :                 &ndr64_obj)) {
   32399           0 :                 return NULL;
   32400             :         }
   32401             : 
   32402           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32403           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32404             :         }
   32405           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32406           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32407             :         }
   32408             : 
   32409           0 :         return py_netr_DatabaseDeltas_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   32410             : }
   32411             : 
   32412           0 : static PyObject *py_netr_DatabaseDeltas_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32413             : {
   32414           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32415           0 :         PyObject *bigendian_obj = NULL;
   32416           0 :         PyObject *ndr64_obj = NULL;
   32417           0 :         libndr_flags ndr_push_flags = 0;
   32418             : 
   32419           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   32420             :                 discard_const_p(char *, kwnames),
   32421             :                 &bigendian_obj,
   32422             :                 &ndr64_obj)) {
   32423           0 :                 return NULL;
   32424             :         }
   32425             : 
   32426           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32427           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32428             :         }
   32429           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32430           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32431             :         }
   32432             : 
   32433           0 :         return py_netr_DatabaseDeltas_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   32434             : }
   32435             : 
   32436           0 : static PyObject *py_netr_DatabaseDeltas_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   32437             : {
   32438           0 :         const struct ndr_interface_call *call = NULL;
   32439           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32440           0 :         struct ndr_pull *pull = NULL;
   32441           0 :         enum ndr_err_code err;
   32442             : 
   32443           0 :         if (ndr_table_netlogon.num_calls < 8) {
   32444           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_unpack");
   32445           0 :                 return NULL;
   32446             :         }
   32447           0 :         call = &ndr_table_netlogon.calls[7];
   32448             : 
   32449           0 :         pull = ndr_pull_init_blob(blob, object);
   32450           0 :         if (pull == NULL) {
   32451           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32452           0 :                 return NULL;
   32453             :         }
   32454             : 
   32455           0 :         pull->flags |= ndr_pull_flags;
   32456             : 
   32457           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   32458           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32459           0 :                 TALLOC_FREE(pull);
   32460           0 :                 PyErr_SetNdrError(err);
   32461           0 :                 return NULL;
   32462             :         }
   32463           0 :         if (!allow_remaining) {
   32464           0 :                 uint32_t highest_ofs;
   32465             : 
   32466           0 :                 if (pull->offset > pull->relative_highest_offset) {
   32467           0 :                         highest_ofs = pull->offset;
   32468             :                 } else {
   32469           0 :                         highest_ofs = pull->relative_highest_offset;
   32470             :                 }
   32471           0 :                 if (highest_ofs < pull->data_size) {
   32472           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   32473             :                                 "not all bytes consumed ofs[%u] size[%u]",
   32474             :                                 highest_ofs, pull->data_size);
   32475           0 :                         TALLOC_FREE(pull);
   32476           0 :                         PyErr_SetNdrError(err);
   32477           0 :                         return NULL;
   32478             :                 }
   32479             :         }
   32480             : 
   32481           0 :         TALLOC_FREE(pull);
   32482           0 :         Py_RETURN_NONE;
   32483             : }
   32484             : 
   32485           0 : static PyObject *py_netr_DatabaseDeltas_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32486             : {
   32487           0 :         DATA_BLOB blob;
   32488           0 :         Py_ssize_t blob_length = 0;
   32489           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32490           0 :         PyObject *bigendian_obj = NULL;
   32491           0 :         PyObject *ndr64_obj = NULL;
   32492           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32493           0 :         PyObject *allow_remaining_obj = NULL;
   32494           0 :         bool allow_remaining = false;
   32495             : 
   32496           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   32497             :                 discard_const_p(char *, kwnames),
   32498             :                 &blob.data, &blob_length,
   32499             :                 &bigendian_obj,
   32500             :                 &ndr64_obj,
   32501             :                 &allow_remaining_obj)) {
   32502           0 :                 return NULL;
   32503             :         }
   32504           0 :         blob.length = blob_length;
   32505             : 
   32506           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32507           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32508             :         }
   32509           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32510           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32511             :         }
   32512             : 
   32513           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32514           0 :                 allow_remaining = true;
   32515             :         }
   32516             : 
   32517           0 :         return py_netr_DatabaseDeltas_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   32518             : }
   32519             : 
   32520           0 : static PyObject *py_netr_DatabaseDeltas_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32521             : {
   32522           0 :         DATA_BLOB blob;
   32523           0 :         Py_ssize_t blob_length = 0;
   32524           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32525           0 :         PyObject *bigendian_obj = NULL;
   32526           0 :         PyObject *ndr64_obj = NULL;
   32527           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32528           0 :         PyObject *allow_remaining_obj = NULL;
   32529           0 :         bool allow_remaining = false;
   32530             : 
   32531           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   32532             :                 discard_const_p(char *, kwnames),
   32533             :                 &blob.data, &blob_length,
   32534             :                 &bigendian_obj,
   32535             :                 &ndr64_obj,
   32536             :                 &allow_remaining_obj)) {
   32537           0 :                 return NULL;
   32538             :         }
   32539           0 :         blob.length = blob_length;
   32540             : 
   32541           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32542           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32543             :         }
   32544           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32545           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32546             :         }
   32547             : 
   32548           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32549           0 :                 allow_remaining = true;
   32550             :         }
   32551             : 
   32552           0 :         return py_netr_DatabaseDeltas_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   32553             : }
   32554             : 
   32555           0 : static PyObject *py_netr_DatabaseDeltas_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   32556             : {
   32557           0 :         const struct ndr_interface_call *call = NULL;
   32558           0 :         struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
   32559           0 :         PyObject *ret;
   32560           0 :         char *retstr;
   32561             : 
   32562           0 :         if (ndr_table_netlogon.num_calls < 8) {
   32563           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_print");
   32564           0 :                 return NULL;
   32565             :         }
   32566           0 :         call = &ndr_table_netlogon.calls[7];
   32567             : 
   32568           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   32569           0 :         ret = PyUnicode_FromString(retstr);
   32570           0 :         TALLOC_FREE(retstr);
   32571             : 
   32572           0 :         return ret;
   32573             : }
   32574             : 
   32575           0 : static PyObject *py_netr_DatabaseDeltas_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32576             : {
   32577           0 :         return py_netr_DatabaseDeltas_ndr_print(py_obj, "netr_DatabaseDeltas_in", NDR_IN);
   32578             : }
   32579             : 
   32580           0 : static PyObject *py_netr_DatabaseDeltas_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32581             : {
   32582           0 :         return py_netr_DatabaseDeltas_ndr_print(py_obj, "netr_DatabaseDeltas_out", NDR_OUT);
   32583             : }
   32584             : 
   32585             : static PyMethodDef py_netr_DatabaseDeltas_methods[] = {
   32586             :         { "opnum", (PyCFunction)py_netr_DatabaseDeltas_ndr_opnum, METH_NOARGS|METH_CLASS,
   32587             :                 "netlogon.netr_DatabaseDeltas.opnum() -> 7 (0x07) " },
   32588             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   32589             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   32590             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   32591             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   32592             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   32593             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   32594             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   32595             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   32596             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseDeltas_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   32597             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseDeltas_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   32598             :         { NULL, NULL, 0, NULL }
   32599             : };
   32600             : 
   32601             : 
   32602             : static PyTypeObject netr_DatabaseDeltas_Type = {
   32603             :         PyVarObject_HEAD_INIT(NULL, 0)
   32604             :         .tp_name = "netlogon.netr_DatabaseDeltas",
   32605             :         .tp_getset = py_netr_DatabaseDeltas_getsetters,
   32606             :         .tp_methods = py_netr_DatabaseDeltas_methods,
   32607             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32608             :         .tp_new = py_netr_DatabaseDeltas_new,
   32609             : };
   32610             : 
   32611           0 : static bool pack_py_netr_DatabaseDeltas_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseDeltas *r)
   32612             : {
   32613           0 :         PyObject *py_logon_server;
   32614           0 :         PyObject *py_computername;
   32615           0 :         PyObject *py_credential;
   32616           0 :         PyObject *py_return_authenticator;
   32617           0 :         PyObject *py_database_id;
   32618           0 :         PyObject *py_sequence_num;
   32619           0 :         PyObject *py_preferredmaximumlength;
   32620           0 :         const char *kwnames[] = {
   32621             :                 "logon_server", "computername", "credential", "return_authenticator", "database_id", "sequence_num", "preferredmaximumlength", NULL
   32622             :         };
   32623             : 
   32624           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)) {
   32625           0 :                 return false;
   32626             :         }
   32627             : 
   32628           0 :         if (py_logon_server == NULL) {
   32629           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   32630           0 :                 return false;
   32631             :         }
   32632           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   32633           0 :         if (r->in.logon_server == NULL) {
   32634           0 :                 PyErr_NoMemory();
   32635           0 :                 return false;
   32636             :         }
   32637             :         {
   32638           0 :                 const char *test_str;
   32639           0 :                 const char *talloc_str;
   32640           0 :                 PyObject *unicode = NULL;
   32641           0 :                 if (PyUnicode_Check(py_logon_server)) {
   32642           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   32643           0 :                         if (unicode == NULL) {
   32644           0 :                                 return false;
   32645             :                         }
   32646           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32647           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   32648           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   32649             :                 } else {
   32650           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   32651           0 :                         return false;
   32652             :                 }
   32653           0 :                 talloc_str = talloc_strdup(r, test_str);
   32654           0 :                 if (unicode != NULL) {
   32655           0 :                         Py_DECREF(unicode);
   32656             :                 }
   32657           0 :                 if (talloc_str == NULL) {
   32658           0 :                         PyErr_NoMemory();
   32659           0 :                         return false;
   32660             :                 }
   32661           0 :                 r->in.logon_server = talloc_str;
   32662             :         }
   32663           0 :         if (py_computername == NULL) {
   32664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
   32665           0 :                 return false;
   32666             :         }
   32667           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   32668           0 :         if (r->in.computername == NULL) {
   32669           0 :                 PyErr_NoMemory();
   32670           0 :                 return false;
   32671             :         }
   32672             :         {
   32673           0 :                 const char *test_str;
   32674           0 :                 const char *talloc_str;
   32675           0 :                 PyObject *unicode = NULL;
   32676           0 :                 if (PyUnicode_Check(py_computername)) {
   32677           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   32678           0 :                         if (unicode == NULL) {
   32679           0 :                                 return false;
   32680             :                         }
   32681           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32682           0 :                 } else if (PyBytes_Check(py_computername)) {
   32683           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   32684             :                 } else {
   32685           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   32686           0 :                         return false;
   32687             :                 }
   32688           0 :                 talloc_str = talloc_strdup(r, test_str);
   32689           0 :                 if (unicode != NULL) {
   32690           0 :                         Py_DECREF(unicode);
   32691             :                 }
   32692           0 :                 if (talloc_str == NULL) {
   32693           0 :                         PyErr_NoMemory();
   32694           0 :                         return false;
   32695             :                 }
   32696           0 :                 r->in.computername = talloc_str;
   32697             :         }
   32698           0 :         if (py_credential == NULL) {
   32699           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   32700           0 :                 return false;
   32701             :         }
   32702           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   32703           0 :         if (r->in.credential == NULL) {
   32704           0 :                 PyErr_NoMemory();
   32705           0 :                 return false;
   32706             :         }
   32707           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   32708           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   32709           0 :                 PyErr_NoMemory();
   32710           0 :                 return false;
   32711             :         }
   32712           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   32713           0 :         if (py_return_authenticator == NULL) {
   32714           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   32715           0 :                 return false;
   32716             :         }
   32717           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   32718           0 :         if (r->in.return_authenticator == NULL) {
   32719           0 :                 PyErr_NoMemory();
   32720           0 :                 return false;
   32721             :         }
   32722           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   32723           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   32724           0 :                 PyErr_NoMemory();
   32725           0 :                 return false;
   32726             :         }
   32727           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   32728           0 :         if (py_database_id == NULL) {
   32729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.database_id");
   32730           0 :                 return false;
   32731             :         }
   32732             :         {
   32733           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
   32734           0 :                 if (PyLong_Check(py_database_id)) {
   32735           0 :                         unsigned long long test_var;
   32736           0 :                         test_var = PyLong_AsUnsignedLongLong(py_database_id);
   32737           0 :                         if (PyErr_Occurred() != NULL) {
   32738           0 :                                 return false;
   32739             :                         }
   32740           0 :                         if (test_var > uint_max) {
   32741           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32742             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32743           0 :                                 return false;
   32744             :                         }
   32745           0 :                         r->in.database_id = test_var;
   32746             :                 } else {
   32747           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32748             :                           PyLong_Type.tp_name);
   32749           0 :                         return false;
   32750             :                 }
   32751             :         }
   32752           0 :         if (py_sequence_num == NULL) {
   32753           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sequence_num");
   32754           0 :                 return false;
   32755             :         }
   32756           0 :         r->in.sequence_num = talloc_ptrtype(r, r->in.sequence_num);
   32757           0 :         if (r->in.sequence_num == NULL) {
   32758           0 :                 PyErr_NoMemory();
   32759           0 :                 return false;
   32760             :         }
   32761             :         {
   32762           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sequence_num));
   32763           0 :                 if (PyLong_Check(py_sequence_num)) {
   32764           0 :                         unsigned long long test_var;
   32765           0 :                         test_var = PyLong_AsUnsignedLongLong(py_sequence_num);
   32766           0 :                         if (PyErr_Occurred() != NULL) {
   32767           0 :                                 return false;
   32768             :                         }
   32769           0 :                         if (test_var > uint_max) {
   32770           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32771             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32772           0 :                                 return false;
   32773             :                         }
   32774           0 :                         *r->in.sequence_num = test_var;
   32775             :                 } else {
   32776           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32777             :                           PyLong_Type.tp_name);
   32778           0 :                         return false;
   32779             :                 }
   32780             :         }
   32781           0 :         if (py_preferredmaximumlength == NULL) {
   32782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.preferredmaximumlength");
   32783           0 :                 return false;
   32784             :         }
   32785             :         {
   32786           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
   32787           0 :                 if (PyLong_Check(py_preferredmaximumlength)) {
   32788           0 :                         unsigned long long test_var;
   32789           0 :                         test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
   32790           0 :                         if (PyErr_Occurred() != NULL) {
   32791           0 :                                 return false;
   32792             :                         }
   32793           0 :                         if (test_var > uint_max) {
   32794           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32795             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32796           0 :                                 return false;
   32797             :                         }
   32798           0 :                         r->in.preferredmaximumlength = test_var;
   32799             :                 } else {
   32800           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32801             :                           PyLong_Type.tp_name);
   32802           0 :                         return false;
   32803             :                 }
   32804             :         }
   32805           0 :         return true;
   32806             : }
   32807             : 
   32808           0 : static PyObject *unpack_py_netr_DatabaseDeltas_args_out(struct netr_DatabaseDeltas *r)
   32809             : {
   32810           0 :         PyObject *result;
   32811           0 :         PyObject *py_return_authenticator;
   32812           0 :         PyObject *py_sequence_num;
   32813           0 :         PyObject *py_delta_enum_array;
   32814           0 :         result = PyTuple_New(3);
   32815           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   32816           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   32817           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(*r->out.sequence_num);
   32818           0 :         PyTuple_SetItem(result, 1, py_sequence_num);
   32819           0 :         if (*r->out.delta_enum_array == NULL) {
   32820           0 :                 py_delta_enum_array = Py_None;
   32821           0 :                 Py_INCREF(py_delta_enum_array);
   32822             :         } else {
   32823           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   32824             :         }
   32825           0 :         PyTuple_SetItem(result, 2, py_delta_enum_array);
   32826           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   32827           0 :                 PyErr_SetNTSTATUS(r->out.result);
   32828           0 :                 return NULL;
   32829             :         }
   32830             : 
   32831           0 :         return result;
   32832             : }
   32833             : 
   32834             : 
   32835           0 : static PyObject *py_netr_DatabaseSync_in_get_logon_server(PyObject *obj, void *closure)
   32836             : {
   32837           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   32838           0 :         PyObject *py_logon_server;
   32839           0 :         if (object->in.logon_server == NULL) {
   32840           0 :                 Py_RETURN_NONE;
   32841             :         }
   32842           0 :         if (object->in.logon_server == NULL) {
   32843           0 :                 py_logon_server = Py_None;
   32844           0 :                 Py_INCREF(py_logon_server);
   32845             :         } else {
   32846           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   32847             :         }
   32848           0 :         return py_logon_server;
   32849             : }
   32850             : 
   32851           0 : static int py_netr_DatabaseSync_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   32852             : {
   32853           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   32854           0 :         if (value == NULL) {
   32855           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   32856           0 :                 return -1;
   32857             :         }
   32858           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   32859           0 :         if (object->in.logon_server == NULL) {
   32860           0 :                 PyErr_NoMemory();
   32861           0 :                 return -1;
   32862             :         }
   32863             :         {
   32864           0 :                 const char *test_str;
   32865           0 :                 const char *talloc_str;
   32866           0 :                 PyObject *unicode = NULL;
   32867           0 :                 if (PyUnicode_Check(value)) {
   32868           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32869           0 :                         if (unicode == NULL) {
   32870           0 :                                 return -1;
   32871             :                         }
   32872           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32873           0 :                 } else if (PyBytes_Check(value)) {
   32874           0 :                         test_str = PyBytes_AS_STRING(value);
   32875             :                 } else {
   32876           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32877           0 :                         return -1;
   32878             :                 }
   32879           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32880           0 :                 if (unicode != NULL) {
   32881           0 :                         Py_DECREF(unicode);
   32882             :                 }
   32883           0 :                 if (talloc_str == NULL) {
   32884           0 :                         PyErr_NoMemory();
   32885           0 :                         return -1;
   32886             :                 }
   32887           0 :                 object->in.logon_server = talloc_str;
   32888             :         }
   32889           0 :         return 0;
   32890             : }
   32891             : 
   32892           0 : static PyObject *py_netr_DatabaseSync_in_get_computername(PyObject *obj, void *closure)
   32893             : {
   32894           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   32895           0 :         PyObject *py_computername;
   32896           0 :         if (object->in.computername == NULL) {
   32897           0 :                 Py_RETURN_NONE;
   32898             :         }
   32899           0 :         if (object->in.computername == NULL) {
   32900           0 :                 py_computername = Py_None;
   32901           0 :                 Py_INCREF(py_computername);
   32902             :         } else {
   32903           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   32904             :         }
   32905           0 :         return py_computername;
   32906             : }
   32907             : 
   32908           0 : static int py_netr_DatabaseSync_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   32909             : {
   32910           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   32911           0 :         if (value == NULL) {
   32912           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
   32913           0 :                 return -1;
   32914             :         }
   32915           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   32916           0 :         if (object->in.computername == NULL) {
   32917           0 :                 PyErr_NoMemory();
   32918           0 :                 return -1;
   32919             :         }
   32920             :         {
   32921           0 :                 const char *test_str;
   32922           0 :                 const char *talloc_str;
   32923           0 :                 PyObject *unicode = NULL;
   32924           0 :                 if (PyUnicode_Check(value)) {
   32925           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32926           0 :                         if (unicode == NULL) {
   32927           0 :                                 return -1;
   32928             :                         }
   32929           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32930           0 :                 } else if (PyBytes_Check(value)) {
   32931           0 :                         test_str = PyBytes_AS_STRING(value);
   32932             :                 } else {
   32933           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32934           0 :                         return -1;
   32935             :                 }
   32936           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32937           0 :                 if (unicode != NULL) {
   32938           0 :                         Py_DECREF(unicode);
   32939             :                 }
   32940           0 :                 if (talloc_str == NULL) {
   32941           0 :                         PyErr_NoMemory();
   32942           0 :                         return -1;
   32943             :                 }
   32944           0 :                 object->in.computername = talloc_str;
   32945             :         }
   32946           0 :         return 0;
   32947             : }
   32948             : 
   32949           0 : static PyObject *py_netr_DatabaseSync_in_get_credential(PyObject *obj, void *closure)
   32950             : {
   32951           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   32952           0 :         PyObject *py_credential;
   32953           0 :         if (object->in.credential == NULL) {
   32954           0 :                 Py_RETURN_NONE;
   32955             :         }
   32956           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   32957           0 :         return py_credential;
   32958             : }
   32959             : 
   32960           0 : static int py_netr_DatabaseSync_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   32961             : {
   32962           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   32963           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   32964           0 :         if (value == NULL) {
   32965           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   32966           0 :                 return -1;
   32967             :         }
   32968           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   32969           0 :         if (object->in.credential == NULL) {
   32970           0 :                 PyErr_NoMemory();
   32971           0 :                 return -1;
   32972             :         }
   32973           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   32974           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32975           0 :                 PyErr_NoMemory();
   32976           0 :                 return -1;
   32977             :         }
   32978           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   32979           0 :         return 0;
   32980             : }
   32981             : 
   32982           0 : static PyObject *py_netr_DatabaseSync_in_get_return_authenticator(PyObject *obj, void *closure)
   32983             : {
   32984           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   32985           0 :         PyObject *py_return_authenticator;
   32986           0 :         if (object->in.return_authenticator == NULL) {
   32987           0 :                 Py_RETURN_NONE;
   32988             :         }
   32989           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   32990           0 :         return py_return_authenticator;
   32991             : }
   32992             : 
   32993           0 : static int py_netr_DatabaseSync_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   32994             : {
   32995           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   32996           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   32997           0 :         if (value == NULL) {
   32998           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   32999           0 :                 return -1;
   33000             :         }
   33001           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   33002           0 :         if (object->in.return_authenticator == NULL) {
   33003           0 :                 PyErr_NoMemory();
   33004           0 :                 return -1;
   33005             :         }
   33006           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   33007           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33008           0 :                 PyErr_NoMemory();
   33009           0 :                 return -1;
   33010             :         }
   33011           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   33012           0 :         return 0;
   33013             : }
   33014             : 
   33015           0 : static PyObject *py_netr_DatabaseSync_out_get_return_authenticator(PyObject *obj, void *closure)
   33016             : {
   33017           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   33018           0 :         PyObject *py_return_authenticator;
   33019           0 :         if (object->out.return_authenticator == NULL) {
   33020           0 :                 Py_RETURN_NONE;
   33021             :         }
   33022           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   33023           0 :         return py_return_authenticator;
   33024             : }
   33025             : 
   33026           0 : static int py_netr_DatabaseSync_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   33027             : {
   33028           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33029           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   33030           0 :         if (value == NULL) {
   33031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   33032           0 :                 return -1;
   33033             :         }
   33034           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   33035           0 :         if (object->out.return_authenticator == NULL) {
   33036           0 :                 PyErr_NoMemory();
   33037           0 :                 return -1;
   33038             :         }
   33039           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   33040           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33041           0 :                 PyErr_NoMemory();
   33042           0 :                 return -1;
   33043             :         }
   33044           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   33045           0 :         return 0;
   33046             : }
   33047             : 
   33048           0 : static PyObject *py_netr_DatabaseSync_in_get_database_id(PyObject *obj, void *closure)
   33049             : {
   33050           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   33051           0 :         PyObject *py_database_id;
   33052           0 :         py_database_id = PyLong_FromUnsignedLongLong((uint32_t)(object->in.database_id));
   33053           0 :         return py_database_id;
   33054             : }
   33055             : 
   33056           0 : static int py_netr_DatabaseSync_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
   33057             : {
   33058           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33059           0 :         if (value == NULL) {
   33060           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.database_id");
   33061           0 :                 return -1;
   33062             :         }
   33063             :         {
   33064           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
   33065           0 :                 if (PyLong_Check(value)) {
   33066           0 :                         unsigned long long test_var;
   33067           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33068           0 :                         if (PyErr_Occurred() != NULL) {
   33069           0 :                                 return -1;
   33070             :                         }
   33071           0 :                         if (test_var > uint_max) {
   33072           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33073             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33074           0 :                                 return -1;
   33075             :                         }
   33076           0 :                         object->in.database_id = test_var;
   33077             :                 } else {
   33078           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33079             :                           PyLong_Type.tp_name);
   33080           0 :                         return -1;
   33081             :                 }
   33082             :         }
   33083           0 :         return 0;
   33084             : }
   33085             : 
   33086           0 : static PyObject *py_netr_DatabaseSync_in_get_sync_context(PyObject *obj, void *closure)
   33087             : {
   33088           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   33089           0 :         PyObject *py_sync_context;
   33090           0 :         if (object->in.sync_context == NULL) {
   33091           0 :                 Py_RETURN_NONE;
   33092             :         }
   33093           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.sync_context));
   33094           0 :         return py_sync_context;
   33095             : }
   33096             : 
   33097           0 : static int py_netr_DatabaseSync_in_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   33098             : {
   33099           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33100           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sync_context));
   33101           0 :         if (value == NULL) {
   33102           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sync_context");
   33103           0 :                 return -1;
   33104             :         }
   33105           0 :         object->in.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sync_context);
   33106           0 :         if (object->in.sync_context == NULL) {
   33107           0 :                 PyErr_NoMemory();
   33108           0 :                 return -1;
   33109             :         }
   33110             :         {
   33111           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sync_context));
   33112           0 :                 if (PyLong_Check(value)) {
   33113           0 :                         unsigned long long test_var;
   33114           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33115           0 :                         if (PyErr_Occurred() != NULL) {
   33116           0 :                                 return -1;
   33117             :                         }
   33118           0 :                         if (test_var > uint_max) {
   33119           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33120             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33121           0 :                                 return -1;
   33122             :                         }
   33123           0 :                         *object->in.sync_context = test_var;
   33124             :                 } else {
   33125           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33126             :                           PyLong_Type.tp_name);
   33127           0 :                         return -1;
   33128             :                 }
   33129             :         }
   33130           0 :         return 0;
   33131             : }
   33132             : 
   33133           0 : static PyObject *py_netr_DatabaseSync_out_get_sync_context(PyObject *obj, void *closure)
   33134             : {
   33135           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   33136           0 :         PyObject *py_sync_context;
   33137           0 :         if (object->out.sync_context == NULL) {
   33138           0 :                 Py_RETURN_NONE;
   33139             :         }
   33140           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.sync_context));
   33141           0 :         return py_sync_context;
   33142             : }
   33143             : 
   33144           0 : static int py_netr_DatabaseSync_out_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   33145             : {
   33146           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33147           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sync_context));
   33148           0 :         if (value == NULL) {
   33149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.sync_context");
   33150           0 :                 return -1;
   33151             :         }
   33152           0 :         object->out.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sync_context);
   33153           0 :         if (object->out.sync_context == NULL) {
   33154           0 :                 PyErr_NoMemory();
   33155           0 :                 return -1;
   33156             :         }
   33157             :         {
   33158           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sync_context));
   33159           0 :                 if (PyLong_Check(value)) {
   33160           0 :                         unsigned long long test_var;
   33161           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33162           0 :                         if (PyErr_Occurred() != NULL) {
   33163           0 :                                 return -1;
   33164             :                         }
   33165           0 :                         if (test_var > uint_max) {
   33166           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33167             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33168           0 :                                 return -1;
   33169             :                         }
   33170           0 :                         *object->out.sync_context = test_var;
   33171             :                 } else {
   33172           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33173             :                           PyLong_Type.tp_name);
   33174           0 :                         return -1;
   33175             :                 }
   33176             :         }
   33177           0 :         return 0;
   33178             : }
   33179             : 
   33180           0 : static PyObject *py_netr_DatabaseSync_out_get_delta_enum_array(PyObject *obj, void *closure)
   33181             : {
   33182           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   33183           0 :         PyObject *py_delta_enum_array;
   33184           0 :         if (object->out.delta_enum_array == NULL) {
   33185           0 :                 Py_RETURN_NONE;
   33186             :         }
   33187           0 :         if (*object->out.delta_enum_array == NULL) {
   33188           0 :                 py_delta_enum_array = Py_None;
   33189           0 :                 Py_INCREF(py_delta_enum_array);
   33190             :         } else {
   33191           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   33192             :         }
   33193           0 :         return py_delta_enum_array;
   33194             : }
   33195             : 
   33196           0 : static int py_netr_DatabaseSync_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   33197             : {
   33198           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33199           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   33200           0 :         if (value == NULL) {
   33201           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.delta_enum_array");
   33202           0 :                 return -1;
   33203             :         }
   33204           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   33205           0 :         if (object->out.delta_enum_array == NULL) {
   33206           0 :                 PyErr_NoMemory();
   33207           0 :                 return -1;
   33208             :         }
   33209           0 :         if (value == Py_None) {
   33210           0 :                 *object->out.delta_enum_array = NULL;
   33211             :         } else {
   33212           0 :                 *object->out.delta_enum_array = NULL;
   33213           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   33214           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33215           0 :                         PyErr_NoMemory();
   33216           0 :                         return -1;
   33217             :                 }
   33218           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   33219             :         }
   33220           0 :         return 0;
   33221             : }
   33222             : 
   33223           0 : static PyObject *py_netr_DatabaseSync_in_get_preferredmaximumlength(PyObject *obj, void *closure)
   33224             : {
   33225           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   33226           0 :         PyObject *py_preferredmaximumlength;
   33227           0 :         py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)(object->in.preferredmaximumlength));
   33228           0 :         return py_preferredmaximumlength;
   33229             : }
   33230             : 
   33231           0 : static int py_netr_DatabaseSync_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
   33232             : {
   33233           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33234           0 :         if (value == NULL) {
   33235           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.preferredmaximumlength");
   33236           0 :                 return -1;
   33237             :         }
   33238             :         {
   33239           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
   33240           0 :                 if (PyLong_Check(value)) {
   33241           0 :                         unsigned long long test_var;
   33242           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33243           0 :                         if (PyErr_Occurred() != NULL) {
   33244           0 :                                 return -1;
   33245             :                         }
   33246           0 :                         if (test_var > uint_max) {
   33247           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33248             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33249           0 :                                 return -1;
   33250             :                         }
   33251           0 :                         object->in.preferredmaximumlength = test_var;
   33252             :                 } else {
   33253           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33254             :                           PyLong_Type.tp_name);
   33255           0 :                         return -1;
   33256             :                 }
   33257             :         }
   33258           0 :         return 0;
   33259             : }
   33260             : 
   33261           0 : static PyObject *py_netr_DatabaseSync_get_result(PyObject *obj, void *closure)
   33262             : {
   33263           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
   33264           0 :         PyObject *py_result;
   33265           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   33266           0 :         return py_result;
   33267             : }
   33268             : 
   33269           0 : static int py_netr_DatabaseSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
   33270             : {
   33271           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33272           0 :         if (value == NULL) {
   33273           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   33274           0 :                 return -1;
   33275             :         }
   33276           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   33277           0 :         return 0;
   33278             : }
   33279             : 
   33280             : static PyGetSetDef py_netr_DatabaseSync_getsetters[] = {
   33281             :         {
   33282             :                 .name = discard_const_p(char, "in_logon_server"),
   33283             :                 .get = py_netr_DatabaseSync_in_get_logon_server,
   33284             :                 .set = py_netr_DatabaseSync_in_set_logon_server,
   33285             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33286             :         },
   33287             :         {
   33288             :                 .name = discard_const_p(char, "in_computername"),
   33289             :                 .get = py_netr_DatabaseSync_in_get_computername,
   33290             :                 .set = py_netr_DatabaseSync_in_set_computername,
   33291             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33292             :         },
   33293             :         {
   33294             :                 .name = discard_const_p(char, "in_credential"),
   33295             :                 .get = py_netr_DatabaseSync_in_get_credential,
   33296             :                 .set = py_netr_DatabaseSync_in_set_credential,
   33297             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   33298             :         },
   33299             :         {
   33300             :                 .name = discard_const_p(char, "in_return_authenticator"),
   33301             :                 .get = py_netr_DatabaseSync_in_get_return_authenticator,
   33302             :                 .set = py_netr_DatabaseSync_in_set_return_authenticator,
   33303             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   33304             :         },
   33305             :         {
   33306             :                 .name = discard_const_p(char, "out_return_authenticator"),
   33307             :                 .get = py_netr_DatabaseSync_out_get_return_authenticator,
   33308             :                 .set = py_netr_DatabaseSync_out_set_return_authenticator,
   33309             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   33310             :         },
   33311             :         {
   33312             :                 .name = discard_const_p(char, "in_database_id"),
   33313             :                 .get = py_netr_DatabaseSync_in_get_database_id,
   33314             :                 .set = py_netr_DatabaseSync_in_set_database_id,
   33315             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
   33316             :         },
   33317             :         {
   33318             :                 .name = discard_const_p(char, "in_sync_context"),
   33319             :                 .get = py_netr_DatabaseSync_in_get_sync_context,
   33320             :                 .set = py_netr_DatabaseSync_in_set_sync_context,
   33321             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33322             :         },
   33323             :         {
   33324             :                 .name = discard_const_p(char, "out_sync_context"),
   33325             :                 .get = py_netr_DatabaseSync_out_get_sync_context,
   33326             :                 .set = py_netr_DatabaseSync_out_set_sync_context,
   33327             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33328             :         },
   33329             :         {
   33330             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   33331             :                 .get = py_netr_DatabaseSync_out_get_delta_enum_array,
   33332             :                 .set = py_netr_DatabaseSync_out_set_delta_enum_array,
   33333             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   33334             :         },
   33335             :         {
   33336             :                 .name = discard_const_p(char, "in_preferredmaximumlength"),
   33337             :                 .get = py_netr_DatabaseSync_in_get_preferredmaximumlength,
   33338             :                 .set = py_netr_DatabaseSync_in_set_preferredmaximumlength,
   33339             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33340             :         },
   33341             :         {
   33342             :                 .name = discard_const_p(char, "result"),
   33343             :                 .get = py_netr_DatabaseSync_get_result,
   33344             :                 .set = py_netr_DatabaseSync_set_result,
   33345             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   33346             :         },
   33347             :         { .name = NULL }
   33348             : };
   33349             : 
   33350           0 : static PyObject *py_netr_DatabaseSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33351             : {
   33352           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseSync, type);
   33353           0 :         struct netr_DatabaseSync *_self = (struct netr_DatabaseSync *)pytalloc_get_ptr(self);
   33354           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   33355           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   33356           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   33357           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   33358           0 :         _self->in.sync_context = talloc_zero(mem_ctx, uint32_t);
   33359           0 :         _self->out.sync_context = talloc_zero(mem_ctx, uint32_t);
   33360             :         /* a pointer to a NULL pointer */
   33361           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   33362           0 :         return self;
   33363             : }
   33364             : 
   33365           0 : static PyObject *py_netr_DatabaseSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   33366             : {
   33367             : 
   33368             : 
   33369           0 :         return PyLong_FromLong(8);
   33370             : }
   33371             : 
   33372           0 : static PyObject *py_netr_DatabaseSync_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   33373             : {
   33374           0 :         const struct ndr_interface_call *call = NULL;
   33375           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33376           0 :         PyObject *ret = NULL;
   33377           0 :         struct ndr_push *push = NULL;
   33378           0 :         DATA_BLOB blob;
   33379           0 :         enum ndr_err_code err;
   33380             : 
   33381           0 :         if (ndr_table_netlogon.num_calls < 9) {
   33382           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_pack");
   33383           0 :                 return NULL;
   33384             :         }
   33385           0 :         call = &ndr_table_netlogon.calls[8];
   33386             : 
   33387           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   33388           0 :         if (push == NULL) {
   33389           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33390           0 :                 return NULL;
   33391             :         }
   33392             : 
   33393           0 :         push->flags |= ndr_push_flags;
   33394             : 
   33395           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   33396           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33397           0 :                 TALLOC_FREE(push);
   33398           0 :                 PyErr_SetNdrError(err);
   33399           0 :                 return NULL;
   33400             :         }
   33401           0 :         blob = ndr_push_blob(push);
   33402           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   33403           0 :         TALLOC_FREE(push);
   33404           0 :         return ret;
   33405             : }
   33406             : 
   33407           0 : static PyObject *py_netr_DatabaseSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33408             : {
   33409           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33410           0 :         PyObject *bigendian_obj = NULL;
   33411           0 :         PyObject *ndr64_obj = NULL;
   33412           0 :         libndr_flags ndr_push_flags = 0;
   33413             : 
   33414           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   33415             :                 discard_const_p(char *, kwnames),
   33416             :                 &bigendian_obj,
   33417             :                 &ndr64_obj)) {
   33418           0 :                 return NULL;
   33419             :         }
   33420             : 
   33421           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33422           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33423             :         }
   33424           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33425           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33426             :         }
   33427             : 
   33428           0 :         return py_netr_DatabaseSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   33429             : }
   33430             : 
   33431           0 : static PyObject *py_netr_DatabaseSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33432             : {
   33433           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33434           0 :         PyObject *bigendian_obj = NULL;
   33435           0 :         PyObject *ndr64_obj = NULL;
   33436           0 :         libndr_flags ndr_push_flags = 0;
   33437             : 
   33438           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   33439             :                 discard_const_p(char *, kwnames),
   33440             :                 &bigendian_obj,
   33441             :                 &ndr64_obj)) {
   33442           0 :                 return NULL;
   33443             :         }
   33444             : 
   33445           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33446           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33447             :         }
   33448           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33449           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33450             :         }
   33451             : 
   33452           0 :         return py_netr_DatabaseSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   33453             : }
   33454             : 
   33455           0 : static PyObject *py_netr_DatabaseSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   33456             : {
   33457           0 :         const struct ndr_interface_call *call = NULL;
   33458           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33459           0 :         struct ndr_pull *pull = NULL;
   33460           0 :         enum ndr_err_code err;
   33461             : 
   33462           0 :         if (ndr_table_netlogon.num_calls < 9) {
   33463           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_unpack");
   33464           0 :                 return NULL;
   33465             :         }
   33466           0 :         call = &ndr_table_netlogon.calls[8];
   33467             : 
   33468           0 :         pull = ndr_pull_init_blob(blob, object);
   33469           0 :         if (pull == NULL) {
   33470           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33471           0 :                 return NULL;
   33472             :         }
   33473             : 
   33474           0 :         pull->flags |= ndr_pull_flags;
   33475             : 
   33476           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   33477           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33478           0 :                 TALLOC_FREE(pull);
   33479           0 :                 PyErr_SetNdrError(err);
   33480           0 :                 return NULL;
   33481             :         }
   33482           0 :         if (!allow_remaining) {
   33483           0 :                 uint32_t highest_ofs;
   33484             : 
   33485           0 :                 if (pull->offset > pull->relative_highest_offset) {
   33486           0 :                         highest_ofs = pull->offset;
   33487             :                 } else {
   33488           0 :                         highest_ofs = pull->relative_highest_offset;
   33489             :                 }
   33490           0 :                 if (highest_ofs < pull->data_size) {
   33491           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   33492             :                                 "not all bytes consumed ofs[%u] size[%u]",
   33493             :                                 highest_ofs, pull->data_size);
   33494           0 :                         TALLOC_FREE(pull);
   33495           0 :                         PyErr_SetNdrError(err);
   33496           0 :                         return NULL;
   33497             :                 }
   33498             :         }
   33499             : 
   33500           0 :         TALLOC_FREE(pull);
   33501           0 :         Py_RETURN_NONE;
   33502             : }
   33503             : 
   33504           0 : static PyObject *py_netr_DatabaseSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33505             : {
   33506           0 :         DATA_BLOB blob;
   33507           0 :         Py_ssize_t blob_length = 0;
   33508           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33509           0 :         PyObject *bigendian_obj = NULL;
   33510           0 :         PyObject *ndr64_obj = NULL;
   33511           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33512           0 :         PyObject *allow_remaining_obj = NULL;
   33513           0 :         bool allow_remaining = false;
   33514             : 
   33515           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   33516             :                 discard_const_p(char *, kwnames),
   33517             :                 &blob.data, &blob_length,
   33518             :                 &bigendian_obj,
   33519             :                 &ndr64_obj,
   33520             :                 &allow_remaining_obj)) {
   33521           0 :                 return NULL;
   33522             :         }
   33523           0 :         blob.length = blob_length;
   33524             : 
   33525           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33526           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33527             :         }
   33528           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33529           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33530             :         }
   33531             : 
   33532           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33533           0 :                 allow_remaining = true;
   33534             :         }
   33535             : 
   33536           0 :         return py_netr_DatabaseSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   33537             : }
   33538             : 
   33539           0 : static PyObject *py_netr_DatabaseSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33540             : {
   33541           0 :         DATA_BLOB blob;
   33542           0 :         Py_ssize_t blob_length = 0;
   33543           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33544           0 :         PyObject *bigendian_obj = NULL;
   33545           0 :         PyObject *ndr64_obj = NULL;
   33546           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33547           0 :         PyObject *allow_remaining_obj = NULL;
   33548           0 :         bool allow_remaining = false;
   33549             : 
   33550           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   33551             :                 discard_const_p(char *, kwnames),
   33552             :                 &blob.data, &blob_length,
   33553             :                 &bigendian_obj,
   33554             :                 &ndr64_obj,
   33555             :                 &allow_remaining_obj)) {
   33556           0 :                 return NULL;
   33557             :         }
   33558           0 :         blob.length = blob_length;
   33559             : 
   33560           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33561           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33562             :         }
   33563           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33564           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33565             :         }
   33566             : 
   33567           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33568           0 :                 allow_remaining = true;
   33569             :         }
   33570             : 
   33571           0 :         return py_netr_DatabaseSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   33572             : }
   33573             : 
   33574           0 : static PyObject *py_netr_DatabaseSync_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   33575             : {
   33576           0 :         const struct ndr_interface_call *call = NULL;
   33577           0 :         struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
   33578           0 :         PyObject *ret;
   33579           0 :         char *retstr;
   33580             : 
   33581           0 :         if (ndr_table_netlogon.num_calls < 9) {
   33582           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_print");
   33583           0 :                 return NULL;
   33584             :         }
   33585           0 :         call = &ndr_table_netlogon.calls[8];
   33586             : 
   33587           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   33588           0 :         ret = PyUnicode_FromString(retstr);
   33589           0 :         TALLOC_FREE(retstr);
   33590             : 
   33591           0 :         return ret;
   33592             : }
   33593             : 
   33594           0 : static PyObject *py_netr_DatabaseSync_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33595             : {
   33596           0 :         return py_netr_DatabaseSync_ndr_print(py_obj, "netr_DatabaseSync_in", NDR_IN);
   33597             : }
   33598             : 
   33599           0 : static PyObject *py_netr_DatabaseSync_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33600             : {
   33601           0 :         return py_netr_DatabaseSync_ndr_print(py_obj, "netr_DatabaseSync_out", NDR_OUT);
   33602             : }
   33603             : 
   33604             : static PyMethodDef py_netr_DatabaseSync_methods[] = {
   33605             :         { "opnum", (PyCFunction)py_netr_DatabaseSync_ndr_opnum, METH_NOARGS|METH_CLASS,
   33606             :                 "netlogon.netr_DatabaseSync.opnum() -> 8 (0x08) " },
   33607             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   33608             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   33609             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   33610             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   33611             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   33612             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   33613             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   33614             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   33615             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseSync_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   33616             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseSync_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   33617             :         { NULL, NULL, 0, NULL }
   33618             : };
   33619             : 
   33620             : 
   33621             : static PyTypeObject netr_DatabaseSync_Type = {
   33622             :         PyVarObject_HEAD_INIT(NULL, 0)
   33623             :         .tp_name = "netlogon.netr_DatabaseSync",
   33624             :         .tp_getset = py_netr_DatabaseSync_getsetters,
   33625             :         .tp_methods = py_netr_DatabaseSync_methods,
   33626             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33627             :         .tp_new = py_netr_DatabaseSync_new,
   33628             : };
   33629             : 
   33630           0 : static bool pack_py_netr_DatabaseSync_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseSync *r)
   33631             : {
   33632           0 :         PyObject *py_logon_server;
   33633           0 :         PyObject *py_computername;
   33634           0 :         PyObject *py_credential;
   33635           0 :         PyObject *py_return_authenticator;
   33636           0 :         PyObject *py_database_id;
   33637           0 :         PyObject *py_sync_context;
   33638           0 :         PyObject *py_preferredmaximumlength;
   33639           0 :         const char *kwnames[] = {
   33640             :                 "logon_server", "computername", "credential", "return_authenticator", "database_id", "sync_context", "preferredmaximumlength", NULL
   33641             :         };
   33642             : 
   33643           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)) {
   33644           0 :                 return false;
   33645             :         }
   33646             : 
   33647           0 :         if (py_logon_server == NULL) {
   33648           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   33649           0 :                 return false;
   33650             :         }
   33651           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   33652           0 :         if (r->in.logon_server == NULL) {
   33653           0 :                 PyErr_NoMemory();
   33654           0 :                 return false;
   33655             :         }
   33656             :         {
   33657           0 :                 const char *test_str;
   33658           0 :                 const char *talloc_str;
   33659           0 :                 PyObject *unicode = NULL;
   33660           0 :                 if (PyUnicode_Check(py_logon_server)) {
   33661           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   33662           0 :                         if (unicode == NULL) {
   33663           0 :                                 return false;
   33664             :                         }
   33665           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33666           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   33667           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   33668             :                 } else {
   33669           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   33670           0 :                         return false;
   33671             :                 }
   33672           0 :                 talloc_str = talloc_strdup(r, test_str);
   33673           0 :                 if (unicode != NULL) {
   33674           0 :                         Py_DECREF(unicode);
   33675             :                 }
   33676           0 :                 if (talloc_str == NULL) {
   33677           0 :                         PyErr_NoMemory();
   33678           0 :                         return false;
   33679             :                 }
   33680           0 :                 r->in.logon_server = talloc_str;
   33681             :         }
   33682           0 :         if (py_computername == NULL) {
   33683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
   33684           0 :                 return false;
   33685             :         }
   33686           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   33687           0 :         if (r->in.computername == NULL) {
   33688           0 :                 PyErr_NoMemory();
   33689           0 :                 return false;
   33690             :         }
   33691             :         {
   33692           0 :                 const char *test_str;
   33693           0 :                 const char *talloc_str;
   33694           0 :                 PyObject *unicode = NULL;
   33695           0 :                 if (PyUnicode_Check(py_computername)) {
   33696           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   33697           0 :                         if (unicode == NULL) {
   33698           0 :                                 return false;
   33699             :                         }
   33700           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33701           0 :                 } else if (PyBytes_Check(py_computername)) {
   33702           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   33703             :                 } else {
   33704           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   33705           0 :                         return false;
   33706             :                 }
   33707           0 :                 talloc_str = talloc_strdup(r, test_str);
   33708           0 :                 if (unicode != NULL) {
   33709           0 :                         Py_DECREF(unicode);
   33710             :                 }
   33711           0 :                 if (talloc_str == NULL) {
   33712           0 :                         PyErr_NoMemory();
   33713           0 :                         return false;
   33714             :                 }
   33715           0 :                 r->in.computername = talloc_str;
   33716             :         }
   33717           0 :         if (py_credential == NULL) {
   33718           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   33719           0 :                 return false;
   33720             :         }
   33721           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   33722           0 :         if (r->in.credential == NULL) {
   33723           0 :                 PyErr_NoMemory();
   33724           0 :                 return false;
   33725             :         }
   33726           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   33727           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   33728           0 :                 PyErr_NoMemory();
   33729           0 :                 return false;
   33730             :         }
   33731           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   33732           0 :         if (py_return_authenticator == NULL) {
   33733           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   33734           0 :                 return false;
   33735             :         }
   33736           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   33737           0 :         if (r->in.return_authenticator == NULL) {
   33738           0 :                 PyErr_NoMemory();
   33739           0 :                 return false;
   33740             :         }
   33741           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   33742           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   33743           0 :                 PyErr_NoMemory();
   33744           0 :                 return false;
   33745             :         }
   33746           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   33747           0 :         if (py_database_id == NULL) {
   33748           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.database_id");
   33749           0 :                 return false;
   33750             :         }
   33751             :         {
   33752           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
   33753           0 :                 if (PyLong_Check(py_database_id)) {
   33754           0 :                         unsigned long long test_var;
   33755           0 :                         test_var = PyLong_AsUnsignedLongLong(py_database_id);
   33756           0 :                         if (PyErr_Occurred() != NULL) {
   33757           0 :                                 return false;
   33758             :                         }
   33759           0 :                         if (test_var > uint_max) {
   33760           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33761             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33762           0 :                                 return false;
   33763             :                         }
   33764           0 :                         r->in.database_id = test_var;
   33765             :                 } else {
   33766           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33767             :                           PyLong_Type.tp_name);
   33768           0 :                         return false;
   33769             :                 }
   33770             :         }
   33771           0 :         if (py_sync_context == NULL) {
   33772           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sync_context");
   33773           0 :                 return false;
   33774             :         }
   33775           0 :         r->in.sync_context = talloc_ptrtype(r, r->in.sync_context);
   33776           0 :         if (r->in.sync_context == NULL) {
   33777           0 :                 PyErr_NoMemory();
   33778           0 :                 return false;
   33779             :         }
   33780             :         {
   33781           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sync_context));
   33782           0 :                 if (PyLong_Check(py_sync_context)) {
   33783           0 :                         unsigned long long test_var;
   33784           0 :                         test_var = PyLong_AsUnsignedLongLong(py_sync_context);
   33785           0 :                         if (PyErr_Occurred() != NULL) {
   33786           0 :                                 return false;
   33787             :                         }
   33788           0 :                         if (test_var > uint_max) {
   33789           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33790             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33791           0 :                                 return false;
   33792             :                         }
   33793           0 :                         *r->in.sync_context = test_var;
   33794             :                 } else {
   33795           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33796             :                           PyLong_Type.tp_name);
   33797           0 :                         return false;
   33798             :                 }
   33799             :         }
   33800           0 :         if (py_preferredmaximumlength == NULL) {
   33801           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.preferredmaximumlength");
   33802           0 :                 return false;
   33803             :         }
   33804             :         {
   33805           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
   33806           0 :                 if (PyLong_Check(py_preferredmaximumlength)) {
   33807           0 :                         unsigned long long test_var;
   33808           0 :                         test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
   33809           0 :                         if (PyErr_Occurred() != NULL) {
   33810           0 :                                 return false;
   33811             :                         }
   33812           0 :                         if (test_var > uint_max) {
   33813           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33814             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33815           0 :                                 return false;
   33816             :                         }
   33817           0 :                         r->in.preferredmaximumlength = test_var;
   33818             :                 } else {
   33819           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33820             :                           PyLong_Type.tp_name);
   33821           0 :                         return false;
   33822             :                 }
   33823             :         }
   33824           0 :         return true;
   33825             : }
   33826             : 
   33827           0 : static PyObject *unpack_py_netr_DatabaseSync_args_out(struct netr_DatabaseSync *r)
   33828             : {
   33829           0 :         PyObject *result;
   33830           0 :         PyObject *py_return_authenticator;
   33831           0 :         PyObject *py_sync_context;
   33832           0 :         PyObject *py_delta_enum_array;
   33833           0 :         result = PyTuple_New(3);
   33834           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   33835           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   33836           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.sync_context));
   33837           0 :         PyTuple_SetItem(result, 1, py_sync_context);
   33838           0 :         if (*r->out.delta_enum_array == NULL) {
   33839           0 :                 py_delta_enum_array = Py_None;
   33840           0 :                 Py_INCREF(py_delta_enum_array);
   33841             :         } else {
   33842           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   33843             :         }
   33844           0 :         PyTuple_SetItem(result, 2, py_delta_enum_array);
   33845           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   33846           0 :                 PyErr_SetNTSTATUS(r->out.result);
   33847           0 :                 return NULL;
   33848             :         }
   33849             : 
   33850           0 :         return result;
   33851             : }
   33852             : 
   33853             : 
   33854           0 : static PyObject *py_netr_AccountDeltas_in_get_logon_server(PyObject *obj, void *closure)
   33855             : {
   33856           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   33857           0 :         PyObject *py_logon_server;
   33858           0 :         if (object->in.logon_server == NULL) {
   33859           0 :                 Py_RETURN_NONE;
   33860             :         }
   33861           0 :         if (object->in.logon_server == NULL) {
   33862           0 :                 py_logon_server = Py_None;
   33863           0 :                 Py_INCREF(py_logon_server);
   33864             :         } else {
   33865           0 :                 if (object->in.logon_server == NULL) {
   33866           0 :                         py_logon_server = Py_None;
   33867           0 :                         Py_INCREF(py_logon_server);
   33868             :                 } else {
   33869           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   33870             :                 }
   33871             :         }
   33872           0 :         return py_logon_server;
   33873             : }
   33874             : 
   33875           0 : static int py_netr_AccountDeltas_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   33876             : {
   33877           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   33878           0 :         if (value == NULL) {
   33879           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   33880           0 :                 return -1;
   33881             :         }
   33882           0 :         if (value == Py_None) {
   33883           0 :                 object->in.logon_server = NULL;
   33884             :         } else {
   33885           0 :                 object->in.logon_server = NULL;
   33886             :                 {
   33887           0 :                         const char *test_str;
   33888           0 :                         const char *talloc_str;
   33889           0 :                         PyObject *unicode = NULL;
   33890           0 :                         if (PyUnicode_Check(value)) {
   33891           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33892           0 :                                 if (unicode == NULL) {
   33893           0 :                                         return -1;
   33894             :                                 }
   33895           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   33896           0 :                         } else if (PyBytes_Check(value)) {
   33897           0 :                                 test_str = PyBytes_AS_STRING(value);
   33898             :                         } else {
   33899           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33900           0 :                                 return -1;
   33901             :                         }
   33902           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33903           0 :                         if (unicode != NULL) {
   33904           0 :                                 Py_DECREF(unicode);
   33905             :                         }
   33906           0 :                         if (talloc_str == NULL) {
   33907           0 :                                 PyErr_NoMemory();
   33908           0 :                                 return -1;
   33909             :                         }
   33910           0 :                         object->in.logon_server = talloc_str;
   33911             :                 }
   33912             :         }
   33913           0 :         return 0;
   33914             : }
   33915             : 
   33916           0 : static PyObject *py_netr_AccountDeltas_in_get_computername(PyObject *obj, void *closure)
   33917             : {
   33918           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   33919           0 :         PyObject *py_computername;
   33920           0 :         if (object->in.computername == NULL) {
   33921           0 :                 Py_RETURN_NONE;
   33922             :         }
   33923           0 :         if (object->in.computername == NULL) {
   33924           0 :                 py_computername = Py_None;
   33925           0 :                 Py_INCREF(py_computername);
   33926             :         } else {
   33927           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   33928             :         }
   33929           0 :         return py_computername;
   33930             : }
   33931             : 
   33932           0 : static int py_netr_AccountDeltas_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   33933             : {
   33934           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   33935           0 :         if (value == NULL) {
   33936           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
   33937           0 :                 return -1;
   33938             :         }
   33939           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   33940           0 :         if (object->in.computername == NULL) {
   33941           0 :                 PyErr_NoMemory();
   33942           0 :                 return -1;
   33943             :         }
   33944             :         {
   33945           0 :                 const char *test_str;
   33946           0 :                 const char *talloc_str;
   33947           0 :                 PyObject *unicode = NULL;
   33948           0 :                 if (PyUnicode_Check(value)) {
   33949           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33950           0 :                         if (unicode == NULL) {
   33951           0 :                                 return -1;
   33952             :                         }
   33953           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33954           0 :                 } else if (PyBytes_Check(value)) {
   33955           0 :                         test_str = PyBytes_AS_STRING(value);
   33956             :                 } else {
   33957           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33958           0 :                         return -1;
   33959             :                 }
   33960           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33961           0 :                 if (unicode != NULL) {
   33962           0 :                         Py_DECREF(unicode);
   33963             :                 }
   33964           0 :                 if (talloc_str == NULL) {
   33965           0 :                         PyErr_NoMemory();
   33966           0 :                         return -1;
   33967             :                 }
   33968           0 :                 object->in.computername = talloc_str;
   33969             :         }
   33970           0 :         return 0;
   33971             : }
   33972             : 
   33973           0 : static PyObject *py_netr_AccountDeltas_in_get_credential(PyObject *obj, void *closure)
   33974             : {
   33975           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   33976           0 :         PyObject *py_credential;
   33977           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, pytalloc_get_mem_ctx(obj), &object->in.credential);
   33978           0 :         return py_credential;
   33979             : }
   33980             : 
   33981           0 : static int py_netr_AccountDeltas_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   33982             : {
   33983           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   33984           0 :         if (value == NULL) {
   33985           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   33986           0 :                 return -1;
   33987             :         }
   33988           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   33989           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33990           0 :                 PyErr_NoMemory();
   33991           0 :                 return -1;
   33992             :         }
   33993           0 :         object->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(value);
   33994           0 :         return 0;
   33995             : }
   33996             : 
   33997           0 : static PyObject *py_netr_AccountDeltas_in_get_return_authenticator(PyObject *obj, void *closure)
   33998             : {
   33999           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34000           0 :         PyObject *py_return_authenticator;
   34001           0 :         if (object->in.return_authenticator == NULL) {
   34002           0 :                 Py_RETURN_NONE;
   34003             :         }
   34004           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   34005           0 :         return py_return_authenticator;
   34006             : }
   34007             : 
   34008           0 : static int py_netr_AccountDeltas_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   34009             : {
   34010           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34011           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   34012           0 :         if (value == NULL) {
   34013           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   34014           0 :                 return -1;
   34015             :         }
   34016           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   34017           0 :         if (object->in.return_authenticator == NULL) {
   34018           0 :                 PyErr_NoMemory();
   34019           0 :                 return -1;
   34020             :         }
   34021           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   34022           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34023           0 :                 PyErr_NoMemory();
   34024           0 :                 return -1;
   34025             :         }
   34026           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   34027           0 :         return 0;
   34028             : }
   34029             : 
   34030           0 : static PyObject *py_netr_AccountDeltas_out_get_return_authenticator(PyObject *obj, void *closure)
   34031             : {
   34032           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34033           0 :         PyObject *py_return_authenticator;
   34034           0 :         if (object->out.return_authenticator == NULL) {
   34035           0 :                 Py_RETURN_NONE;
   34036             :         }
   34037           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   34038           0 :         return py_return_authenticator;
   34039             : }
   34040             : 
   34041           0 : static int py_netr_AccountDeltas_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   34042             : {
   34043           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34044           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   34045           0 :         if (value == NULL) {
   34046           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   34047           0 :                 return -1;
   34048             :         }
   34049           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   34050           0 :         if (object->out.return_authenticator == NULL) {
   34051           0 :                 PyErr_NoMemory();
   34052           0 :                 return -1;
   34053             :         }
   34054           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   34055           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34056           0 :                 PyErr_NoMemory();
   34057           0 :                 return -1;
   34058             :         }
   34059           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   34060           0 :         return 0;
   34061             : }
   34062             : 
   34063           0 : static PyObject *py_netr_AccountDeltas_in_get_uas(PyObject *obj, void *closure)
   34064             : {
   34065           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34066           0 :         PyObject *py_uas;
   34067           0 :         py_uas = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, pytalloc_get_mem_ctx(obj), &object->in.uas);
   34068           0 :         return py_uas;
   34069             : }
   34070             : 
   34071           0 : static int py_netr_AccountDeltas_in_set_uas(PyObject *py_obj, PyObject *value, void *closure)
   34072             : {
   34073           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34074           0 :         if (value == NULL) {
   34075           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.uas");
   34076           0 :                 return -1;
   34077             :         }
   34078           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   34079           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34080           0 :                 PyErr_NoMemory();
   34081           0 :                 return -1;
   34082             :         }
   34083           0 :         object->in.uas = *(struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   34084           0 :         return 0;
   34085             : }
   34086             : 
   34087           0 : static PyObject *py_netr_AccountDeltas_in_get_count(PyObject *obj, void *closure)
   34088             : {
   34089           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34090           0 :         PyObject *py_count;
   34091           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->in.count));
   34092           0 :         return py_count;
   34093             : }
   34094             : 
   34095           0 : static int py_netr_AccountDeltas_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
   34096             : {
   34097           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34098           0 :         if (value == NULL) {
   34099           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.count");
   34100           0 :                 return -1;
   34101             :         }
   34102             :         {
   34103           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
   34104           0 :                 if (PyLong_Check(value)) {
   34105           0 :                         unsigned long long test_var;
   34106           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34107           0 :                         if (PyErr_Occurred() != NULL) {
   34108           0 :                                 return -1;
   34109             :                         }
   34110           0 :                         if (test_var > uint_max) {
   34111           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34112             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34113           0 :                                 return -1;
   34114             :                         }
   34115           0 :                         object->in.count = test_var;
   34116             :                 } else {
   34117           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34118             :                           PyLong_Type.tp_name);
   34119           0 :                         return -1;
   34120             :                 }
   34121             :         }
   34122           0 :         return 0;
   34123             : }
   34124             : 
   34125           0 : static PyObject *py_netr_AccountDeltas_in_get_level(PyObject *obj, void *closure)
   34126             : {
   34127           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34128           0 :         PyObject *py_level;
   34129           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   34130           0 :         return py_level;
   34131             : }
   34132             : 
   34133           0 : static int py_netr_AccountDeltas_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   34134             : {
   34135           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34136           0 :         if (value == NULL) {
   34137           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   34138           0 :                 return -1;
   34139             :         }
   34140             :         {
   34141           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   34142           0 :                 if (PyLong_Check(value)) {
   34143           0 :                         unsigned long long test_var;
   34144           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34145           0 :                         if (PyErr_Occurred() != NULL) {
   34146           0 :                                 return -1;
   34147             :                         }
   34148           0 :                         if (test_var > uint_max) {
   34149           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34150             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34151           0 :                                 return -1;
   34152             :                         }
   34153           0 :                         object->in.level = test_var;
   34154             :                 } else {
   34155           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34156             :                           PyLong_Type.tp_name);
   34157           0 :                         return -1;
   34158             :                 }
   34159             :         }
   34160           0 :         return 0;
   34161             : }
   34162             : 
   34163           0 : static PyObject *py_netr_AccountDeltas_in_get_buffersize(PyObject *obj, void *closure)
   34164             : {
   34165           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34166           0 :         PyObject *py_buffersize;
   34167           0 :         py_buffersize = PyLong_FromUnsignedLongLong((uint32_t)(object->in.buffersize));
   34168           0 :         return py_buffersize;
   34169             : }
   34170             : 
   34171           0 : static int py_netr_AccountDeltas_in_set_buffersize(PyObject *py_obj, PyObject *value, void *closure)
   34172             : {
   34173           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34174           0 :         if (value == NULL) {
   34175           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.buffersize");
   34176           0 :                 return -1;
   34177             :         }
   34178             :         {
   34179           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffersize));
   34180           0 :                 if (PyLong_Check(value)) {
   34181           0 :                         unsigned long long test_var;
   34182           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34183           0 :                         if (PyErr_Occurred() != NULL) {
   34184           0 :                                 return -1;
   34185             :                         }
   34186           0 :                         if (test_var > uint_max) {
   34187           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34188             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34189           0 :                                 return -1;
   34190             :                         }
   34191           0 :                         object->in.buffersize = test_var;
   34192             :                 } else {
   34193           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34194             :                           PyLong_Type.tp_name);
   34195           0 :                         return -1;
   34196             :                 }
   34197             :         }
   34198           0 :         return 0;
   34199             : }
   34200             : 
   34201           0 : static PyObject *py_netr_AccountDeltas_out_get_buffer(PyObject *obj, void *closure)
   34202             : {
   34203           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34204           0 :         PyObject *py_buffer;
   34205           0 :         if (object->out.buffer == NULL) {
   34206           0 :                 Py_RETURN_NONE;
   34207             :         }
   34208           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, object->out.buffer, object->out.buffer);
   34209           0 :         return py_buffer;
   34210             : }
   34211             : 
   34212           0 : static int py_netr_AccountDeltas_out_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   34213             : {
   34214           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34215           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.buffer));
   34216           0 :         if (value == NULL) {
   34217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.buffer");
   34218           0 :                 return -1;
   34219             :         }
   34220           0 :         object->out.buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.buffer);
   34221           0 :         if (object->out.buffer == NULL) {
   34222           0 :                 PyErr_NoMemory();
   34223           0 :                 return -1;
   34224             :         }
   34225           0 :         PY_CHECK_TYPE(&netr_AccountBuffer_Type, value, return -1;);
   34226           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34227           0 :                 PyErr_NoMemory();
   34228           0 :                 return -1;
   34229             :         }
   34230           0 :         object->out.buffer = (struct netr_AccountBuffer *)pytalloc_get_ptr(value);
   34231           0 :         return 0;
   34232             : }
   34233             : 
   34234           0 : static PyObject *py_netr_AccountDeltas_out_get_count_returned(PyObject *obj, void *closure)
   34235             : {
   34236           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34237           0 :         PyObject *py_count_returned;
   34238           0 :         if (object->out.count_returned == NULL) {
   34239           0 :                 Py_RETURN_NONE;
   34240             :         }
   34241           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.count_returned));
   34242           0 :         return py_count_returned;
   34243             : }
   34244             : 
   34245           0 : static int py_netr_AccountDeltas_out_set_count_returned(PyObject *py_obj, PyObject *value, void *closure)
   34246             : {
   34247           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34248           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.count_returned));
   34249           0 :         if (value == NULL) {
   34250           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.count_returned");
   34251           0 :                 return -1;
   34252             :         }
   34253           0 :         object->out.count_returned = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.count_returned);
   34254           0 :         if (object->out.count_returned == NULL) {
   34255           0 :                 PyErr_NoMemory();
   34256           0 :                 return -1;
   34257             :         }
   34258             :         {
   34259           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.count_returned));
   34260           0 :                 if (PyLong_Check(value)) {
   34261           0 :                         unsigned long long test_var;
   34262           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34263           0 :                         if (PyErr_Occurred() != NULL) {
   34264           0 :                                 return -1;
   34265             :                         }
   34266           0 :                         if (test_var > uint_max) {
   34267           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34268             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34269           0 :                                 return -1;
   34270             :                         }
   34271           0 :                         *object->out.count_returned = test_var;
   34272             :                 } else {
   34273           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34274             :                           PyLong_Type.tp_name);
   34275           0 :                         return -1;
   34276             :                 }
   34277             :         }
   34278           0 :         return 0;
   34279             : }
   34280             : 
   34281           0 : static PyObject *py_netr_AccountDeltas_out_get_total_entries(PyObject *obj, void *closure)
   34282             : {
   34283           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34284           0 :         PyObject *py_total_entries;
   34285           0 :         if (object->out.total_entries == NULL) {
   34286           0 :                 Py_RETURN_NONE;
   34287             :         }
   34288           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.total_entries));
   34289           0 :         return py_total_entries;
   34290             : }
   34291             : 
   34292           0 : static int py_netr_AccountDeltas_out_set_total_entries(PyObject *py_obj, PyObject *value, void *closure)
   34293             : {
   34294           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34295           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total_entries));
   34296           0 :         if (value == NULL) {
   34297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.total_entries");
   34298           0 :                 return -1;
   34299             :         }
   34300           0 :         object->out.total_entries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total_entries);
   34301           0 :         if (object->out.total_entries == NULL) {
   34302           0 :                 PyErr_NoMemory();
   34303           0 :                 return -1;
   34304             :         }
   34305             :         {
   34306           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total_entries));
   34307           0 :                 if (PyLong_Check(value)) {
   34308           0 :                         unsigned long long test_var;
   34309           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34310           0 :                         if (PyErr_Occurred() != NULL) {
   34311           0 :                                 return -1;
   34312             :                         }
   34313           0 :                         if (test_var > uint_max) {
   34314           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34315             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34316           0 :                                 return -1;
   34317             :                         }
   34318           0 :                         *object->out.total_entries = test_var;
   34319             :                 } else {
   34320           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34321             :                           PyLong_Type.tp_name);
   34322           0 :                         return -1;
   34323             :                 }
   34324             :         }
   34325           0 :         return 0;
   34326             : }
   34327             : 
   34328           0 : static PyObject *py_netr_AccountDeltas_out_get_recordid(PyObject *obj, void *closure)
   34329             : {
   34330           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34331           0 :         PyObject *py_recordid;
   34332           0 :         if (object->out.recordid == NULL) {
   34333           0 :                 Py_RETURN_NONE;
   34334             :         }
   34335           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->out.recordid, object->out.recordid);
   34336           0 :         return py_recordid;
   34337             : }
   34338             : 
   34339           0 : static int py_netr_AccountDeltas_out_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
   34340             : {
   34341           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34342           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.recordid));
   34343           0 :         if (value == NULL) {
   34344           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.recordid");
   34345           0 :                 return -1;
   34346             :         }
   34347           0 :         object->out.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.recordid);
   34348           0 :         if (object->out.recordid == NULL) {
   34349           0 :                 PyErr_NoMemory();
   34350           0 :                 return -1;
   34351             :         }
   34352           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   34353           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34354           0 :                 PyErr_NoMemory();
   34355           0 :                 return -1;
   34356             :         }
   34357           0 :         object->out.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   34358           0 :         return 0;
   34359             : }
   34360             : 
   34361           0 : static PyObject *py_netr_AccountDeltas_get_result(PyObject *obj, void *closure)
   34362             : {
   34363           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
   34364           0 :         PyObject *py_result;
   34365           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   34366           0 :         return py_result;
   34367             : }
   34368             : 
   34369           0 : static int py_netr_AccountDeltas_set_result(PyObject *py_obj, PyObject *value, void *closure)
   34370             : {
   34371           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34372           0 :         if (value == NULL) {
   34373           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   34374           0 :                 return -1;
   34375             :         }
   34376           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   34377           0 :         return 0;
   34378             : }
   34379             : 
   34380             : static PyGetSetDef py_netr_AccountDeltas_getsetters[] = {
   34381             :         {
   34382             :                 .name = discard_const_p(char, "in_logon_server"),
   34383             :                 .get = py_netr_AccountDeltas_in_get_logon_server,
   34384             :                 .set = py_netr_AccountDeltas_in_set_logon_server,
   34385             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34386             :         },
   34387             :         {
   34388             :                 .name = discard_const_p(char, "in_computername"),
   34389             :                 .get = py_netr_AccountDeltas_in_get_computername,
   34390             :                 .set = py_netr_AccountDeltas_in_set_computername,
   34391             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34392             :         },
   34393             :         {
   34394             :                 .name = discard_const_p(char, "in_credential"),
   34395             :                 .get = py_netr_AccountDeltas_in_get_credential,
   34396             :                 .set = py_netr_AccountDeltas_in_set_credential,
   34397             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   34398             :         },
   34399             :         {
   34400             :                 .name = discard_const_p(char, "in_return_authenticator"),
   34401             :                 .get = py_netr_AccountDeltas_in_get_return_authenticator,
   34402             :                 .set = py_netr_AccountDeltas_in_set_return_authenticator,
   34403             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   34404             :         },
   34405             :         {
   34406             :                 .name = discard_const_p(char, "out_return_authenticator"),
   34407             :                 .get = py_netr_AccountDeltas_out_get_return_authenticator,
   34408             :                 .set = py_netr_AccountDeltas_out_set_return_authenticator,
   34409             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   34410             :         },
   34411             :         {
   34412             :                 .name = discard_const_p(char, "in_uas"),
   34413             :                 .get = py_netr_AccountDeltas_in_get_uas,
   34414             :                 .set = py_netr_AccountDeltas_in_set_uas,
   34415             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   34416             :         },
   34417             :         {
   34418             :                 .name = discard_const_p(char, "in_count"),
   34419             :                 .get = py_netr_AccountDeltas_in_get_count,
   34420             :                 .set = py_netr_AccountDeltas_in_set_count,
   34421             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34422             :         },
   34423             :         {
   34424             :                 .name = discard_const_p(char, "in_level"),
   34425             :                 .get = py_netr_AccountDeltas_in_get_level,
   34426             :                 .set = py_netr_AccountDeltas_in_set_level,
   34427             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34428             :         },
   34429             :         {
   34430             :                 .name = discard_const_p(char, "in_buffersize"),
   34431             :                 .get = py_netr_AccountDeltas_in_get_buffersize,
   34432             :                 .set = py_netr_AccountDeltas_in_set_buffersize,
   34433             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34434             :         },
   34435             :         {
   34436             :                 .name = discard_const_p(char, "out_buffer"),
   34437             :                 .get = py_netr_AccountDeltas_out_get_buffer,
   34438             :                 .set = py_netr_AccountDeltas_out_set_buffer,
   34439             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_AccountBuffer")
   34440             :         },
   34441             :         {
   34442             :                 .name = discard_const_p(char, "out_count_returned"),
   34443             :                 .get = py_netr_AccountDeltas_out_get_count_returned,
   34444             :                 .set = py_netr_AccountDeltas_out_set_count_returned,
   34445             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34446             :         },
   34447             :         {
   34448             :                 .name = discard_const_p(char, "out_total_entries"),
   34449             :                 .get = py_netr_AccountDeltas_out_get_total_entries,
   34450             :                 .set = py_netr_AccountDeltas_out_set_total_entries,
   34451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34452             :         },
   34453             :         {
   34454             :                 .name = discard_const_p(char, "out_recordid"),
   34455             :                 .get = py_netr_AccountDeltas_out_get_recordid,
   34456             :                 .set = py_netr_AccountDeltas_out_set_recordid,
   34457             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   34458             :         },
   34459             :         {
   34460             :                 .name = discard_const_p(char, "result"),
   34461             :                 .get = py_netr_AccountDeltas_get_result,
   34462             :                 .set = py_netr_AccountDeltas_set_result,
   34463             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   34464             :         },
   34465             :         { .name = NULL }
   34466             : };
   34467             : 
   34468           0 : static PyObject *py_netr_AccountDeltas_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   34469             : {
   34470           0 :         PyObject *self = pytalloc_new(struct netr_AccountDeltas, type);
   34471           0 :         struct netr_AccountDeltas *_self = (struct netr_AccountDeltas *)pytalloc_get_ptr(self);
   34472           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   34473           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   34474           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   34475           0 :         _self->out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer);
   34476           0 :         _self->out.count_returned = talloc_zero(mem_ctx, uint32_t);
   34477           0 :         _self->out.total_entries = talloc_zero(mem_ctx, uint32_t);
   34478           0 :         _self->out.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
   34479           0 :         return self;
   34480             : }
   34481             : 
   34482           0 : static PyObject *py_netr_AccountDeltas_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   34483             : {
   34484             : 
   34485             : 
   34486           0 :         return PyLong_FromLong(9);
   34487             : }
   34488             : 
   34489           0 : static PyObject *py_netr_AccountDeltas_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   34490             : {
   34491           0 :         const struct ndr_interface_call *call = NULL;
   34492           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34493           0 :         PyObject *ret = NULL;
   34494           0 :         struct ndr_push *push = NULL;
   34495           0 :         DATA_BLOB blob;
   34496           0 :         enum ndr_err_code err;
   34497             : 
   34498           0 :         if (ndr_table_netlogon.num_calls < 10) {
   34499           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_pack");
   34500           0 :                 return NULL;
   34501             :         }
   34502           0 :         call = &ndr_table_netlogon.calls[9];
   34503             : 
   34504           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   34505           0 :         if (push == NULL) {
   34506           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34507           0 :                 return NULL;
   34508             :         }
   34509             : 
   34510           0 :         push->flags |= ndr_push_flags;
   34511             : 
   34512           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   34513           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34514           0 :                 TALLOC_FREE(push);
   34515           0 :                 PyErr_SetNdrError(err);
   34516           0 :                 return NULL;
   34517             :         }
   34518           0 :         blob = ndr_push_blob(push);
   34519           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   34520           0 :         TALLOC_FREE(push);
   34521           0 :         return ret;
   34522             : }
   34523             : 
   34524           0 : static PyObject *py_netr_AccountDeltas_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34525             : {
   34526           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34527           0 :         PyObject *bigendian_obj = NULL;
   34528           0 :         PyObject *ndr64_obj = NULL;
   34529           0 :         libndr_flags ndr_push_flags = 0;
   34530             : 
   34531           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   34532             :                 discard_const_p(char *, kwnames),
   34533             :                 &bigendian_obj,
   34534             :                 &ndr64_obj)) {
   34535           0 :                 return NULL;
   34536             :         }
   34537             : 
   34538           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34539           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34540             :         }
   34541           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34542           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34543             :         }
   34544             : 
   34545           0 :         return py_netr_AccountDeltas_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   34546             : }
   34547             : 
   34548           0 : static PyObject *py_netr_AccountDeltas_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34549             : {
   34550           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34551           0 :         PyObject *bigendian_obj = NULL;
   34552           0 :         PyObject *ndr64_obj = NULL;
   34553           0 :         libndr_flags ndr_push_flags = 0;
   34554             : 
   34555           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   34556             :                 discard_const_p(char *, kwnames),
   34557             :                 &bigendian_obj,
   34558             :                 &ndr64_obj)) {
   34559           0 :                 return NULL;
   34560             :         }
   34561             : 
   34562           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34563           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34564             :         }
   34565           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34566           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34567             :         }
   34568             : 
   34569           0 :         return py_netr_AccountDeltas_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   34570             : }
   34571             : 
   34572           0 : static PyObject *py_netr_AccountDeltas_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   34573             : {
   34574           0 :         const struct ndr_interface_call *call = NULL;
   34575           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34576           0 :         struct ndr_pull *pull = NULL;
   34577           0 :         enum ndr_err_code err;
   34578             : 
   34579           0 :         if (ndr_table_netlogon.num_calls < 10) {
   34580           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_unpack");
   34581           0 :                 return NULL;
   34582             :         }
   34583           0 :         call = &ndr_table_netlogon.calls[9];
   34584             : 
   34585           0 :         pull = ndr_pull_init_blob(blob, object);
   34586           0 :         if (pull == NULL) {
   34587           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34588           0 :                 return NULL;
   34589             :         }
   34590             : 
   34591           0 :         pull->flags |= ndr_pull_flags;
   34592             : 
   34593           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   34594           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34595           0 :                 TALLOC_FREE(pull);
   34596           0 :                 PyErr_SetNdrError(err);
   34597           0 :                 return NULL;
   34598             :         }
   34599           0 :         if (!allow_remaining) {
   34600           0 :                 uint32_t highest_ofs;
   34601             : 
   34602           0 :                 if (pull->offset > pull->relative_highest_offset) {
   34603           0 :                         highest_ofs = pull->offset;
   34604             :                 } else {
   34605           0 :                         highest_ofs = pull->relative_highest_offset;
   34606             :                 }
   34607           0 :                 if (highest_ofs < pull->data_size) {
   34608           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   34609             :                                 "not all bytes consumed ofs[%u] size[%u]",
   34610             :                                 highest_ofs, pull->data_size);
   34611           0 :                         TALLOC_FREE(pull);
   34612           0 :                         PyErr_SetNdrError(err);
   34613           0 :                         return NULL;
   34614             :                 }
   34615             :         }
   34616             : 
   34617           0 :         TALLOC_FREE(pull);
   34618           0 :         Py_RETURN_NONE;
   34619             : }
   34620             : 
   34621           0 : static PyObject *py_netr_AccountDeltas_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34622             : {
   34623           0 :         DATA_BLOB blob;
   34624           0 :         Py_ssize_t blob_length = 0;
   34625           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34626           0 :         PyObject *bigendian_obj = NULL;
   34627           0 :         PyObject *ndr64_obj = NULL;
   34628           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34629           0 :         PyObject *allow_remaining_obj = NULL;
   34630           0 :         bool allow_remaining = false;
   34631             : 
   34632           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   34633             :                 discard_const_p(char *, kwnames),
   34634             :                 &blob.data, &blob_length,
   34635             :                 &bigendian_obj,
   34636             :                 &ndr64_obj,
   34637             :                 &allow_remaining_obj)) {
   34638           0 :                 return NULL;
   34639             :         }
   34640           0 :         blob.length = blob_length;
   34641             : 
   34642           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34643           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34644             :         }
   34645           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34646           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34647             :         }
   34648             : 
   34649           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34650           0 :                 allow_remaining = true;
   34651             :         }
   34652             : 
   34653           0 :         return py_netr_AccountDeltas_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   34654             : }
   34655             : 
   34656           0 : static PyObject *py_netr_AccountDeltas_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34657             : {
   34658           0 :         DATA_BLOB blob;
   34659           0 :         Py_ssize_t blob_length = 0;
   34660           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34661           0 :         PyObject *bigendian_obj = NULL;
   34662           0 :         PyObject *ndr64_obj = NULL;
   34663           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34664           0 :         PyObject *allow_remaining_obj = NULL;
   34665           0 :         bool allow_remaining = false;
   34666             : 
   34667           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   34668             :                 discard_const_p(char *, kwnames),
   34669             :                 &blob.data, &blob_length,
   34670             :                 &bigendian_obj,
   34671             :                 &ndr64_obj,
   34672             :                 &allow_remaining_obj)) {
   34673           0 :                 return NULL;
   34674             :         }
   34675           0 :         blob.length = blob_length;
   34676             : 
   34677           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34678           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34679             :         }
   34680           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34681           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34682             :         }
   34683             : 
   34684           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34685           0 :                 allow_remaining = true;
   34686             :         }
   34687             : 
   34688           0 :         return py_netr_AccountDeltas_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   34689             : }
   34690             : 
   34691           0 : static PyObject *py_netr_AccountDeltas_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   34692             : {
   34693           0 :         const struct ndr_interface_call *call = NULL;
   34694           0 :         struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
   34695           0 :         PyObject *ret;
   34696           0 :         char *retstr;
   34697             : 
   34698           0 :         if (ndr_table_netlogon.num_calls < 10) {
   34699           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_print");
   34700           0 :                 return NULL;
   34701             :         }
   34702           0 :         call = &ndr_table_netlogon.calls[9];
   34703             : 
   34704           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   34705           0 :         ret = PyUnicode_FromString(retstr);
   34706           0 :         TALLOC_FREE(retstr);
   34707             : 
   34708           0 :         return ret;
   34709             : }
   34710             : 
   34711           0 : static PyObject *py_netr_AccountDeltas_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34712             : {
   34713           0 :         return py_netr_AccountDeltas_ndr_print(py_obj, "netr_AccountDeltas_in", NDR_IN);
   34714             : }
   34715             : 
   34716           0 : static PyObject *py_netr_AccountDeltas_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34717             : {
   34718           0 :         return py_netr_AccountDeltas_ndr_print(py_obj, "netr_AccountDeltas_out", NDR_OUT);
   34719             : }
   34720             : 
   34721             : static PyMethodDef py_netr_AccountDeltas_methods[] = {
   34722             :         { "opnum", (PyCFunction)py_netr_AccountDeltas_ndr_opnum, METH_NOARGS|METH_CLASS,
   34723             :                 "netlogon.netr_AccountDeltas.opnum() -> 9 (0x09) " },
   34724             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   34725             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   34726             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   34727             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   34728             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   34729             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   34730             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   34731             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   34732             :         { "__ndr_print_in__", (PyCFunction)py_netr_AccountDeltas_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   34733             :         { "__ndr_print_out__", (PyCFunction)py_netr_AccountDeltas_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   34734             :         { NULL, NULL, 0, NULL }
   34735             : };
   34736             : 
   34737             : 
   34738             : static PyTypeObject netr_AccountDeltas_Type = {
   34739             :         PyVarObject_HEAD_INIT(NULL, 0)
   34740             :         .tp_name = "netlogon.netr_AccountDeltas",
   34741             :         .tp_getset = py_netr_AccountDeltas_getsetters,
   34742             :         .tp_methods = py_netr_AccountDeltas_methods,
   34743             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   34744             :         .tp_new = py_netr_AccountDeltas_new,
   34745             : };
   34746             : 
   34747           0 : static bool pack_py_netr_AccountDeltas_args_in(PyObject *args, PyObject *kwargs, struct netr_AccountDeltas *r)
   34748             : {
   34749           0 :         PyObject *py_logon_server;
   34750           0 :         PyObject *py_computername;
   34751           0 :         PyObject *py_credential;
   34752           0 :         PyObject *py_return_authenticator;
   34753           0 :         PyObject *py_uas;
   34754           0 :         PyObject *py_count;
   34755           0 :         PyObject *py_level;
   34756           0 :         PyObject *py_buffersize;
   34757           0 :         const char *kwnames[] = {
   34758             :                 "logon_server", "computername", "credential", "return_authenticator", "uas", "count", "level", "buffersize", NULL
   34759             :         };
   34760             : 
   34761           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)) {
   34762           0 :                 return false;
   34763             :         }
   34764             : 
   34765           0 :         if (py_logon_server == NULL) {
   34766           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   34767           0 :                 return false;
   34768             :         }
   34769           0 :         if (py_logon_server == Py_None) {
   34770           0 :                 r->in.logon_server = NULL;
   34771             :         } else {
   34772           0 :                 r->in.logon_server = NULL;
   34773             :                 {
   34774           0 :                         const char *test_str;
   34775           0 :                         const char *talloc_str;
   34776           0 :                         PyObject *unicode = NULL;
   34777           0 :                         if (PyUnicode_Check(py_logon_server)) {
   34778           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   34779           0 :                                 if (unicode == NULL) {
   34780           0 :                                         return false;
   34781             :                                 }
   34782           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34783           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   34784           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   34785             :                         } else {
   34786           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   34787           0 :                                 return false;
   34788             :                         }
   34789           0 :                         talloc_str = talloc_strdup(r, test_str);
   34790           0 :                         if (unicode != NULL) {
   34791           0 :                                 Py_DECREF(unicode);
   34792             :                         }
   34793           0 :                         if (talloc_str == NULL) {
   34794           0 :                                 PyErr_NoMemory();
   34795           0 :                                 return false;
   34796             :                         }
   34797           0 :                         r->in.logon_server = talloc_str;
   34798             :                 }
   34799             :         }
   34800           0 :         if (py_computername == NULL) {
   34801           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
   34802           0 :                 return false;
   34803             :         }
   34804           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   34805           0 :         if (r->in.computername == NULL) {
   34806           0 :                 PyErr_NoMemory();
   34807           0 :                 return false;
   34808             :         }
   34809             :         {
   34810           0 :                 const char *test_str;
   34811           0 :                 const char *talloc_str;
   34812           0 :                 PyObject *unicode = NULL;
   34813           0 :                 if (PyUnicode_Check(py_computername)) {
   34814           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   34815           0 :                         if (unicode == NULL) {
   34816           0 :                                 return false;
   34817             :                         }
   34818           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34819           0 :                 } else if (PyBytes_Check(py_computername)) {
   34820           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   34821             :                 } else {
   34822           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   34823           0 :                         return false;
   34824             :                 }
   34825           0 :                 talloc_str = talloc_strdup(r, test_str);
   34826           0 :                 if (unicode != NULL) {
   34827           0 :                         Py_DECREF(unicode);
   34828             :                 }
   34829           0 :                 if (talloc_str == NULL) {
   34830           0 :                         PyErr_NoMemory();
   34831           0 :                         return false;
   34832             :                 }
   34833           0 :                 r->in.computername = talloc_str;
   34834             :         }
   34835           0 :         if (py_credential == NULL) {
   34836           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   34837           0 :                 return false;
   34838             :         }
   34839           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   34840           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   34841           0 :                 PyErr_NoMemory();
   34842           0 :                 return false;
   34843             :         }
   34844           0 :         r->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   34845           0 :         if (py_return_authenticator == NULL) {
   34846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   34847           0 :                 return false;
   34848             :         }
   34849           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   34850           0 :         if (r->in.return_authenticator == NULL) {
   34851           0 :                 PyErr_NoMemory();
   34852           0 :                 return false;
   34853             :         }
   34854           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   34855           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   34856           0 :                 PyErr_NoMemory();
   34857           0 :                 return false;
   34858             :         }
   34859           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   34860           0 :         if (py_uas == NULL) {
   34861           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.uas");
   34862           0 :                 return false;
   34863             :         }
   34864           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, py_uas, return false;);
   34865           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_uas)) == NULL) {
   34866           0 :                 PyErr_NoMemory();
   34867           0 :                 return false;
   34868             :         }
   34869           0 :         r->in.uas = *(struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_uas);
   34870           0 :         if (py_count == NULL) {
   34871           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.count");
   34872           0 :                 return false;
   34873             :         }
   34874             :         {
   34875           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.count));
   34876           0 :                 if (PyLong_Check(py_count)) {
   34877           0 :                         unsigned long long test_var;
   34878           0 :                         test_var = PyLong_AsUnsignedLongLong(py_count);
   34879           0 :                         if (PyErr_Occurred() != NULL) {
   34880           0 :                                 return false;
   34881             :                         }
   34882           0 :                         if (test_var > uint_max) {
   34883           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34884             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34885           0 :                                 return false;
   34886             :                         }
   34887           0 :                         r->in.count = test_var;
   34888             :                 } else {
   34889           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34890             :                           PyLong_Type.tp_name);
   34891           0 :                         return false;
   34892             :                 }
   34893             :         }
   34894           0 :         if (py_level == NULL) {
   34895           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   34896           0 :                 return false;
   34897             :         }
   34898             :         {
   34899           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   34900           0 :                 if (PyLong_Check(py_level)) {
   34901           0 :                         unsigned long long test_var;
   34902           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   34903           0 :                         if (PyErr_Occurred() != NULL) {
   34904           0 :                                 return false;
   34905             :                         }
   34906           0 :                         if (test_var > uint_max) {
   34907           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34908             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34909           0 :                                 return false;
   34910             :                         }
   34911           0 :                         r->in.level = test_var;
   34912             :                 } else {
   34913           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34914             :                           PyLong_Type.tp_name);
   34915           0 :                         return false;
   34916             :                 }
   34917             :         }
   34918           0 :         if (py_buffersize == NULL) {
   34919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.buffersize");
   34920           0 :                 return false;
   34921             :         }
   34922             :         {
   34923           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.buffersize));
   34924           0 :                 if (PyLong_Check(py_buffersize)) {
   34925           0 :                         unsigned long long test_var;
   34926           0 :                         test_var = PyLong_AsUnsignedLongLong(py_buffersize);
   34927           0 :                         if (PyErr_Occurred() != NULL) {
   34928           0 :                                 return false;
   34929             :                         }
   34930           0 :                         if (test_var > uint_max) {
   34931           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34932             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34933           0 :                                 return false;
   34934             :                         }
   34935           0 :                         r->in.buffersize = test_var;
   34936             :                 } else {
   34937           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34938             :                           PyLong_Type.tp_name);
   34939           0 :                         return false;
   34940             :                 }
   34941             :         }
   34942           0 :         return true;
   34943             : }
   34944             : 
   34945           0 : static PyObject *unpack_py_netr_AccountDeltas_args_out(struct netr_AccountDeltas *r)
   34946             : {
   34947           0 :         PyObject *result;
   34948           0 :         PyObject *py_return_authenticator;
   34949           0 :         PyObject *py_buffer;
   34950           0 :         PyObject *py_count_returned;
   34951           0 :         PyObject *py_total_entries;
   34952           0 :         PyObject *py_recordid;
   34953           0 :         result = PyTuple_New(5);
   34954           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   34955           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   34956           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, r->out.buffer, r->out.buffer);
   34957           0 :         PyTuple_SetItem(result, 1, py_buffer);
   34958           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.count_returned));
   34959           0 :         PyTuple_SetItem(result, 2, py_count_returned);
   34960           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.total_entries));
   34961           0 :         PyTuple_SetItem(result, 3, py_total_entries);
   34962           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, r->out.recordid, r->out.recordid);
   34963           0 :         PyTuple_SetItem(result, 4, py_recordid);
   34964           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   34965           0 :                 PyErr_SetNTSTATUS(r->out.result);
   34966           0 :                 return NULL;
   34967             :         }
   34968             : 
   34969           0 :         return result;
   34970             : }
   34971             : 
   34972             : 
   34973           0 : static PyObject *py_netr_AccountSync_in_get_logon_server(PyObject *obj, void *closure)
   34974             : {
   34975           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   34976           0 :         PyObject *py_logon_server;
   34977           0 :         if (object->in.logon_server == NULL) {
   34978           0 :                 Py_RETURN_NONE;
   34979             :         }
   34980           0 :         if (object->in.logon_server == NULL) {
   34981           0 :                 py_logon_server = Py_None;
   34982           0 :                 Py_INCREF(py_logon_server);
   34983             :         } else {
   34984           0 :                 if (object->in.logon_server == NULL) {
   34985           0 :                         py_logon_server = Py_None;
   34986           0 :                         Py_INCREF(py_logon_server);
   34987             :                 } else {
   34988           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   34989             :                 }
   34990             :         }
   34991           0 :         return py_logon_server;
   34992             : }
   34993             : 
   34994           0 : static int py_netr_AccountSync_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   34995             : {
   34996           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   34997           0 :         if (value == NULL) {
   34998           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   34999           0 :                 return -1;
   35000             :         }
   35001           0 :         if (value == Py_None) {
   35002           0 :                 object->in.logon_server = NULL;
   35003             :         } else {
   35004           0 :                 object->in.logon_server = NULL;
   35005             :                 {
   35006           0 :                         const char *test_str;
   35007           0 :                         const char *talloc_str;
   35008           0 :                         PyObject *unicode = NULL;
   35009           0 :                         if (PyUnicode_Check(value)) {
   35010           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35011           0 :                                 if (unicode == NULL) {
   35012           0 :                                         return -1;
   35013             :                                 }
   35014           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35015           0 :                         } else if (PyBytes_Check(value)) {
   35016           0 :                                 test_str = PyBytes_AS_STRING(value);
   35017             :                         } else {
   35018           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35019           0 :                                 return -1;
   35020             :                         }
   35021           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35022           0 :                         if (unicode != NULL) {
   35023           0 :                                 Py_DECREF(unicode);
   35024             :                         }
   35025           0 :                         if (talloc_str == NULL) {
   35026           0 :                                 PyErr_NoMemory();
   35027           0 :                                 return -1;
   35028             :                         }
   35029           0 :                         object->in.logon_server = talloc_str;
   35030             :                 }
   35031             :         }
   35032           0 :         return 0;
   35033             : }
   35034             : 
   35035           0 : static PyObject *py_netr_AccountSync_in_get_computername(PyObject *obj, void *closure)
   35036             : {
   35037           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35038           0 :         PyObject *py_computername;
   35039           0 :         if (object->in.computername == NULL) {
   35040           0 :                 Py_RETURN_NONE;
   35041             :         }
   35042           0 :         if (object->in.computername == NULL) {
   35043           0 :                 py_computername = Py_None;
   35044           0 :                 Py_INCREF(py_computername);
   35045             :         } else {
   35046           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   35047             :         }
   35048           0 :         return py_computername;
   35049             : }
   35050             : 
   35051           0 : static int py_netr_AccountSync_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   35052             : {
   35053           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35054           0 :         if (value == NULL) {
   35055           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
   35056           0 :                 return -1;
   35057             :         }
   35058           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   35059           0 :         if (object->in.computername == NULL) {
   35060           0 :                 PyErr_NoMemory();
   35061           0 :                 return -1;
   35062             :         }
   35063             :         {
   35064           0 :                 const char *test_str;
   35065           0 :                 const char *talloc_str;
   35066           0 :                 PyObject *unicode = NULL;
   35067           0 :                 if (PyUnicode_Check(value)) {
   35068           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35069           0 :                         if (unicode == NULL) {
   35070           0 :                                 return -1;
   35071             :                         }
   35072           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35073           0 :                 } else if (PyBytes_Check(value)) {
   35074           0 :                         test_str = PyBytes_AS_STRING(value);
   35075             :                 } else {
   35076           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35077           0 :                         return -1;
   35078             :                 }
   35079           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35080           0 :                 if (unicode != NULL) {
   35081           0 :                         Py_DECREF(unicode);
   35082             :                 }
   35083           0 :                 if (talloc_str == NULL) {
   35084           0 :                         PyErr_NoMemory();
   35085           0 :                         return -1;
   35086             :                 }
   35087           0 :                 object->in.computername = talloc_str;
   35088             :         }
   35089           0 :         return 0;
   35090             : }
   35091             : 
   35092           0 : static PyObject *py_netr_AccountSync_in_get_credential(PyObject *obj, void *closure)
   35093             : {
   35094           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35095           0 :         PyObject *py_credential;
   35096           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, pytalloc_get_mem_ctx(obj), &object->in.credential);
   35097           0 :         return py_credential;
   35098             : }
   35099             : 
   35100           0 : static int py_netr_AccountSync_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   35101             : {
   35102           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35103           0 :         if (value == NULL) {
   35104           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   35105           0 :                 return -1;
   35106             :         }
   35107           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   35108           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35109           0 :                 PyErr_NoMemory();
   35110           0 :                 return -1;
   35111             :         }
   35112           0 :         object->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(value);
   35113           0 :         return 0;
   35114             : }
   35115             : 
   35116           0 : static PyObject *py_netr_AccountSync_in_get_return_authenticator(PyObject *obj, void *closure)
   35117             : {
   35118           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35119           0 :         PyObject *py_return_authenticator;
   35120           0 :         if (object->in.return_authenticator == NULL) {
   35121           0 :                 Py_RETURN_NONE;
   35122             :         }
   35123           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   35124           0 :         return py_return_authenticator;
   35125             : }
   35126             : 
   35127           0 : static int py_netr_AccountSync_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   35128             : {
   35129           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35130           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   35131           0 :         if (value == NULL) {
   35132           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   35133           0 :                 return -1;
   35134             :         }
   35135           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   35136           0 :         if (object->in.return_authenticator == NULL) {
   35137           0 :                 PyErr_NoMemory();
   35138           0 :                 return -1;
   35139             :         }
   35140           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   35141           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35142           0 :                 PyErr_NoMemory();
   35143           0 :                 return -1;
   35144             :         }
   35145           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   35146           0 :         return 0;
   35147             : }
   35148             : 
   35149           0 : static PyObject *py_netr_AccountSync_out_get_return_authenticator(PyObject *obj, void *closure)
   35150             : {
   35151           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35152           0 :         PyObject *py_return_authenticator;
   35153           0 :         if (object->out.return_authenticator == NULL) {
   35154           0 :                 Py_RETURN_NONE;
   35155             :         }
   35156           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   35157           0 :         return py_return_authenticator;
   35158             : }
   35159             : 
   35160           0 : static int py_netr_AccountSync_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   35161             : {
   35162           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35163           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   35164           0 :         if (value == NULL) {
   35165           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   35166           0 :                 return -1;
   35167             :         }
   35168           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   35169           0 :         if (object->out.return_authenticator == NULL) {
   35170           0 :                 PyErr_NoMemory();
   35171           0 :                 return -1;
   35172             :         }
   35173           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   35174           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35175           0 :                 PyErr_NoMemory();
   35176           0 :                 return -1;
   35177             :         }
   35178           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   35179           0 :         return 0;
   35180             : }
   35181             : 
   35182           0 : static PyObject *py_netr_AccountSync_in_get_reference(PyObject *obj, void *closure)
   35183             : {
   35184           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35185           0 :         PyObject *py_reference;
   35186           0 :         py_reference = PyLong_FromUnsignedLongLong((uint32_t)(object->in.reference));
   35187           0 :         return py_reference;
   35188             : }
   35189             : 
   35190           0 : static int py_netr_AccountSync_in_set_reference(PyObject *py_obj, PyObject *value, void *closure)
   35191             : {
   35192           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35193           0 :         if (value == NULL) {
   35194           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.reference");
   35195           0 :                 return -1;
   35196             :         }
   35197             :         {
   35198           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reference));
   35199           0 :                 if (PyLong_Check(value)) {
   35200           0 :                         unsigned long long test_var;
   35201           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35202           0 :                         if (PyErr_Occurred() != NULL) {
   35203           0 :                                 return -1;
   35204             :                         }
   35205           0 :                         if (test_var > uint_max) {
   35206           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35207             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35208           0 :                                 return -1;
   35209             :                         }
   35210           0 :                         object->in.reference = test_var;
   35211             :                 } else {
   35212           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35213             :                           PyLong_Type.tp_name);
   35214           0 :                         return -1;
   35215             :                 }
   35216             :         }
   35217           0 :         return 0;
   35218             : }
   35219             : 
   35220           0 : static PyObject *py_netr_AccountSync_in_get_level(PyObject *obj, void *closure)
   35221             : {
   35222           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35223           0 :         PyObject *py_level;
   35224           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   35225           0 :         return py_level;
   35226             : }
   35227             : 
   35228           0 : static int py_netr_AccountSync_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   35229             : {
   35230           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35231           0 :         if (value == NULL) {
   35232           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   35233           0 :                 return -1;
   35234             :         }
   35235             :         {
   35236           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   35237           0 :                 if (PyLong_Check(value)) {
   35238           0 :                         unsigned long long test_var;
   35239           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35240           0 :                         if (PyErr_Occurred() != NULL) {
   35241           0 :                                 return -1;
   35242             :                         }
   35243           0 :                         if (test_var > uint_max) {
   35244           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35245             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35246           0 :                                 return -1;
   35247             :                         }
   35248           0 :                         object->in.level = test_var;
   35249             :                 } else {
   35250           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35251             :                           PyLong_Type.tp_name);
   35252           0 :                         return -1;
   35253             :                 }
   35254             :         }
   35255           0 :         return 0;
   35256             : }
   35257             : 
   35258           0 : static PyObject *py_netr_AccountSync_in_get_buffersize(PyObject *obj, void *closure)
   35259             : {
   35260           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35261           0 :         PyObject *py_buffersize;
   35262           0 :         py_buffersize = PyLong_FromUnsignedLongLong((uint32_t)(object->in.buffersize));
   35263           0 :         return py_buffersize;
   35264             : }
   35265             : 
   35266           0 : static int py_netr_AccountSync_in_set_buffersize(PyObject *py_obj, PyObject *value, void *closure)
   35267             : {
   35268           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35269           0 :         if (value == NULL) {
   35270           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.buffersize");
   35271           0 :                 return -1;
   35272             :         }
   35273             :         {
   35274           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffersize));
   35275           0 :                 if (PyLong_Check(value)) {
   35276           0 :                         unsigned long long test_var;
   35277           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35278           0 :                         if (PyErr_Occurred() != NULL) {
   35279           0 :                                 return -1;
   35280             :                         }
   35281           0 :                         if (test_var > uint_max) {
   35282           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35283             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35284           0 :                                 return -1;
   35285             :                         }
   35286           0 :                         object->in.buffersize = test_var;
   35287             :                 } else {
   35288           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35289             :                           PyLong_Type.tp_name);
   35290           0 :                         return -1;
   35291             :                 }
   35292             :         }
   35293           0 :         return 0;
   35294             : }
   35295             : 
   35296           0 : static PyObject *py_netr_AccountSync_out_get_buffer(PyObject *obj, void *closure)
   35297             : {
   35298           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35299           0 :         PyObject *py_buffer;
   35300           0 :         if (object->out.buffer == NULL) {
   35301           0 :                 Py_RETURN_NONE;
   35302             :         }
   35303           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, object->out.buffer, object->out.buffer);
   35304           0 :         return py_buffer;
   35305             : }
   35306             : 
   35307           0 : static int py_netr_AccountSync_out_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   35308             : {
   35309           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35310           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.buffer));
   35311           0 :         if (value == NULL) {
   35312           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.buffer");
   35313           0 :                 return -1;
   35314             :         }
   35315           0 :         object->out.buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.buffer);
   35316           0 :         if (object->out.buffer == NULL) {
   35317           0 :                 PyErr_NoMemory();
   35318           0 :                 return -1;
   35319             :         }
   35320           0 :         PY_CHECK_TYPE(&netr_AccountBuffer_Type, value, return -1;);
   35321           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35322           0 :                 PyErr_NoMemory();
   35323           0 :                 return -1;
   35324             :         }
   35325           0 :         object->out.buffer = (struct netr_AccountBuffer *)pytalloc_get_ptr(value);
   35326           0 :         return 0;
   35327             : }
   35328             : 
   35329           0 : static PyObject *py_netr_AccountSync_out_get_count_returned(PyObject *obj, void *closure)
   35330             : {
   35331           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35332           0 :         PyObject *py_count_returned;
   35333           0 :         if (object->out.count_returned == NULL) {
   35334           0 :                 Py_RETURN_NONE;
   35335             :         }
   35336           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.count_returned));
   35337           0 :         return py_count_returned;
   35338             : }
   35339             : 
   35340           0 : static int py_netr_AccountSync_out_set_count_returned(PyObject *py_obj, PyObject *value, void *closure)
   35341             : {
   35342           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35343           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.count_returned));
   35344           0 :         if (value == NULL) {
   35345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.count_returned");
   35346           0 :                 return -1;
   35347             :         }
   35348           0 :         object->out.count_returned = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.count_returned);
   35349           0 :         if (object->out.count_returned == NULL) {
   35350           0 :                 PyErr_NoMemory();
   35351           0 :                 return -1;
   35352             :         }
   35353             :         {
   35354           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.count_returned));
   35355           0 :                 if (PyLong_Check(value)) {
   35356           0 :                         unsigned long long test_var;
   35357           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35358           0 :                         if (PyErr_Occurred() != NULL) {
   35359           0 :                                 return -1;
   35360             :                         }
   35361           0 :                         if (test_var > uint_max) {
   35362           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35363             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35364           0 :                                 return -1;
   35365             :                         }
   35366           0 :                         *object->out.count_returned = test_var;
   35367             :                 } else {
   35368           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35369             :                           PyLong_Type.tp_name);
   35370           0 :                         return -1;
   35371             :                 }
   35372             :         }
   35373           0 :         return 0;
   35374             : }
   35375             : 
   35376           0 : static PyObject *py_netr_AccountSync_out_get_total_entries(PyObject *obj, void *closure)
   35377             : {
   35378           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35379           0 :         PyObject *py_total_entries;
   35380           0 :         if (object->out.total_entries == NULL) {
   35381           0 :                 Py_RETURN_NONE;
   35382             :         }
   35383           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.total_entries));
   35384           0 :         return py_total_entries;
   35385             : }
   35386             : 
   35387           0 : static int py_netr_AccountSync_out_set_total_entries(PyObject *py_obj, PyObject *value, void *closure)
   35388             : {
   35389           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35390           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total_entries));
   35391           0 :         if (value == NULL) {
   35392           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.total_entries");
   35393           0 :                 return -1;
   35394             :         }
   35395           0 :         object->out.total_entries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total_entries);
   35396           0 :         if (object->out.total_entries == NULL) {
   35397           0 :                 PyErr_NoMemory();
   35398           0 :                 return -1;
   35399             :         }
   35400             :         {
   35401           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total_entries));
   35402           0 :                 if (PyLong_Check(value)) {
   35403           0 :                         unsigned long long test_var;
   35404           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35405           0 :                         if (PyErr_Occurred() != NULL) {
   35406           0 :                                 return -1;
   35407             :                         }
   35408           0 :                         if (test_var > uint_max) {
   35409           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35410             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35411           0 :                                 return -1;
   35412             :                         }
   35413           0 :                         *object->out.total_entries = test_var;
   35414             :                 } else {
   35415           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35416             :                           PyLong_Type.tp_name);
   35417           0 :                         return -1;
   35418             :                 }
   35419             :         }
   35420           0 :         return 0;
   35421             : }
   35422             : 
   35423           0 : static PyObject *py_netr_AccountSync_out_get_next_reference(PyObject *obj, void *closure)
   35424             : {
   35425           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35426           0 :         PyObject *py_next_reference;
   35427           0 :         if (object->out.next_reference == NULL) {
   35428           0 :                 Py_RETURN_NONE;
   35429             :         }
   35430           0 :         py_next_reference = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.next_reference));
   35431           0 :         return py_next_reference;
   35432             : }
   35433             : 
   35434           0 : static int py_netr_AccountSync_out_set_next_reference(PyObject *py_obj, PyObject *value, void *closure)
   35435             : {
   35436           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35437           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.next_reference));
   35438           0 :         if (value == NULL) {
   35439           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.next_reference");
   35440           0 :                 return -1;
   35441             :         }
   35442           0 :         object->out.next_reference = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.next_reference);
   35443           0 :         if (object->out.next_reference == NULL) {
   35444           0 :                 PyErr_NoMemory();
   35445           0 :                 return -1;
   35446             :         }
   35447             :         {
   35448           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.next_reference));
   35449           0 :                 if (PyLong_Check(value)) {
   35450           0 :                         unsigned long long test_var;
   35451           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35452           0 :                         if (PyErr_Occurred() != NULL) {
   35453           0 :                                 return -1;
   35454             :                         }
   35455           0 :                         if (test_var > uint_max) {
   35456           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35457             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35458           0 :                                 return -1;
   35459             :                         }
   35460           0 :                         *object->out.next_reference = test_var;
   35461             :                 } else {
   35462           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35463             :                           PyLong_Type.tp_name);
   35464           0 :                         return -1;
   35465             :                 }
   35466             :         }
   35467           0 :         return 0;
   35468             : }
   35469             : 
   35470           0 : static PyObject *py_netr_AccountSync_in_get_recordid(PyObject *obj, void *closure)
   35471             : {
   35472           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35473           0 :         PyObject *py_recordid;
   35474           0 :         if (object->in.recordid == NULL) {
   35475           0 :                 Py_RETURN_NONE;
   35476             :         }
   35477           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->in.recordid, object->in.recordid);
   35478           0 :         return py_recordid;
   35479             : }
   35480             : 
   35481           0 : static int py_netr_AccountSync_in_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
   35482             : {
   35483           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35484           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.recordid));
   35485           0 :         if (value == NULL) {
   35486           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.recordid");
   35487           0 :                 return -1;
   35488             :         }
   35489           0 :         object->in.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.recordid);
   35490           0 :         if (object->in.recordid == NULL) {
   35491           0 :                 PyErr_NoMemory();
   35492           0 :                 return -1;
   35493             :         }
   35494           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   35495           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35496           0 :                 PyErr_NoMemory();
   35497           0 :                 return -1;
   35498             :         }
   35499           0 :         object->in.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   35500           0 :         return 0;
   35501             : }
   35502             : 
   35503           0 : static PyObject *py_netr_AccountSync_out_get_recordid(PyObject *obj, void *closure)
   35504             : {
   35505           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35506           0 :         PyObject *py_recordid;
   35507           0 :         if (object->out.recordid == NULL) {
   35508           0 :                 Py_RETURN_NONE;
   35509             :         }
   35510           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->out.recordid, object->out.recordid);
   35511           0 :         return py_recordid;
   35512             : }
   35513             : 
   35514           0 : static int py_netr_AccountSync_out_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
   35515             : {
   35516           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35517           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.recordid));
   35518           0 :         if (value == NULL) {
   35519           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.recordid");
   35520           0 :                 return -1;
   35521             :         }
   35522           0 :         object->out.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.recordid);
   35523           0 :         if (object->out.recordid == NULL) {
   35524           0 :                 PyErr_NoMemory();
   35525           0 :                 return -1;
   35526             :         }
   35527           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   35528           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35529           0 :                 PyErr_NoMemory();
   35530           0 :                 return -1;
   35531             :         }
   35532           0 :         object->out.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   35533           0 :         return 0;
   35534             : }
   35535             : 
   35536           0 : static PyObject *py_netr_AccountSync_get_result(PyObject *obj, void *closure)
   35537             : {
   35538           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(obj);
   35539           0 :         PyObject *py_result;
   35540           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   35541           0 :         return py_result;
   35542             : }
   35543             : 
   35544           0 : static int py_netr_AccountSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
   35545             : {
   35546           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35547           0 :         if (value == NULL) {
   35548           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   35549           0 :                 return -1;
   35550             :         }
   35551           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   35552           0 :         return 0;
   35553             : }
   35554             : 
   35555             : static PyGetSetDef py_netr_AccountSync_getsetters[] = {
   35556             :         {
   35557             :                 .name = discard_const_p(char, "in_logon_server"),
   35558             :                 .get = py_netr_AccountSync_in_get_logon_server,
   35559             :                 .set = py_netr_AccountSync_in_set_logon_server,
   35560             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35561             :         },
   35562             :         {
   35563             :                 .name = discard_const_p(char, "in_computername"),
   35564             :                 .get = py_netr_AccountSync_in_get_computername,
   35565             :                 .set = py_netr_AccountSync_in_set_computername,
   35566             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35567             :         },
   35568             :         {
   35569             :                 .name = discard_const_p(char, "in_credential"),
   35570             :                 .get = py_netr_AccountSync_in_get_credential,
   35571             :                 .set = py_netr_AccountSync_in_set_credential,
   35572             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   35573             :         },
   35574             :         {
   35575             :                 .name = discard_const_p(char, "in_return_authenticator"),
   35576             :                 .get = py_netr_AccountSync_in_get_return_authenticator,
   35577             :                 .set = py_netr_AccountSync_in_set_return_authenticator,
   35578             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   35579             :         },
   35580             :         {
   35581             :                 .name = discard_const_p(char, "out_return_authenticator"),
   35582             :                 .get = py_netr_AccountSync_out_get_return_authenticator,
   35583             :                 .set = py_netr_AccountSync_out_set_return_authenticator,
   35584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   35585             :         },
   35586             :         {
   35587             :                 .name = discard_const_p(char, "in_reference"),
   35588             :                 .get = py_netr_AccountSync_in_get_reference,
   35589             :                 .set = py_netr_AccountSync_in_set_reference,
   35590             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35591             :         },
   35592             :         {
   35593             :                 .name = discard_const_p(char, "in_level"),
   35594             :                 .get = py_netr_AccountSync_in_get_level,
   35595             :                 .set = py_netr_AccountSync_in_set_level,
   35596             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35597             :         },
   35598             :         {
   35599             :                 .name = discard_const_p(char, "in_buffersize"),
   35600             :                 .get = py_netr_AccountSync_in_get_buffersize,
   35601             :                 .set = py_netr_AccountSync_in_set_buffersize,
   35602             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35603             :         },
   35604             :         {
   35605             :                 .name = discard_const_p(char, "out_buffer"),
   35606             :                 .get = py_netr_AccountSync_out_get_buffer,
   35607             :                 .set = py_netr_AccountSync_out_set_buffer,
   35608             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_AccountBuffer")
   35609             :         },
   35610             :         {
   35611             :                 .name = discard_const_p(char, "out_count_returned"),
   35612             :                 .get = py_netr_AccountSync_out_get_count_returned,
   35613             :                 .set = py_netr_AccountSync_out_set_count_returned,
   35614             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35615             :         },
   35616             :         {
   35617             :                 .name = discard_const_p(char, "out_total_entries"),
   35618             :                 .get = py_netr_AccountSync_out_get_total_entries,
   35619             :                 .set = py_netr_AccountSync_out_set_total_entries,
   35620             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35621             :         },
   35622             :         {
   35623             :                 .name = discard_const_p(char, "out_next_reference"),
   35624             :                 .get = py_netr_AccountSync_out_get_next_reference,
   35625             :                 .set = py_netr_AccountSync_out_set_next_reference,
   35626             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35627             :         },
   35628             :         {
   35629             :                 .name = discard_const_p(char, "in_recordid"),
   35630             :                 .get = py_netr_AccountSync_in_get_recordid,
   35631             :                 .set = py_netr_AccountSync_in_set_recordid,
   35632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   35633             :         },
   35634             :         {
   35635             :                 .name = discard_const_p(char, "out_recordid"),
   35636             :                 .get = py_netr_AccountSync_out_get_recordid,
   35637             :                 .set = py_netr_AccountSync_out_set_recordid,
   35638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   35639             :         },
   35640             :         {
   35641             :                 .name = discard_const_p(char, "result"),
   35642             :                 .get = py_netr_AccountSync_get_result,
   35643             :                 .set = py_netr_AccountSync_set_result,
   35644             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   35645             :         },
   35646             :         { .name = NULL }
   35647             : };
   35648             : 
   35649           0 : static PyObject *py_netr_AccountSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   35650             : {
   35651           0 :         PyObject *self = pytalloc_new(struct netr_AccountSync, type);
   35652           0 :         struct netr_AccountSync *_self = (struct netr_AccountSync *)pytalloc_get_ptr(self);
   35653           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   35654           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   35655           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   35656           0 :         _self->out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer);
   35657           0 :         _self->out.count_returned = talloc_zero(mem_ctx, uint32_t);
   35658           0 :         _self->out.total_entries = talloc_zero(mem_ctx, uint32_t);
   35659           0 :         _self->out.next_reference = talloc_zero(mem_ctx, uint32_t);
   35660           0 :         _self->in.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
   35661           0 :         _self->out.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
   35662           0 :         return self;
   35663             : }
   35664             : 
   35665           0 : static PyObject *py_netr_AccountSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   35666             : {
   35667             : 
   35668             : 
   35669           0 :         return PyLong_FromLong(10);
   35670             : }
   35671             : 
   35672           0 : static PyObject *py_netr_AccountSync_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   35673             : {
   35674           0 :         const struct ndr_interface_call *call = NULL;
   35675           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35676           0 :         PyObject *ret = NULL;
   35677           0 :         struct ndr_push *push = NULL;
   35678           0 :         DATA_BLOB blob;
   35679           0 :         enum ndr_err_code err;
   35680             : 
   35681           0 :         if (ndr_table_netlogon.num_calls < 11) {
   35682           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_pack");
   35683           0 :                 return NULL;
   35684             :         }
   35685           0 :         call = &ndr_table_netlogon.calls[10];
   35686             : 
   35687           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   35688           0 :         if (push == NULL) {
   35689           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35690           0 :                 return NULL;
   35691             :         }
   35692             : 
   35693           0 :         push->flags |= ndr_push_flags;
   35694             : 
   35695           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   35696           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35697           0 :                 TALLOC_FREE(push);
   35698           0 :                 PyErr_SetNdrError(err);
   35699           0 :                 return NULL;
   35700             :         }
   35701           0 :         blob = ndr_push_blob(push);
   35702           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   35703           0 :         TALLOC_FREE(push);
   35704           0 :         return ret;
   35705             : }
   35706             : 
   35707           0 : static PyObject *py_netr_AccountSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35708             : {
   35709           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35710           0 :         PyObject *bigendian_obj = NULL;
   35711           0 :         PyObject *ndr64_obj = NULL;
   35712           0 :         libndr_flags ndr_push_flags = 0;
   35713             : 
   35714           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   35715             :                 discard_const_p(char *, kwnames),
   35716             :                 &bigendian_obj,
   35717             :                 &ndr64_obj)) {
   35718           0 :                 return NULL;
   35719             :         }
   35720             : 
   35721           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35722           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35723             :         }
   35724           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35725           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35726             :         }
   35727             : 
   35728           0 :         return py_netr_AccountSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   35729             : }
   35730             : 
   35731           0 : static PyObject *py_netr_AccountSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35732             : {
   35733           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35734           0 :         PyObject *bigendian_obj = NULL;
   35735           0 :         PyObject *ndr64_obj = NULL;
   35736           0 :         libndr_flags ndr_push_flags = 0;
   35737             : 
   35738           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   35739             :                 discard_const_p(char *, kwnames),
   35740             :                 &bigendian_obj,
   35741             :                 &ndr64_obj)) {
   35742           0 :                 return NULL;
   35743             :         }
   35744             : 
   35745           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35746           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35747             :         }
   35748           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35749           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35750             :         }
   35751             : 
   35752           0 :         return py_netr_AccountSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   35753             : }
   35754             : 
   35755           0 : static PyObject *py_netr_AccountSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   35756             : {
   35757           0 :         const struct ndr_interface_call *call = NULL;
   35758           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35759           0 :         struct ndr_pull *pull = NULL;
   35760           0 :         enum ndr_err_code err;
   35761             : 
   35762           0 :         if (ndr_table_netlogon.num_calls < 11) {
   35763           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_unpack");
   35764           0 :                 return NULL;
   35765             :         }
   35766           0 :         call = &ndr_table_netlogon.calls[10];
   35767             : 
   35768           0 :         pull = ndr_pull_init_blob(blob, object);
   35769           0 :         if (pull == NULL) {
   35770           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35771           0 :                 return NULL;
   35772             :         }
   35773             : 
   35774           0 :         pull->flags |= ndr_pull_flags;
   35775             : 
   35776           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   35777           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35778           0 :                 TALLOC_FREE(pull);
   35779           0 :                 PyErr_SetNdrError(err);
   35780           0 :                 return NULL;
   35781             :         }
   35782           0 :         if (!allow_remaining) {
   35783           0 :                 uint32_t highest_ofs;
   35784             : 
   35785           0 :                 if (pull->offset > pull->relative_highest_offset) {
   35786           0 :                         highest_ofs = pull->offset;
   35787             :                 } else {
   35788           0 :                         highest_ofs = pull->relative_highest_offset;
   35789             :                 }
   35790           0 :                 if (highest_ofs < pull->data_size) {
   35791           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   35792             :                                 "not all bytes consumed ofs[%u] size[%u]",
   35793             :                                 highest_ofs, pull->data_size);
   35794           0 :                         TALLOC_FREE(pull);
   35795           0 :                         PyErr_SetNdrError(err);
   35796           0 :                         return NULL;
   35797             :                 }
   35798             :         }
   35799             : 
   35800           0 :         TALLOC_FREE(pull);
   35801           0 :         Py_RETURN_NONE;
   35802             : }
   35803             : 
   35804           0 : static PyObject *py_netr_AccountSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35805             : {
   35806           0 :         DATA_BLOB blob;
   35807           0 :         Py_ssize_t blob_length = 0;
   35808           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35809           0 :         PyObject *bigendian_obj = NULL;
   35810           0 :         PyObject *ndr64_obj = NULL;
   35811           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35812           0 :         PyObject *allow_remaining_obj = NULL;
   35813           0 :         bool allow_remaining = false;
   35814             : 
   35815           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   35816             :                 discard_const_p(char *, kwnames),
   35817             :                 &blob.data, &blob_length,
   35818             :                 &bigendian_obj,
   35819             :                 &ndr64_obj,
   35820             :                 &allow_remaining_obj)) {
   35821           0 :                 return NULL;
   35822             :         }
   35823           0 :         blob.length = blob_length;
   35824             : 
   35825           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35826           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35827             :         }
   35828           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35829           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35830             :         }
   35831             : 
   35832           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35833           0 :                 allow_remaining = true;
   35834             :         }
   35835             : 
   35836           0 :         return py_netr_AccountSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   35837             : }
   35838             : 
   35839           0 : static PyObject *py_netr_AccountSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35840             : {
   35841           0 :         DATA_BLOB blob;
   35842           0 :         Py_ssize_t blob_length = 0;
   35843           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35844           0 :         PyObject *bigendian_obj = NULL;
   35845           0 :         PyObject *ndr64_obj = NULL;
   35846           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35847           0 :         PyObject *allow_remaining_obj = NULL;
   35848           0 :         bool allow_remaining = false;
   35849             : 
   35850           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   35851             :                 discard_const_p(char *, kwnames),
   35852             :                 &blob.data, &blob_length,
   35853             :                 &bigendian_obj,
   35854             :                 &ndr64_obj,
   35855             :                 &allow_remaining_obj)) {
   35856           0 :                 return NULL;
   35857             :         }
   35858           0 :         blob.length = blob_length;
   35859             : 
   35860           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35861           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35862             :         }
   35863           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35864           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35865             :         }
   35866             : 
   35867           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35868           0 :                 allow_remaining = true;
   35869             :         }
   35870             : 
   35871           0 :         return py_netr_AccountSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   35872             : }
   35873             : 
   35874           0 : static PyObject *py_netr_AccountSync_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   35875             : {
   35876           0 :         const struct ndr_interface_call *call = NULL;
   35877           0 :         struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
   35878           0 :         PyObject *ret;
   35879           0 :         char *retstr;
   35880             : 
   35881           0 :         if (ndr_table_netlogon.num_calls < 11) {
   35882           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_print");
   35883           0 :                 return NULL;
   35884             :         }
   35885           0 :         call = &ndr_table_netlogon.calls[10];
   35886             : 
   35887           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   35888           0 :         ret = PyUnicode_FromString(retstr);
   35889           0 :         TALLOC_FREE(retstr);
   35890             : 
   35891           0 :         return ret;
   35892             : }
   35893             : 
   35894           0 : static PyObject *py_netr_AccountSync_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35895             : {
   35896           0 :         return py_netr_AccountSync_ndr_print(py_obj, "netr_AccountSync_in", NDR_IN);
   35897             : }
   35898             : 
   35899           0 : static PyObject *py_netr_AccountSync_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35900             : {
   35901           0 :         return py_netr_AccountSync_ndr_print(py_obj, "netr_AccountSync_out", NDR_OUT);
   35902             : }
   35903             : 
   35904             : static PyMethodDef py_netr_AccountSync_methods[] = {
   35905             :         { "opnum", (PyCFunction)py_netr_AccountSync_ndr_opnum, METH_NOARGS|METH_CLASS,
   35906             :                 "netlogon.netr_AccountSync.opnum() -> 10 (0x0a) " },
   35907             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   35908             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   35909             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   35910             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   35911             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   35912             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   35913             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   35914             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   35915             :         { "__ndr_print_in__", (PyCFunction)py_netr_AccountSync_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   35916             :         { "__ndr_print_out__", (PyCFunction)py_netr_AccountSync_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   35917             :         { NULL, NULL, 0, NULL }
   35918             : };
   35919             : 
   35920             : 
   35921             : static PyTypeObject netr_AccountSync_Type = {
   35922             :         PyVarObject_HEAD_INIT(NULL, 0)
   35923             :         .tp_name = "netlogon.netr_AccountSync",
   35924             :         .tp_getset = py_netr_AccountSync_getsetters,
   35925             :         .tp_methods = py_netr_AccountSync_methods,
   35926             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   35927             :         .tp_new = py_netr_AccountSync_new,
   35928             : };
   35929             : 
   35930           0 : static bool pack_py_netr_AccountSync_args_in(PyObject *args, PyObject *kwargs, struct netr_AccountSync *r)
   35931             : {
   35932           0 :         PyObject *py_logon_server;
   35933           0 :         PyObject *py_computername;
   35934           0 :         PyObject *py_credential;
   35935           0 :         PyObject *py_return_authenticator;
   35936           0 :         PyObject *py_reference;
   35937           0 :         PyObject *py_level;
   35938           0 :         PyObject *py_buffersize;
   35939           0 :         PyObject *py_recordid;
   35940           0 :         const char *kwnames[] = {
   35941             :                 "logon_server", "computername", "credential", "return_authenticator", "reference", "level", "buffersize", "recordid", NULL
   35942             :         };
   35943             : 
   35944           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)) {
   35945           0 :                 return false;
   35946             :         }
   35947             : 
   35948           0 :         if (py_logon_server == NULL) {
   35949           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   35950           0 :                 return false;
   35951             :         }
   35952           0 :         if (py_logon_server == Py_None) {
   35953           0 :                 r->in.logon_server = NULL;
   35954             :         } else {
   35955           0 :                 r->in.logon_server = NULL;
   35956             :                 {
   35957           0 :                         const char *test_str;
   35958           0 :                         const char *talloc_str;
   35959           0 :                         PyObject *unicode = NULL;
   35960           0 :                         if (PyUnicode_Check(py_logon_server)) {
   35961           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   35962           0 :                                 if (unicode == NULL) {
   35963           0 :                                         return false;
   35964             :                                 }
   35965           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35966           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   35967           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   35968             :                         } else {
   35969           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   35970           0 :                                 return false;
   35971             :                         }
   35972           0 :                         talloc_str = talloc_strdup(r, test_str);
   35973           0 :                         if (unicode != NULL) {
   35974           0 :                                 Py_DECREF(unicode);
   35975             :                         }
   35976           0 :                         if (talloc_str == NULL) {
   35977           0 :                                 PyErr_NoMemory();
   35978           0 :                                 return false;
   35979             :                         }
   35980           0 :                         r->in.logon_server = talloc_str;
   35981             :                 }
   35982             :         }
   35983           0 :         if (py_computername == NULL) {
   35984           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
   35985           0 :                 return false;
   35986             :         }
   35987           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   35988           0 :         if (r->in.computername == NULL) {
   35989           0 :                 PyErr_NoMemory();
   35990           0 :                 return false;
   35991             :         }
   35992             :         {
   35993           0 :                 const char *test_str;
   35994           0 :                 const char *talloc_str;
   35995           0 :                 PyObject *unicode = NULL;
   35996           0 :                 if (PyUnicode_Check(py_computername)) {
   35997           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   35998           0 :                         if (unicode == NULL) {
   35999           0 :                                 return false;
   36000             :                         }
   36001           0 :                         test_str = PyBytes_AS_STRING(unicode);
   36002           0 :                 } else if (PyBytes_Check(py_computername)) {
   36003           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   36004             :                 } else {
   36005           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   36006           0 :                         return false;
   36007             :                 }
   36008           0 :                 talloc_str = talloc_strdup(r, test_str);
   36009           0 :                 if (unicode != NULL) {
   36010           0 :                         Py_DECREF(unicode);
   36011             :                 }
   36012           0 :                 if (talloc_str == NULL) {
   36013           0 :                         PyErr_NoMemory();
   36014           0 :                         return false;
   36015             :                 }
   36016           0 :                 r->in.computername = talloc_str;
   36017             :         }
   36018           0 :         if (py_credential == NULL) {
   36019           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   36020           0 :                 return false;
   36021             :         }
   36022           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   36023           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   36024           0 :                 PyErr_NoMemory();
   36025           0 :                 return false;
   36026             :         }
   36027           0 :         r->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   36028           0 :         if (py_return_authenticator == NULL) {
   36029           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   36030           0 :                 return false;
   36031             :         }
   36032           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   36033           0 :         if (r->in.return_authenticator == NULL) {
   36034           0 :                 PyErr_NoMemory();
   36035           0 :                 return false;
   36036             :         }
   36037           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   36038           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   36039           0 :                 PyErr_NoMemory();
   36040           0 :                 return false;
   36041             :         }
   36042           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   36043           0 :         if (py_reference == NULL) {
   36044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.reference");
   36045           0 :                 return false;
   36046             :         }
   36047             :         {
   36048           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reference));
   36049           0 :                 if (PyLong_Check(py_reference)) {
   36050           0 :                         unsigned long long test_var;
   36051           0 :                         test_var = PyLong_AsUnsignedLongLong(py_reference);
   36052           0 :                         if (PyErr_Occurred() != NULL) {
   36053           0 :                                 return false;
   36054             :                         }
   36055           0 :                         if (test_var > uint_max) {
   36056           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36057             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36058           0 :                                 return false;
   36059             :                         }
   36060           0 :                         r->in.reference = test_var;
   36061             :                 } else {
   36062           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36063             :                           PyLong_Type.tp_name);
   36064           0 :                         return false;
   36065             :                 }
   36066             :         }
   36067           0 :         if (py_level == NULL) {
   36068           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   36069           0 :                 return false;
   36070             :         }
   36071             :         {
   36072           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   36073           0 :                 if (PyLong_Check(py_level)) {
   36074           0 :                         unsigned long long test_var;
   36075           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   36076           0 :                         if (PyErr_Occurred() != NULL) {
   36077           0 :                                 return false;
   36078             :                         }
   36079           0 :                         if (test_var > uint_max) {
   36080           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36081             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36082           0 :                                 return false;
   36083             :                         }
   36084           0 :                         r->in.level = test_var;
   36085             :                 } else {
   36086           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36087             :                           PyLong_Type.tp_name);
   36088           0 :                         return false;
   36089             :                 }
   36090             :         }
   36091           0 :         if (py_buffersize == NULL) {
   36092           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.buffersize");
   36093           0 :                 return false;
   36094             :         }
   36095             :         {
   36096           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.buffersize));
   36097           0 :                 if (PyLong_Check(py_buffersize)) {
   36098           0 :                         unsigned long long test_var;
   36099           0 :                         test_var = PyLong_AsUnsignedLongLong(py_buffersize);
   36100           0 :                         if (PyErr_Occurred() != NULL) {
   36101           0 :                                 return false;
   36102             :                         }
   36103           0 :                         if (test_var > uint_max) {
   36104           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36105             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36106           0 :                                 return false;
   36107             :                         }
   36108           0 :                         r->in.buffersize = test_var;
   36109             :                 } else {
   36110           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36111             :                           PyLong_Type.tp_name);
   36112           0 :                         return false;
   36113             :                 }
   36114             :         }
   36115           0 :         if (py_recordid == NULL) {
   36116           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.recordid");
   36117           0 :                 return false;
   36118             :         }
   36119           0 :         r->in.recordid = talloc_ptrtype(r, r->in.recordid);
   36120           0 :         if (r->in.recordid == NULL) {
   36121           0 :                 PyErr_NoMemory();
   36122           0 :                 return false;
   36123             :         }
   36124           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, py_recordid, return false;);
   36125           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_recordid)) == NULL) {
   36126           0 :                 PyErr_NoMemory();
   36127           0 :                 return false;
   36128             :         }
   36129           0 :         r->in.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_recordid);
   36130           0 :         return true;
   36131             : }
   36132             : 
   36133           0 : static PyObject *unpack_py_netr_AccountSync_args_out(struct netr_AccountSync *r)
   36134             : {
   36135           0 :         PyObject *result;
   36136           0 :         PyObject *py_return_authenticator;
   36137           0 :         PyObject *py_buffer;
   36138           0 :         PyObject *py_count_returned;
   36139           0 :         PyObject *py_total_entries;
   36140           0 :         PyObject *py_next_reference;
   36141           0 :         PyObject *py_recordid;
   36142           0 :         result = PyTuple_New(6);
   36143           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   36144           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   36145           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, r->out.buffer, r->out.buffer);
   36146           0 :         PyTuple_SetItem(result, 1, py_buffer);
   36147           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.count_returned));
   36148           0 :         PyTuple_SetItem(result, 2, py_count_returned);
   36149           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.total_entries));
   36150           0 :         PyTuple_SetItem(result, 3, py_total_entries);
   36151           0 :         py_next_reference = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.next_reference));
   36152           0 :         PyTuple_SetItem(result, 4, py_next_reference);
   36153           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, r->out.recordid, r->out.recordid);
   36154           0 :         PyTuple_SetItem(result, 5, py_recordid);
   36155           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   36156           0 :                 PyErr_SetNTSTATUS(r->out.result);
   36157           0 :                 return NULL;
   36158             :         }
   36159             : 
   36160           0 :         return result;
   36161             : }
   36162             : 
   36163             : 
   36164           0 : static PyObject *py_netr_GetDcName_in_get_logon_server(PyObject *obj, void *closure)
   36165             : {
   36166           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(obj);
   36167           0 :         PyObject *py_logon_server;
   36168           0 :         if (object->in.logon_server == NULL) {
   36169           0 :                 Py_RETURN_NONE;
   36170             :         }
   36171           0 :         if (object->in.logon_server == NULL) {
   36172           0 :                 py_logon_server = Py_None;
   36173           0 :                 Py_INCREF(py_logon_server);
   36174             :         } else {
   36175           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   36176             :         }
   36177           0 :         return py_logon_server;
   36178             : }
   36179             : 
   36180           0 : static int py_netr_GetDcName_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   36181             : {
   36182           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
   36183           0 :         if (value == NULL) {
   36184           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   36185           0 :                 return -1;
   36186             :         }
   36187           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   36188           0 :         if (object->in.logon_server == NULL) {
   36189           0 :                 PyErr_NoMemory();
   36190           0 :                 return -1;
   36191             :         }
   36192             :         {
   36193           0 :                 const char *test_str;
   36194           0 :                 const char *talloc_str;
   36195           0 :                 PyObject *unicode = NULL;
   36196           0 :                 if (PyUnicode_Check(value)) {
   36197           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36198           0 :                         if (unicode == NULL) {
   36199           0 :                                 return -1;
   36200             :                         }
   36201           0 :                         test_str = PyBytes_AS_STRING(unicode);
   36202           0 :                 } else if (PyBytes_Check(value)) {
   36203           0 :                         test_str = PyBytes_AS_STRING(value);
   36204             :                 } else {
   36205           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36206           0 :                         return -1;
   36207             :                 }
   36208           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36209           0 :                 if (unicode != NULL) {
   36210           0 :                         Py_DECREF(unicode);
   36211             :                 }
   36212           0 :                 if (talloc_str == NULL) {
   36213           0 :                         PyErr_NoMemory();
   36214           0 :                         return -1;
   36215             :                 }
   36216           0 :                 object->in.logon_server = talloc_str;
   36217             :         }
   36218           0 :         return 0;
   36219             : }
   36220             : 
   36221           0 : static PyObject *py_netr_GetDcName_in_get_domainname(PyObject *obj, void *closure)
   36222             : {
   36223           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(obj);
   36224           0 :         PyObject *py_domainname;
   36225           0 :         if (object->in.domainname == NULL) {
   36226           0 :                 Py_RETURN_NONE;
   36227             :         }
   36228           0 :         if (object->in.domainname == NULL) {
   36229           0 :                 py_domainname = Py_None;
   36230           0 :                 Py_INCREF(py_domainname);
   36231             :         } else {
   36232           0 :                 if (object->in.domainname == NULL) {
   36233           0 :                         py_domainname = Py_None;
   36234           0 :                         Py_INCREF(py_domainname);
   36235             :                 } else {
   36236           0 :                         py_domainname = PyUnicode_Decode(object->in.domainname, strlen(object->in.domainname), "utf-8", "ignore");
   36237             :                 }
   36238             :         }
   36239           0 :         return py_domainname;
   36240             : }
   36241             : 
   36242           0 : static int py_netr_GetDcName_in_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
   36243             : {
   36244           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
   36245           0 :         if (value == NULL) {
   36246           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domainname");
   36247           0 :                 return -1;
   36248             :         }
   36249           0 :         if (value == Py_None) {
   36250           0 :                 object->in.domainname = NULL;
   36251             :         } else {
   36252           0 :                 object->in.domainname = NULL;
   36253             :                 {
   36254           0 :                         const char *test_str;
   36255           0 :                         const char *talloc_str;
   36256           0 :                         PyObject *unicode = NULL;
   36257           0 :                         if (PyUnicode_Check(value)) {
   36258           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36259           0 :                                 if (unicode == NULL) {
   36260           0 :                                         return -1;
   36261             :                                 }
   36262           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36263           0 :                         } else if (PyBytes_Check(value)) {
   36264           0 :                                 test_str = PyBytes_AS_STRING(value);
   36265             :                         } else {
   36266           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36267           0 :                                 return -1;
   36268             :                         }
   36269           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36270           0 :                         if (unicode != NULL) {
   36271           0 :                                 Py_DECREF(unicode);
   36272             :                         }
   36273           0 :                         if (talloc_str == NULL) {
   36274           0 :                                 PyErr_NoMemory();
   36275           0 :                                 return -1;
   36276             :                         }
   36277           0 :                         object->in.domainname = talloc_str;
   36278             :                 }
   36279             :         }
   36280           0 :         return 0;
   36281             : }
   36282             : 
   36283           0 : static PyObject *py_netr_GetDcName_out_get_dcname(PyObject *obj, void *closure)
   36284             : {
   36285           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(obj);
   36286           0 :         PyObject *py_dcname;
   36287           0 :         if (object->out.dcname == NULL) {
   36288           0 :                 Py_RETURN_NONE;
   36289             :         }
   36290           0 :         if (*object->out.dcname == NULL) {
   36291           0 :                 py_dcname = Py_None;
   36292           0 :                 Py_INCREF(py_dcname);
   36293             :         } else {
   36294           0 :                 if (*object->out.dcname == NULL) {
   36295           0 :                         py_dcname = Py_None;
   36296           0 :                         Py_INCREF(py_dcname);
   36297             :                 } else {
   36298           0 :                         py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
   36299             :                 }
   36300             :         }
   36301           0 :         return py_dcname;
   36302             : }
   36303             : 
   36304           0 : static int py_netr_GetDcName_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   36305             : {
   36306           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
   36307           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
   36308           0 :         if (value == NULL) {
   36309           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.dcname");
   36310           0 :                 return -1;
   36311             :         }
   36312           0 :         object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
   36313           0 :         if (object->out.dcname == NULL) {
   36314           0 :                 PyErr_NoMemory();
   36315           0 :                 return -1;
   36316             :         }
   36317           0 :         if (value == Py_None) {
   36318           0 :                 *object->out.dcname = NULL;
   36319             :         } else {
   36320           0 :                 *object->out.dcname = NULL;
   36321             :                 {
   36322           0 :                         const char *test_str;
   36323           0 :                         const char *talloc_str;
   36324           0 :                         PyObject *unicode = NULL;
   36325           0 :                         if (PyUnicode_Check(value)) {
   36326           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36327           0 :                                 if (unicode == NULL) {
   36328           0 :                                         return -1;
   36329             :                                 }
   36330           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36331           0 :                         } else if (PyBytes_Check(value)) {
   36332           0 :                                 test_str = PyBytes_AS_STRING(value);
   36333             :                         } else {
   36334           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36335           0 :                                 return -1;
   36336             :                         }
   36337           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36338           0 :                         if (unicode != NULL) {
   36339           0 :                                 Py_DECREF(unicode);
   36340             :                         }
   36341           0 :                         if (talloc_str == NULL) {
   36342           0 :                                 PyErr_NoMemory();
   36343           0 :                                 return -1;
   36344             :                         }
   36345           0 :                         *object->out.dcname = talloc_str;
   36346             :                 }
   36347             :         }
   36348           0 :         return 0;
   36349             : }
   36350             : 
   36351           0 : static PyObject *py_netr_GetDcName_get_result(PyObject *obj, void *closure)
   36352             : {
   36353           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(obj);
   36354           0 :         PyObject *py_result;
   36355           0 :         py_result = PyErr_FromWERROR(object->out.result);
   36356           0 :         return py_result;
   36357             : }
   36358             : 
   36359           0 : static int py_netr_GetDcName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   36360             : {
   36361           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
   36362           0 :         if (value == NULL) {
   36363           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   36364           0 :                 return -1;
   36365             :         }
   36366           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   36367           0 :         return 0;
   36368             : }
   36369             : 
   36370             : static PyGetSetDef py_netr_GetDcName_getsetters[] = {
   36371             :         {
   36372             :                 .name = discard_const_p(char, "in_logon_server"),
   36373             :                 .get = py_netr_GetDcName_in_get_logon_server,
   36374             :                 .set = py_netr_GetDcName_in_set_logon_server,
   36375             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36376             :         },
   36377             :         {
   36378             :                 .name = discard_const_p(char, "in_domainname"),
   36379             :                 .get = py_netr_GetDcName_in_get_domainname,
   36380             :                 .set = py_netr_GetDcName_in_set_domainname,
   36381             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36382             :         },
   36383             :         {
   36384             :                 .name = discard_const_p(char, "out_dcname"),
   36385             :                 .get = py_netr_GetDcName_out_get_dcname,
   36386             :                 .set = py_netr_GetDcName_out_set_dcname,
   36387             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36388             :         },
   36389             :         {
   36390             :                 .name = discard_const_p(char, "result"),
   36391             :                 .get = py_netr_GetDcName_get_result,
   36392             :                 .set = py_netr_GetDcName_set_result,
   36393             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   36394             :         },
   36395             :         { .name = NULL }
   36396             : };
   36397             : 
   36398           0 : static PyObject *py_netr_GetDcName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   36399             : {
   36400           0 :         PyObject *self = pytalloc_new(struct netr_GetDcName, type);
   36401           0 :         return self;
   36402             : }
   36403             : 
   36404           0 : static PyObject *py_netr_GetDcName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   36405             : {
   36406             : 
   36407             : 
   36408           0 :         return PyLong_FromLong(11);
   36409             : }
   36410             : 
   36411           0 : static PyObject *py_netr_GetDcName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   36412             : {
   36413           0 :         const struct ndr_interface_call *call = NULL;
   36414           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
   36415           0 :         PyObject *ret = NULL;
   36416           0 :         struct ndr_push *push = NULL;
   36417           0 :         DATA_BLOB blob;
   36418           0 :         enum ndr_err_code err;
   36419             : 
   36420           0 :         if (ndr_table_netlogon.num_calls < 12) {
   36421           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_pack");
   36422           0 :                 return NULL;
   36423             :         }
   36424           0 :         call = &ndr_table_netlogon.calls[11];
   36425             : 
   36426           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   36427           0 :         if (push == NULL) {
   36428           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36429           0 :                 return NULL;
   36430             :         }
   36431             : 
   36432           0 :         push->flags |= ndr_push_flags;
   36433             : 
   36434           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   36435           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36436           0 :                 TALLOC_FREE(push);
   36437           0 :                 PyErr_SetNdrError(err);
   36438           0 :                 return NULL;
   36439             :         }
   36440           0 :         blob = ndr_push_blob(push);
   36441           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   36442           0 :         TALLOC_FREE(push);
   36443           0 :         return ret;
   36444             : }
   36445             : 
   36446           0 : static PyObject *py_netr_GetDcName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36447             : {
   36448           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36449           0 :         PyObject *bigendian_obj = NULL;
   36450           0 :         PyObject *ndr64_obj = NULL;
   36451           0 :         libndr_flags ndr_push_flags = 0;
   36452             : 
   36453           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   36454             :                 discard_const_p(char *, kwnames),
   36455             :                 &bigendian_obj,
   36456             :                 &ndr64_obj)) {
   36457           0 :                 return NULL;
   36458             :         }
   36459             : 
   36460           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36461           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36462             :         }
   36463           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36464           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36465             :         }
   36466             : 
   36467           0 :         return py_netr_GetDcName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   36468             : }
   36469             : 
   36470           0 : static PyObject *py_netr_GetDcName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36471             : {
   36472           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36473           0 :         PyObject *bigendian_obj = NULL;
   36474           0 :         PyObject *ndr64_obj = NULL;
   36475           0 :         libndr_flags ndr_push_flags = 0;
   36476             : 
   36477           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   36478             :                 discard_const_p(char *, kwnames),
   36479             :                 &bigendian_obj,
   36480             :                 &ndr64_obj)) {
   36481           0 :                 return NULL;
   36482             :         }
   36483             : 
   36484           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36485           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36486             :         }
   36487           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36488           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36489             :         }
   36490             : 
   36491           0 :         return py_netr_GetDcName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   36492             : }
   36493             : 
   36494           0 : static PyObject *py_netr_GetDcName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   36495             : {
   36496           0 :         const struct ndr_interface_call *call = NULL;
   36497           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
   36498           0 :         struct ndr_pull *pull = NULL;
   36499           0 :         enum ndr_err_code err;
   36500             : 
   36501           0 :         if (ndr_table_netlogon.num_calls < 12) {
   36502           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_unpack");
   36503           0 :                 return NULL;
   36504             :         }
   36505           0 :         call = &ndr_table_netlogon.calls[11];
   36506             : 
   36507           0 :         pull = ndr_pull_init_blob(blob, object);
   36508           0 :         if (pull == NULL) {
   36509           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36510           0 :                 return NULL;
   36511             :         }
   36512             : 
   36513           0 :         pull->flags |= ndr_pull_flags;
   36514             : 
   36515           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   36516           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36517           0 :                 TALLOC_FREE(pull);
   36518           0 :                 PyErr_SetNdrError(err);
   36519           0 :                 return NULL;
   36520             :         }
   36521           0 :         if (!allow_remaining) {
   36522           0 :                 uint32_t highest_ofs;
   36523             : 
   36524           0 :                 if (pull->offset > pull->relative_highest_offset) {
   36525           0 :                         highest_ofs = pull->offset;
   36526             :                 } else {
   36527           0 :                         highest_ofs = pull->relative_highest_offset;
   36528             :                 }
   36529           0 :                 if (highest_ofs < pull->data_size) {
   36530           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   36531             :                                 "not all bytes consumed ofs[%u] size[%u]",
   36532             :                                 highest_ofs, pull->data_size);
   36533           0 :                         TALLOC_FREE(pull);
   36534           0 :                         PyErr_SetNdrError(err);
   36535           0 :                         return NULL;
   36536             :                 }
   36537             :         }
   36538             : 
   36539           0 :         TALLOC_FREE(pull);
   36540           0 :         Py_RETURN_NONE;
   36541             : }
   36542             : 
   36543           0 : static PyObject *py_netr_GetDcName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36544             : {
   36545           0 :         DATA_BLOB blob;
   36546           0 :         Py_ssize_t blob_length = 0;
   36547           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36548           0 :         PyObject *bigendian_obj = NULL;
   36549           0 :         PyObject *ndr64_obj = NULL;
   36550           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36551           0 :         PyObject *allow_remaining_obj = NULL;
   36552           0 :         bool allow_remaining = false;
   36553             : 
   36554           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   36555             :                 discard_const_p(char *, kwnames),
   36556             :                 &blob.data, &blob_length,
   36557             :                 &bigendian_obj,
   36558             :                 &ndr64_obj,
   36559             :                 &allow_remaining_obj)) {
   36560           0 :                 return NULL;
   36561             :         }
   36562           0 :         blob.length = blob_length;
   36563             : 
   36564           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36565           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36566             :         }
   36567           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36568           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36569             :         }
   36570             : 
   36571           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36572           0 :                 allow_remaining = true;
   36573             :         }
   36574             : 
   36575           0 :         return py_netr_GetDcName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   36576             : }
   36577             : 
   36578           0 : static PyObject *py_netr_GetDcName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36579             : {
   36580           0 :         DATA_BLOB blob;
   36581           0 :         Py_ssize_t blob_length = 0;
   36582           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36583           0 :         PyObject *bigendian_obj = NULL;
   36584           0 :         PyObject *ndr64_obj = NULL;
   36585           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36586           0 :         PyObject *allow_remaining_obj = NULL;
   36587           0 :         bool allow_remaining = false;
   36588             : 
   36589           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   36590             :                 discard_const_p(char *, kwnames),
   36591             :                 &blob.data, &blob_length,
   36592             :                 &bigendian_obj,
   36593             :                 &ndr64_obj,
   36594             :                 &allow_remaining_obj)) {
   36595           0 :                 return NULL;
   36596             :         }
   36597           0 :         blob.length = blob_length;
   36598             : 
   36599           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36600           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36601             :         }
   36602           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36603           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36604             :         }
   36605             : 
   36606           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36607           0 :                 allow_remaining = true;
   36608             :         }
   36609             : 
   36610           0 :         return py_netr_GetDcName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   36611             : }
   36612             : 
   36613           0 : static PyObject *py_netr_GetDcName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   36614             : {
   36615           0 :         const struct ndr_interface_call *call = NULL;
   36616           0 :         struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
   36617           0 :         PyObject *ret;
   36618           0 :         char *retstr;
   36619             : 
   36620           0 :         if (ndr_table_netlogon.num_calls < 12) {
   36621           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_print");
   36622           0 :                 return NULL;
   36623             :         }
   36624           0 :         call = &ndr_table_netlogon.calls[11];
   36625             : 
   36626           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   36627           0 :         ret = PyUnicode_FromString(retstr);
   36628           0 :         TALLOC_FREE(retstr);
   36629             : 
   36630           0 :         return ret;
   36631             : }
   36632             : 
   36633           0 : static PyObject *py_netr_GetDcName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36634             : {
   36635           0 :         return py_netr_GetDcName_ndr_print(py_obj, "netr_GetDcName_in", NDR_IN);
   36636             : }
   36637             : 
   36638           0 : static PyObject *py_netr_GetDcName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36639             : {
   36640           0 :         return py_netr_GetDcName_ndr_print(py_obj, "netr_GetDcName_out", NDR_OUT);
   36641             : }
   36642             : 
   36643             : static PyMethodDef py_netr_GetDcName_methods[] = {
   36644             :         { "opnum", (PyCFunction)py_netr_GetDcName_ndr_opnum, METH_NOARGS|METH_CLASS,
   36645             :                 "netlogon.netr_GetDcName.opnum() -> 11 (0x0b) " },
   36646             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   36647             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   36648             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   36649             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   36650             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   36651             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   36652             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   36653             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   36654             :         { "__ndr_print_in__", (PyCFunction)py_netr_GetDcName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   36655             :         { "__ndr_print_out__", (PyCFunction)py_netr_GetDcName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   36656             :         { NULL, NULL, 0, NULL }
   36657             : };
   36658             : 
   36659             : 
   36660             : static PyTypeObject netr_GetDcName_Type = {
   36661             :         PyVarObject_HEAD_INIT(NULL, 0)
   36662             :         .tp_name = "netlogon.netr_GetDcName",
   36663             :         .tp_getset = py_netr_GetDcName_getsetters,
   36664             :         .tp_methods = py_netr_GetDcName_methods,
   36665             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   36666             :         .tp_new = py_netr_GetDcName_new,
   36667             : };
   36668             : 
   36669           0 : static bool pack_py_netr_GetDcName_args_in(PyObject *args, PyObject *kwargs, struct netr_GetDcName *r)
   36670             : {
   36671           0 :         PyObject *py_logon_server;
   36672           0 :         PyObject *py_domainname;
   36673           0 :         const char *kwnames[] = {
   36674             :                 "logon_server", "domainname", NULL
   36675             :         };
   36676             : 
   36677           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_GetDcName", discard_const_p(char *, kwnames), &py_logon_server, &py_domainname)) {
   36678           0 :                 return false;
   36679             :         }
   36680             : 
   36681           0 :         if (py_logon_server == NULL) {
   36682           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   36683           0 :                 return false;
   36684             :         }
   36685           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   36686           0 :         if (r->in.logon_server == NULL) {
   36687           0 :                 PyErr_NoMemory();
   36688           0 :                 return false;
   36689             :         }
   36690             :         {
   36691           0 :                 const char *test_str;
   36692           0 :                 const char *talloc_str;
   36693           0 :                 PyObject *unicode = NULL;
   36694           0 :                 if (PyUnicode_Check(py_logon_server)) {
   36695           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   36696           0 :                         if (unicode == NULL) {
   36697           0 :                                 return false;
   36698             :                         }
   36699           0 :                         test_str = PyBytes_AS_STRING(unicode);
   36700           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   36701           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   36702             :                 } else {
   36703           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   36704           0 :                         return false;
   36705             :                 }
   36706           0 :                 talloc_str = talloc_strdup(r, test_str);
   36707           0 :                 if (unicode != NULL) {
   36708           0 :                         Py_DECREF(unicode);
   36709             :                 }
   36710           0 :                 if (talloc_str == NULL) {
   36711           0 :                         PyErr_NoMemory();
   36712           0 :                         return false;
   36713             :                 }
   36714           0 :                 r->in.logon_server = talloc_str;
   36715             :         }
   36716           0 :         if (py_domainname == NULL) {
   36717           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domainname");
   36718           0 :                 return false;
   36719             :         }
   36720           0 :         if (py_domainname == Py_None) {
   36721           0 :                 r->in.domainname = NULL;
   36722             :         } else {
   36723           0 :                 r->in.domainname = NULL;
   36724             :                 {
   36725           0 :                         const char *test_str;
   36726           0 :                         const char *talloc_str;
   36727           0 :                         PyObject *unicode = NULL;
   36728           0 :                         if (PyUnicode_Check(py_domainname)) {
   36729           0 :                                 unicode = PyUnicode_AsEncodedString(py_domainname, "utf-8", "ignore");
   36730           0 :                                 if (unicode == NULL) {
   36731           0 :                                         return false;
   36732             :                                 }
   36733           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36734           0 :                         } else if (PyBytes_Check(py_domainname)) {
   36735           0 :                                 test_str = PyBytes_AS_STRING(py_domainname);
   36736             :                         } else {
   36737           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domainname)->tp_name);
   36738           0 :                                 return false;
   36739             :                         }
   36740           0 :                         talloc_str = talloc_strdup(r, test_str);
   36741           0 :                         if (unicode != NULL) {
   36742           0 :                                 Py_DECREF(unicode);
   36743             :                         }
   36744           0 :                         if (talloc_str == NULL) {
   36745           0 :                                 PyErr_NoMemory();
   36746           0 :                                 return false;
   36747             :                         }
   36748           0 :                         r->in.domainname = talloc_str;
   36749             :                 }
   36750             :         }
   36751           0 :         return true;
   36752             : }
   36753             : 
   36754           0 : static PyObject *unpack_py_netr_GetDcName_args_out(struct netr_GetDcName *r)
   36755             : {
   36756           0 :         PyObject *result;
   36757           0 :         PyObject *py_dcname;
   36758           0 :         if (*r->out.dcname == NULL) {
   36759           0 :                 py_dcname = Py_None;
   36760           0 :                 Py_INCREF(py_dcname);
   36761             :         } else {
   36762           0 :                 if (*r->out.dcname == NULL) {
   36763           0 :                         py_dcname = Py_None;
   36764           0 :                         Py_INCREF(py_dcname);
   36765             :                 } else {
   36766           0 :                         py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
   36767             :                 }
   36768             :         }
   36769           0 :         result = py_dcname;
   36770           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   36771           0 :                 PyErr_SetWERROR(r->out.result);
   36772           0 :                 return NULL;
   36773             :         }
   36774             : 
   36775           0 :         return result;
   36776             : }
   36777             : 
   36778             : 
   36779           0 : static PyObject *py_netr_LogonControl_in_get_logon_server(PyObject *obj, void *closure)
   36780             : {
   36781           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(obj);
   36782           0 :         PyObject *py_logon_server;
   36783           0 :         if (object->in.logon_server == NULL) {
   36784           0 :                 Py_RETURN_NONE;
   36785             :         }
   36786           0 :         if (object->in.logon_server == NULL) {
   36787           0 :                 py_logon_server = Py_None;
   36788           0 :                 Py_INCREF(py_logon_server);
   36789             :         } else {
   36790           0 :                 if (object->in.logon_server == NULL) {
   36791           0 :                         py_logon_server = Py_None;
   36792           0 :                         Py_INCREF(py_logon_server);
   36793             :                 } else {
   36794           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   36795             :                 }
   36796             :         }
   36797           0 :         return py_logon_server;
   36798             : }
   36799             : 
   36800           0 : static int py_netr_LogonControl_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   36801             : {
   36802           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
   36803           0 :         if (value == NULL) {
   36804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   36805           0 :                 return -1;
   36806             :         }
   36807           0 :         if (value == Py_None) {
   36808           0 :                 object->in.logon_server = NULL;
   36809             :         } else {
   36810           0 :                 object->in.logon_server = NULL;
   36811             :                 {
   36812           0 :                         const char *test_str;
   36813           0 :                         const char *talloc_str;
   36814           0 :                         PyObject *unicode = NULL;
   36815           0 :                         if (PyUnicode_Check(value)) {
   36816           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36817           0 :                                 if (unicode == NULL) {
   36818           0 :                                         return -1;
   36819             :                                 }
   36820           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36821           0 :                         } else if (PyBytes_Check(value)) {
   36822           0 :                                 test_str = PyBytes_AS_STRING(value);
   36823             :                         } else {
   36824           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36825           0 :                                 return -1;
   36826             :                         }
   36827           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36828           0 :                         if (unicode != NULL) {
   36829           0 :                                 Py_DECREF(unicode);
   36830             :                         }
   36831           0 :                         if (talloc_str == NULL) {
   36832           0 :                                 PyErr_NoMemory();
   36833           0 :                                 return -1;
   36834             :                         }
   36835           0 :                         object->in.logon_server = talloc_str;
   36836             :                 }
   36837             :         }
   36838           0 :         return 0;
   36839             : }
   36840             : 
   36841           0 : static PyObject *py_netr_LogonControl_in_get_function_code(PyObject *obj, void *closure)
   36842             : {
   36843           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(obj);
   36844           0 :         PyObject *py_function_code;
   36845           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)(object->in.function_code));
   36846           0 :         return py_function_code;
   36847             : }
   36848             : 
   36849           0 : static int py_netr_LogonControl_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   36850             : {
   36851           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
   36852           0 :         if (value == NULL) {
   36853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.function_code");
   36854           0 :                 return -1;
   36855             :         }
   36856             :         {
   36857           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   36858           0 :                 if (PyLong_Check(value)) {
   36859           0 :                         unsigned long long test_var;
   36860           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36861           0 :                         if (PyErr_Occurred() != NULL) {
   36862           0 :                                 return -1;
   36863             :                         }
   36864           0 :                         if (test_var > uint_max) {
   36865           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36866             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36867           0 :                                 return -1;
   36868             :                         }
   36869           0 :                         object->in.function_code = test_var;
   36870             :                 } else {
   36871           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36872             :                           PyLong_Type.tp_name);
   36873           0 :                         return -1;
   36874             :                 }
   36875             :         }
   36876           0 :         return 0;
   36877             : }
   36878             : 
   36879           0 : static PyObject *py_netr_LogonControl_in_get_level(PyObject *obj, void *closure)
   36880             : {
   36881           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(obj);
   36882           0 :         PyObject *py_level;
   36883           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   36884           0 :         return py_level;
   36885             : }
   36886             : 
   36887           0 : static int py_netr_LogonControl_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   36888             : {
   36889           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
   36890           0 :         if (value == NULL) {
   36891           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   36892           0 :                 return -1;
   36893             :         }
   36894             :         {
   36895           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   36896           0 :                 if (PyLong_Check(value)) {
   36897           0 :                         unsigned long long test_var;
   36898           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36899           0 :                         if (PyErr_Occurred() != NULL) {
   36900           0 :                                 return -1;
   36901             :                         }
   36902           0 :                         if (test_var > uint_max) {
   36903           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36904             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36905           0 :                                 return -1;
   36906             :                         }
   36907           0 :                         object->in.level = test_var;
   36908             :                 } else {
   36909           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36910             :                           PyLong_Type.tp_name);
   36911           0 :                         return -1;
   36912             :                 }
   36913             :         }
   36914           0 :         return 0;
   36915             : }
   36916             : 
   36917           0 : static PyObject *py_netr_LogonControl_out_get_query(PyObject *obj, void *closure)
   36918             : {
   36919           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(obj);
   36920           0 :         PyObject *py_query;
   36921           0 :         if (object->out.query == NULL) {
   36922           0 :                 Py_RETURN_NONE;
   36923             :         }
   36924           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");
   36925           0 :         if (py_query == NULL) {
   36926           0 :                 return NULL;
   36927             :         }
   36928           0 :         return py_query;
   36929             : }
   36930             : 
   36931           0 : static int py_netr_LogonControl_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   36932             : {
   36933           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
   36934           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   36935           0 :         if (value == NULL) {
   36936           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.query");
   36937           0 :                 return -1;
   36938             :         }
   36939           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   36940           0 :         if (object->out.query == NULL) {
   36941           0 :                 PyErr_NoMemory();
   36942           0 :                 return -1;
   36943             :         }
   36944             :         {
   36945           0 :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   36946           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");
   36947           0 :                 if (query_switch_1 == NULL) {
   36948           0 :                         return -1;
   36949             :                 }
   36950           0 :                 object->out.query = query_switch_1;
   36951             :         }
   36952           0 :         return 0;
   36953             : }
   36954             : 
   36955           0 : static PyObject *py_netr_LogonControl_get_result(PyObject *obj, void *closure)
   36956             : {
   36957           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(obj);
   36958           0 :         PyObject *py_result;
   36959           0 :         py_result = PyErr_FromWERROR(object->out.result);
   36960           0 :         return py_result;
   36961             : }
   36962             : 
   36963           0 : static int py_netr_LogonControl_set_result(PyObject *py_obj, PyObject *value, void *closure)
   36964             : {
   36965           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
   36966           0 :         if (value == NULL) {
   36967           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   36968           0 :                 return -1;
   36969             :         }
   36970           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   36971           0 :         return 0;
   36972             : }
   36973             : 
   36974             : static PyGetSetDef py_netr_LogonControl_getsetters[] = {
   36975             :         {
   36976             :                 .name = discard_const_p(char, "in_logon_server"),
   36977             :                 .get = py_netr_LogonControl_in_get_logon_server,
   36978             :                 .set = py_netr_LogonControl_in_set_logon_server,
   36979             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36980             :         },
   36981             :         {
   36982             :                 .name = discard_const_p(char, "in_function_code"),
   36983             :                 .get = py_netr_LogonControl_in_get_function_code,
   36984             :                 .set = py_netr_LogonControl_in_set_function_code,
   36985             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   36986             :         },
   36987             :         {
   36988             :                 .name = discard_const_p(char, "in_level"),
   36989             :                 .get = py_netr_LogonControl_in_get_level,
   36990             :                 .set = py_netr_LogonControl_in_set_level,
   36991             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36992             :         },
   36993             :         {
   36994             :                 .name = discard_const_p(char, "out_query"),
   36995             :                 .get = py_netr_LogonControl_out_get_query,
   36996             :                 .set = py_netr_LogonControl_out_set_query,
   36997             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   36998             :         },
   36999             :         {
   37000             :                 .name = discard_const_p(char, "result"),
   37001             :                 .get = py_netr_LogonControl_get_result,
   37002             :                 .set = py_netr_LogonControl_set_result,
   37003             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   37004             :         },
   37005             :         { .name = NULL }
   37006             : };
   37007             : 
   37008           0 : static PyObject *py_netr_LogonControl_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   37009             : {
   37010           0 :         PyObject *self = pytalloc_new(struct netr_LogonControl, type);
   37011           0 :         struct netr_LogonControl *_self = (struct netr_LogonControl *)pytalloc_get_ptr(self);
   37012           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   37013           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   37014           0 :         return self;
   37015             : }
   37016             : 
   37017           0 : static PyObject *py_netr_LogonControl_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   37018             : {
   37019             : 
   37020             : 
   37021           0 :         return PyLong_FromLong(12);
   37022             : }
   37023             : 
   37024           0 : static PyObject *py_netr_LogonControl_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   37025             : {
   37026           0 :         const struct ndr_interface_call *call = NULL;
   37027           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
   37028           0 :         PyObject *ret = NULL;
   37029           0 :         struct ndr_push *push = NULL;
   37030           0 :         DATA_BLOB blob;
   37031           0 :         enum ndr_err_code err;
   37032             : 
   37033           0 :         if (ndr_table_netlogon.num_calls < 13) {
   37034           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_pack");
   37035           0 :                 return NULL;
   37036             :         }
   37037           0 :         call = &ndr_table_netlogon.calls[12];
   37038             : 
   37039           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37040           0 :         if (push == NULL) {
   37041           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37042           0 :                 return NULL;
   37043             :         }
   37044             : 
   37045           0 :         push->flags |= ndr_push_flags;
   37046             : 
   37047           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37048           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37049           0 :                 TALLOC_FREE(push);
   37050           0 :                 PyErr_SetNdrError(err);
   37051           0 :                 return NULL;
   37052             :         }
   37053           0 :         blob = ndr_push_blob(push);
   37054           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37055           0 :         TALLOC_FREE(push);
   37056           0 :         return ret;
   37057             : }
   37058             : 
   37059           0 : static PyObject *py_netr_LogonControl_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37060             : {
   37061           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37062           0 :         PyObject *bigendian_obj = NULL;
   37063           0 :         PyObject *ndr64_obj = NULL;
   37064           0 :         libndr_flags ndr_push_flags = 0;
   37065             : 
   37066           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37067             :                 discard_const_p(char *, kwnames),
   37068             :                 &bigendian_obj,
   37069             :                 &ndr64_obj)) {
   37070           0 :                 return NULL;
   37071             :         }
   37072             : 
   37073           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37074           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37075             :         }
   37076           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37077           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37078             :         }
   37079             : 
   37080           0 :         return py_netr_LogonControl_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37081             : }
   37082             : 
   37083           0 : static PyObject *py_netr_LogonControl_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37084             : {
   37085           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37086           0 :         PyObject *bigendian_obj = NULL;
   37087           0 :         PyObject *ndr64_obj = NULL;
   37088           0 :         libndr_flags ndr_push_flags = 0;
   37089             : 
   37090           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37091             :                 discard_const_p(char *, kwnames),
   37092             :                 &bigendian_obj,
   37093             :                 &ndr64_obj)) {
   37094           0 :                 return NULL;
   37095             :         }
   37096             : 
   37097           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37098           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37099             :         }
   37100           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37101           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37102             :         }
   37103             : 
   37104           0 :         return py_netr_LogonControl_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37105             : }
   37106             : 
   37107           0 : static PyObject *py_netr_LogonControl_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   37108             : {
   37109           0 :         const struct ndr_interface_call *call = NULL;
   37110           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
   37111           0 :         struct ndr_pull *pull = NULL;
   37112           0 :         enum ndr_err_code err;
   37113             : 
   37114           0 :         if (ndr_table_netlogon.num_calls < 13) {
   37115           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_unpack");
   37116           0 :                 return NULL;
   37117             :         }
   37118           0 :         call = &ndr_table_netlogon.calls[12];
   37119             : 
   37120           0 :         pull = ndr_pull_init_blob(blob, object);
   37121           0 :         if (pull == NULL) {
   37122           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37123           0 :                 return NULL;
   37124             :         }
   37125             : 
   37126           0 :         pull->flags |= ndr_pull_flags;
   37127             : 
   37128           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37129           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37130           0 :                 TALLOC_FREE(pull);
   37131           0 :                 PyErr_SetNdrError(err);
   37132           0 :                 return NULL;
   37133             :         }
   37134           0 :         if (!allow_remaining) {
   37135           0 :                 uint32_t highest_ofs;
   37136             : 
   37137           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37138           0 :                         highest_ofs = pull->offset;
   37139             :                 } else {
   37140           0 :                         highest_ofs = pull->relative_highest_offset;
   37141             :                 }
   37142           0 :                 if (highest_ofs < pull->data_size) {
   37143           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37144             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37145             :                                 highest_ofs, pull->data_size);
   37146           0 :                         TALLOC_FREE(pull);
   37147           0 :                         PyErr_SetNdrError(err);
   37148           0 :                         return NULL;
   37149             :                 }
   37150             :         }
   37151             : 
   37152           0 :         TALLOC_FREE(pull);
   37153           0 :         Py_RETURN_NONE;
   37154             : }
   37155             : 
   37156           0 : static PyObject *py_netr_LogonControl_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37157             : {
   37158           0 :         DATA_BLOB blob;
   37159           0 :         Py_ssize_t blob_length = 0;
   37160           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37161           0 :         PyObject *bigendian_obj = NULL;
   37162           0 :         PyObject *ndr64_obj = NULL;
   37163           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37164           0 :         PyObject *allow_remaining_obj = NULL;
   37165           0 :         bool allow_remaining = false;
   37166             : 
   37167           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37168             :                 discard_const_p(char *, kwnames),
   37169             :                 &blob.data, &blob_length,
   37170             :                 &bigendian_obj,
   37171             :                 &ndr64_obj,
   37172             :                 &allow_remaining_obj)) {
   37173           0 :                 return NULL;
   37174             :         }
   37175           0 :         blob.length = blob_length;
   37176             : 
   37177           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37178           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37179             :         }
   37180           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37181           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37182             :         }
   37183             : 
   37184           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37185           0 :                 allow_remaining = true;
   37186             :         }
   37187             : 
   37188           0 :         return py_netr_LogonControl_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37189             : }
   37190             : 
   37191           0 : static PyObject *py_netr_LogonControl_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37192             : {
   37193           0 :         DATA_BLOB blob;
   37194           0 :         Py_ssize_t blob_length = 0;
   37195           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37196           0 :         PyObject *bigendian_obj = NULL;
   37197           0 :         PyObject *ndr64_obj = NULL;
   37198           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37199           0 :         PyObject *allow_remaining_obj = NULL;
   37200           0 :         bool allow_remaining = false;
   37201             : 
   37202           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37203             :                 discard_const_p(char *, kwnames),
   37204             :                 &blob.data, &blob_length,
   37205             :                 &bigendian_obj,
   37206             :                 &ndr64_obj,
   37207             :                 &allow_remaining_obj)) {
   37208           0 :                 return NULL;
   37209             :         }
   37210           0 :         blob.length = blob_length;
   37211             : 
   37212           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37213           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37214             :         }
   37215           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37216           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37217             :         }
   37218             : 
   37219           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37220           0 :                 allow_remaining = true;
   37221             :         }
   37222             : 
   37223           0 :         return py_netr_LogonControl_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37224             : }
   37225             : 
   37226           0 : static PyObject *py_netr_LogonControl_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   37227             : {
   37228           0 :         const struct ndr_interface_call *call = NULL;
   37229           0 :         struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
   37230           0 :         PyObject *ret;
   37231           0 :         char *retstr;
   37232             : 
   37233           0 :         if (ndr_table_netlogon.num_calls < 13) {
   37234           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_print");
   37235           0 :                 return NULL;
   37236             :         }
   37237           0 :         call = &ndr_table_netlogon.calls[12];
   37238             : 
   37239           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37240           0 :         ret = PyUnicode_FromString(retstr);
   37241           0 :         TALLOC_FREE(retstr);
   37242             : 
   37243           0 :         return ret;
   37244             : }
   37245             : 
   37246           0 : static PyObject *py_netr_LogonControl_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37247             : {
   37248           0 :         return py_netr_LogonControl_ndr_print(py_obj, "netr_LogonControl_in", NDR_IN);
   37249             : }
   37250             : 
   37251           0 : static PyObject *py_netr_LogonControl_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37252             : {
   37253           0 :         return py_netr_LogonControl_ndr_print(py_obj, "netr_LogonControl_out", NDR_OUT);
   37254             : }
   37255             : 
   37256             : static PyMethodDef py_netr_LogonControl_methods[] = {
   37257             :         { "opnum", (PyCFunction)py_netr_LogonControl_ndr_opnum, METH_NOARGS|METH_CLASS,
   37258             :                 "netlogon.netr_LogonControl.opnum() -> 12 (0x0c) " },
   37259             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37260             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37261             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37262             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37263             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37264             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37265             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37266             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37267             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonControl_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37268             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonControl_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37269             :         { NULL, NULL, 0, NULL }
   37270             : };
   37271             : 
   37272             : 
   37273             : static PyTypeObject netr_LogonControl_Type = {
   37274             :         PyVarObject_HEAD_INIT(NULL, 0)
   37275             :         .tp_name = "netlogon.netr_LogonControl",
   37276             :         .tp_getset = py_netr_LogonControl_getsetters,
   37277             :         .tp_methods = py_netr_LogonControl_methods,
   37278             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37279             :         .tp_new = py_netr_LogonControl_new,
   37280             : };
   37281             : 
   37282           0 : static bool pack_py_netr_LogonControl_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl *r)
   37283             : {
   37284           0 :         PyObject *py_logon_server;
   37285           0 :         PyObject *py_function_code;
   37286           0 :         PyObject *py_level;
   37287           0 :         const char *kwnames[] = {
   37288             :                 "logon_server", "function_code", "level", NULL
   37289             :         };
   37290             : 
   37291           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonControl", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level)) {
   37292           0 :                 return false;
   37293             :         }
   37294             : 
   37295           0 :         if (py_logon_server == NULL) {
   37296           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   37297           0 :                 return false;
   37298             :         }
   37299           0 :         if (py_logon_server == Py_None) {
   37300           0 :                 r->in.logon_server = NULL;
   37301             :         } else {
   37302           0 :                 r->in.logon_server = NULL;
   37303             :                 {
   37304           0 :                         const char *test_str;
   37305           0 :                         const char *talloc_str;
   37306           0 :                         PyObject *unicode = NULL;
   37307           0 :                         if (PyUnicode_Check(py_logon_server)) {
   37308           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   37309           0 :                                 if (unicode == NULL) {
   37310           0 :                                         return false;
   37311             :                                 }
   37312           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37313           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   37314           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   37315             :                         } else {
   37316           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   37317           0 :                                 return false;
   37318             :                         }
   37319           0 :                         talloc_str = talloc_strdup(r, test_str);
   37320           0 :                         if (unicode != NULL) {
   37321           0 :                                 Py_DECREF(unicode);
   37322             :                         }
   37323           0 :                         if (talloc_str == NULL) {
   37324           0 :                                 PyErr_NoMemory();
   37325           0 :                                 return false;
   37326             :                         }
   37327           0 :                         r->in.logon_server = talloc_str;
   37328             :                 }
   37329             :         }
   37330           0 :         if (py_function_code == NULL) {
   37331           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.function_code");
   37332           0 :                 return false;
   37333             :         }
   37334             :         {
   37335           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   37336           0 :                 if (PyLong_Check(py_function_code)) {
   37337           0 :                         unsigned long long test_var;
   37338           0 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   37339           0 :                         if (PyErr_Occurred() != NULL) {
   37340           0 :                                 return false;
   37341             :                         }
   37342           0 :                         if (test_var > uint_max) {
   37343           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37344             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37345           0 :                                 return false;
   37346             :                         }
   37347           0 :                         r->in.function_code = test_var;
   37348             :                 } else {
   37349           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37350             :                           PyLong_Type.tp_name);
   37351           0 :                         return false;
   37352             :                 }
   37353             :         }
   37354           0 :         if (py_level == NULL) {
   37355           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   37356           0 :                 return false;
   37357             :         }
   37358             :         {
   37359           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   37360           0 :                 if (PyLong_Check(py_level)) {
   37361           0 :                         unsigned long long test_var;
   37362           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   37363           0 :                         if (PyErr_Occurred() != NULL) {
   37364           0 :                                 return false;
   37365             :                         }
   37366           0 :                         if (test_var > uint_max) {
   37367           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37368             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37369           0 :                                 return false;
   37370             :                         }
   37371           0 :                         r->in.level = test_var;
   37372             :                 } else {
   37373           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37374             :                           PyLong_Type.tp_name);
   37375           0 :                         return false;
   37376             :                 }
   37377             :         }
   37378           0 :         return true;
   37379             : }
   37380             : 
   37381           0 : static PyObject *unpack_py_netr_LogonControl_args_out(struct netr_LogonControl *r)
   37382             : {
   37383           0 :         PyObject *result;
   37384           0 :         PyObject *py_query;
   37385           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");
   37386           0 :         if (py_query == NULL) {
   37387           0 :                 return NULL;
   37388             :         }
   37389           0 :         result = py_query;
   37390           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   37391           0 :                 PyErr_SetWERROR(r->out.result);
   37392           0 :                 return NULL;
   37393             :         }
   37394             : 
   37395           0 :         return result;
   37396             : }
   37397             : 
   37398             : 
   37399           0 : static PyObject *py_netr_GetAnyDCName_in_get_logon_server(PyObject *obj, void *closure)
   37400             : {
   37401           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(obj);
   37402           0 :         PyObject *py_logon_server;
   37403           0 :         if (object->in.logon_server == NULL) {
   37404           0 :                 Py_RETURN_NONE;
   37405             :         }
   37406           0 :         if (object->in.logon_server == NULL) {
   37407           0 :                 py_logon_server = Py_None;
   37408           0 :                 Py_INCREF(py_logon_server);
   37409             :         } else {
   37410           0 :                 if (object->in.logon_server == NULL) {
   37411           0 :                         py_logon_server = Py_None;
   37412           0 :                         Py_INCREF(py_logon_server);
   37413             :                 } else {
   37414           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   37415             :                 }
   37416             :         }
   37417           0 :         return py_logon_server;
   37418             : }
   37419             : 
   37420           0 : static int py_netr_GetAnyDCName_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   37421             : {
   37422           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
   37423           0 :         if (value == NULL) {
   37424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   37425           0 :                 return -1;
   37426             :         }
   37427           0 :         if (value == Py_None) {
   37428           0 :                 object->in.logon_server = NULL;
   37429             :         } else {
   37430           0 :                 object->in.logon_server = NULL;
   37431             :                 {
   37432           0 :                         const char *test_str;
   37433           0 :                         const char *talloc_str;
   37434           0 :                         PyObject *unicode = NULL;
   37435           0 :                         if (PyUnicode_Check(value)) {
   37436           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37437           0 :                                 if (unicode == NULL) {
   37438           0 :                                         return -1;
   37439             :                                 }
   37440           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37441           0 :                         } else if (PyBytes_Check(value)) {
   37442           0 :                                 test_str = PyBytes_AS_STRING(value);
   37443             :                         } else {
   37444           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37445           0 :                                 return -1;
   37446             :                         }
   37447           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37448           0 :                         if (unicode != NULL) {
   37449           0 :                                 Py_DECREF(unicode);
   37450             :                         }
   37451           0 :                         if (talloc_str == NULL) {
   37452           0 :                                 PyErr_NoMemory();
   37453           0 :                                 return -1;
   37454             :                         }
   37455           0 :                         object->in.logon_server = talloc_str;
   37456             :                 }
   37457             :         }
   37458           0 :         return 0;
   37459             : }
   37460             : 
   37461           0 : static PyObject *py_netr_GetAnyDCName_in_get_domainname(PyObject *obj, void *closure)
   37462             : {
   37463           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(obj);
   37464           0 :         PyObject *py_domainname;
   37465           0 :         if (object->in.domainname == NULL) {
   37466           0 :                 Py_RETURN_NONE;
   37467             :         }
   37468           0 :         if (object->in.domainname == NULL) {
   37469           0 :                 py_domainname = Py_None;
   37470           0 :                 Py_INCREF(py_domainname);
   37471             :         } else {
   37472           0 :                 if (object->in.domainname == NULL) {
   37473           0 :                         py_domainname = Py_None;
   37474           0 :                         Py_INCREF(py_domainname);
   37475             :                 } else {
   37476           0 :                         py_domainname = PyUnicode_Decode(object->in.domainname, strlen(object->in.domainname), "utf-8", "ignore");
   37477             :                 }
   37478             :         }
   37479           0 :         return py_domainname;
   37480             : }
   37481             : 
   37482           0 : static int py_netr_GetAnyDCName_in_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
   37483             : {
   37484           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
   37485           0 :         if (value == NULL) {
   37486           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domainname");
   37487           0 :                 return -1;
   37488             :         }
   37489           0 :         if (value == Py_None) {
   37490           0 :                 object->in.domainname = NULL;
   37491             :         } else {
   37492           0 :                 object->in.domainname = NULL;
   37493             :                 {
   37494           0 :                         const char *test_str;
   37495           0 :                         const char *talloc_str;
   37496           0 :                         PyObject *unicode = NULL;
   37497           0 :                         if (PyUnicode_Check(value)) {
   37498           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37499           0 :                                 if (unicode == NULL) {
   37500           0 :                                         return -1;
   37501             :                                 }
   37502           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37503           0 :                         } else if (PyBytes_Check(value)) {
   37504           0 :                                 test_str = PyBytes_AS_STRING(value);
   37505             :                         } else {
   37506           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37507           0 :                                 return -1;
   37508             :                         }
   37509           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37510           0 :                         if (unicode != NULL) {
   37511           0 :                                 Py_DECREF(unicode);
   37512             :                         }
   37513           0 :                         if (talloc_str == NULL) {
   37514           0 :                                 PyErr_NoMemory();
   37515           0 :                                 return -1;
   37516             :                         }
   37517           0 :                         object->in.domainname = talloc_str;
   37518             :                 }
   37519             :         }
   37520           0 :         return 0;
   37521             : }
   37522             : 
   37523           0 : static PyObject *py_netr_GetAnyDCName_out_get_dcname(PyObject *obj, void *closure)
   37524             : {
   37525           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(obj);
   37526           0 :         PyObject *py_dcname;
   37527           0 :         if (object->out.dcname == NULL) {
   37528           0 :                 Py_RETURN_NONE;
   37529             :         }
   37530           0 :         if (*object->out.dcname == NULL) {
   37531           0 :                 py_dcname = Py_None;
   37532           0 :                 Py_INCREF(py_dcname);
   37533             :         } else {
   37534           0 :                 if (*object->out.dcname == NULL) {
   37535           0 :                         py_dcname = Py_None;
   37536           0 :                         Py_INCREF(py_dcname);
   37537             :                 } else {
   37538           0 :                         py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
   37539             :                 }
   37540             :         }
   37541           0 :         return py_dcname;
   37542             : }
   37543             : 
   37544           0 : static int py_netr_GetAnyDCName_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   37545             : {
   37546           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
   37547           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
   37548           0 :         if (value == NULL) {
   37549           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.dcname");
   37550           0 :                 return -1;
   37551             :         }
   37552           0 :         object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
   37553           0 :         if (object->out.dcname == NULL) {
   37554           0 :                 PyErr_NoMemory();
   37555           0 :                 return -1;
   37556             :         }
   37557           0 :         if (value == Py_None) {
   37558           0 :                 *object->out.dcname = NULL;
   37559             :         } else {
   37560           0 :                 *object->out.dcname = NULL;
   37561             :                 {
   37562           0 :                         const char *test_str;
   37563           0 :                         const char *talloc_str;
   37564           0 :                         PyObject *unicode = NULL;
   37565           0 :                         if (PyUnicode_Check(value)) {
   37566           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37567           0 :                                 if (unicode == NULL) {
   37568           0 :                                         return -1;
   37569             :                                 }
   37570           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37571           0 :                         } else if (PyBytes_Check(value)) {
   37572           0 :                                 test_str = PyBytes_AS_STRING(value);
   37573             :                         } else {
   37574           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37575           0 :                                 return -1;
   37576             :                         }
   37577           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37578           0 :                         if (unicode != NULL) {
   37579           0 :                                 Py_DECREF(unicode);
   37580             :                         }
   37581           0 :                         if (talloc_str == NULL) {
   37582           0 :                                 PyErr_NoMemory();
   37583           0 :                                 return -1;
   37584             :                         }
   37585           0 :                         *object->out.dcname = talloc_str;
   37586             :                 }
   37587             :         }
   37588           0 :         return 0;
   37589             : }
   37590             : 
   37591           0 : static PyObject *py_netr_GetAnyDCName_get_result(PyObject *obj, void *closure)
   37592             : {
   37593           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(obj);
   37594           0 :         PyObject *py_result;
   37595           0 :         py_result = PyErr_FromWERROR(object->out.result);
   37596           0 :         return py_result;
   37597             : }
   37598             : 
   37599           0 : static int py_netr_GetAnyDCName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   37600             : {
   37601           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
   37602           0 :         if (value == NULL) {
   37603           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   37604           0 :                 return -1;
   37605             :         }
   37606           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   37607           0 :         return 0;
   37608             : }
   37609             : 
   37610             : static PyGetSetDef py_netr_GetAnyDCName_getsetters[] = {
   37611             :         {
   37612             :                 .name = discard_const_p(char, "in_logon_server"),
   37613             :                 .get = py_netr_GetAnyDCName_in_get_logon_server,
   37614             :                 .set = py_netr_GetAnyDCName_in_set_logon_server,
   37615             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37616             :         },
   37617             :         {
   37618             :                 .name = discard_const_p(char, "in_domainname"),
   37619             :                 .get = py_netr_GetAnyDCName_in_get_domainname,
   37620             :                 .set = py_netr_GetAnyDCName_in_set_domainname,
   37621             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37622             :         },
   37623             :         {
   37624             :                 .name = discard_const_p(char, "out_dcname"),
   37625             :                 .get = py_netr_GetAnyDCName_out_get_dcname,
   37626             :                 .set = py_netr_GetAnyDCName_out_set_dcname,
   37627             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37628             :         },
   37629             :         {
   37630             :                 .name = discard_const_p(char, "result"),
   37631             :                 .get = py_netr_GetAnyDCName_get_result,
   37632             :                 .set = py_netr_GetAnyDCName_set_result,
   37633             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   37634             :         },
   37635             :         { .name = NULL }
   37636             : };
   37637             : 
   37638           0 : static PyObject *py_netr_GetAnyDCName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   37639             : {
   37640           0 :         PyObject *self = pytalloc_new(struct netr_GetAnyDCName, type);
   37641           0 :         return self;
   37642             : }
   37643             : 
   37644           0 : static PyObject *py_netr_GetAnyDCName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   37645             : {
   37646             : 
   37647             : 
   37648           0 :         return PyLong_FromLong(13);
   37649             : }
   37650             : 
   37651           0 : static PyObject *py_netr_GetAnyDCName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   37652             : {
   37653           0 :         const struct ndr_interface_call *call = NULL;
   37654           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
   37655           0 :         PyObject *ret = NULL;
   37656           0 :         struct ndr_push *push = NULL;
   37657           0 :         DATA_BLOB blob;
   37658           0 :         enum ndr_err_code err;
   37659             : 
   37660           0 :         if (ndr_table_netlogon.num_calls < 14) {
   37661           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_pack");
   37662           0 :                 return NULL;
   37663             :         }
   37664           0 :         call = &ndr_table_netlogon.calls[13];
   37665             : 
   37666           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37667           0 :         if (push == NULL) {
   37668           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37669           0 :                 return NULL;
   37670             :         }
   37671             : 
   37672           0 :         push->flags |= ndr_push_flags;
   37673             : 
   37674           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37675           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37676           0 :                 TALLOC_FREE(push);
   37677           0 :                 PyErr_SetNdrError(err);
   37678           0 :                 return NULL;
   37679             :         }
   37680           0 :         blob = ndr_push_blob(push);
   37681           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37682           0 :         TALLOC_FREE(push);
   37683           0 :         return ret;
   37684             : }
   37685             : 
   37686           0 : static PyObject *py_netr_GetAnyDCName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37687             : {
   37688           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37689           0 :         PyObject *bigendian_obj = NULL;
   37690           0 :         PyObject *ndr64_obj = NULL;
   37691           0 :         libndr_flags ndr_push_flags = 0;
   37692             : 
   37693           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37694             :                 discard_const_p(char *, kwnames),
   37695             :                 &bigendian_obj,
   37696             :                 &ndr64_obj)) {
   37697           0 :                 return NULL;
   37698             :         }
   37699             : 
   37700           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37701           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37702             :         }
   37703           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37704           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37705             :         }
   37706             : 
   37707           0 :         return py_netr_GetAnyDCName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37708             : }
   37709             : 
   37710           0 : static PyObject *py_netr_GetAnyDCName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37711             : {
   37712           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37713           0 :         PyObject *bigendian_obj = NULL;
   37714           0 :         PyObject *ndr64_obj = NULL;
   37715           0 :         libndr_flags ndr_push_flags = 0;
   37716             : 
   37717           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37718             :                 discard_const_p(char *, kwnames),
   37719             :                 &bigendian_obj,
   37720             :                 &ndr64_obj)) {
   37721           0 :                 return NULL;
   37722             :         }
   37723             : 
   37724           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37725           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37726             :         }
   37727           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37728           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37729             :         }
   37730             : 
   37731           0 :         return py_netr_GetAnyDCName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37732             : }
   37733             : 
   37734           0 : static PyObject *py_netr_GetAnyDCName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   37735             : {
   37736           0 :         const struct ndr_interface_call *call = NULL;
   37737           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
   37738           0 :         struct ndr_pull *pull = NULL;
   37739           0 :         enum ndr_err_code err;
   37740             : 
   37741           0 :         if (ndr_table_netlogon.num_calls < 14) {
   37742           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_unpack");
   37743           0 :                 return NULL;
   37744             :         }
   37745           0 :         call = &ndr_table_netlogon.calls[13];
   37746             : 
   37747           0 :         pull = ndr_pull_init_blob(blob, object);
   37748           0 :         if (pull == NULL) {
   37749           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37750           0 :                 return NULL;
   37751             :         }
   37752             : 
   37753           0 :         pull->flags |= ndr_pull_flags;
   37754             : 
   37755           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37756           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37757           0 :                 TALLOC_FREE(pull);
   37758           0 :                 PyErr_SetNdrError(err);
   37759           0 :                 return NULL;
   37760             :         }
   37761           0 :         if (!allow_remaining) {
   37762           0 :                 uint32_t highest_ofs;
   37763             : 
   37764           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37765           0 :                         highest_ofs = pull->offset;
   37766             :                 } else {
   37767           0 :                         highest_ofs = pull->relative_highest_offset;
   37768             :                 }
   37769           0 :                 if (highest_ofs < pull->data_size) {
   37770           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37771             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37772             :                                 highest_ofs, pull->data_size);
   37773           0 :                         TALLOC_FREE(pull);
   37774           0 :                         PyErr_SetNdrError(err);
   37775           0 :                         return NULL;
   37776             :                 }
   37777             :         }
   37778             : 
   37779           0 :         TALLOC_FREE(pull);
   37780           0 :         Py_RETURN_NONE;
   37781             : }
   37782             : 
   37783           0 : static PyObject *py_netr_GetAnyDCName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37784             : {
   37785           0 :         DATA_BLOB blob;
   37786           0 :         Py_ssize_t blob_length = 0;
   37787           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37788           0 :         PyObject *bigendian_obj = NULL;
   37789           0 :         PyObject *ndr64_obj = NULL;
   37790           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37791           0 :         PyObject *allow_remaining_obj = NULL;
   37792           0 :         bool allow_remaining = false;
   37793             : 
   37794           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37795             :                 discard_const_p(char *, kwnames),
   37796             :                 &blob.data, &blob_length,
   37797             :                 &bigendian_obj,
   37798             :                 &ndr64_obj,
   37799             :                 &allow_remaining_obj)) {
   37800           0 :                 return NULL;
   37801             :         }
   37802           0 :         blob.length = blob_length;
   37803             : 
   37804           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37805           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37806             :         }
   37807           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37808           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37809             :         }
   37810             : 
   37811           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37812           0 :                 allow_remaining = true;
   37813             :         }
   37814             : 
   37815           0 :         return py_netr_GetAnyDCName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37816             : }
   37817             : 
   37818           0 : static PyObject *py_netr_GetAnyDCName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37819             : {
   37820           0 :         DATA_BLOB blob;
   37821           0 :         Py_ssize_t blob_length = 0;
   37822           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37823           0 :         PyObject *bigendian_obj = NULL;
   37824           0 :         PyObject *ndr64_obj = NULL;
   37825           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37826           0 :         PyObject *allow_remaining_obj = NULL;
   37827           0 :         bool allow_remaining = false;
   37828             : 
   37829           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37830             :                 discard_const_p(char *, kwnames),
   37831             :                 &blob.data, &blob_length,
   37832             :                 &bigendian_obj,
   37833             :                 &ndr64_obj,
   37834             :                 &allow_remaining_obj)) {
   37835           0 :                 return NULL;
   37836             :         }
   37837           0 :         blob.length = blob_length;
   37838             : 
   37839           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37840           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37841             :         }
   37842           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37843           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37844             :         }
   37845             : 
   37846           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37847           0 :                 allow_remaining = true;
   37848             :         }
   37849             : 
   37850           0 :         return py_netr_GetAnyDCName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37851             : }
   37852             : 
   37853           0 : static PyObject *py_netr_GetAnyDCName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   37854             : {
   37855           0 :         const struct ndr_interface_call *call = NULL;
   37856           0 :         struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
   37857           0 :         PyObject *ret;
   37858           0 :         char *retstr;
   37859             : 
   37860           0 :         if (ndr_table_netlogon.num_calls < 14) {
   37861           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_print");
   37862           0 :                 return NULL;
   37863             :         }
   37864           0 :         call = &ndr_table_netlogon.calls[13];
   37865             : 
   37866           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37867           0 :         ret = PyUnicode_FromString(retstr);
   37868           0 :         TALLOC_FREE(retstr);
   37869             : 
   37870           0 :         return ret;
   37871             : }
   37872             : 
   37873           0 : static PyObject *py_netr_GetAnyDCName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37874             : {
   37875           0 :         return py_netr_GetAnyDCName_ndr_print(py_obj, "netr_GetAnyDCName_in", NDR_IN);
   37876             : }
   37877             : 
   37878           0 : static PyObject *py_netr_GetAnyDCName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37879             : {
   37880           0 :         return py_netr_GetAnyDCName_ndr_print(py_obj, "netr_GetAnyDCName_out", NDR_OUT);
   37881             : }
   37882             : 
   37883             : static PyMethodDef py_netr_GetAnyDCName_methods[] = {
   37884             :         { "opnum", (PyCFunction)py_netr_GetAnyDCName_ndr_opnum, METH_NOARGS|METH_CLASS,
   37885             :                 "netlogon.netr_GetAnyDCName.opnum() -> 13 (0x0d) " },
   37886             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37887             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37888             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37889             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37890             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37891             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37892             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37893             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37894             :         { "__ndr_print_in__", (PyCFunction)py_netr_GetAnyDCName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37895             :         { "__ndr_print_out__", (PyCFunction)py_netr_GetAnyDCName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37896             :         { NULL, NULL, 0, NULL }
   37897             : };
   37898             : 
   37899             : 
   37900             : static PyTypeObject netr_GetAnyDCName_Type = {
   37901             :         PyVarObject_HEAD_INIT(NULL, 0)
   37902             :         .tp_name = "netlogon.netr_GetAnyDCName",
   37903             :         .tp_getset = py_netr_GetAnyDCName_getsetters,
   37904             :         .tp_methods = py_netr_GetAnyDCName_methods,
   37905             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37906             :         .tp_new = py_netr_GetAnyDCName_new,
   37907             : };
   37908             : 
   37909           0 : static bool pack_py_netr_GetAnyDCName_args_in(PyObject *args, PyObject *kwargs, struct netr_GetAnyDCName *r)
   37910             : {
   37911           0 :         PyObject *py_logon_server;
   37912           0 :         PyObject *py_domainname;
   37913           0 :         const char *kwnames[] = {
   37914             :                 "logon_server", "domainname", NULL
   37915             :         };
   37916             : 
   37917           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_GetAnyDCName", discard_const_p(char *, kwnames), &py_logon_server, &py_domainname)) {
   37918           0 :                 return false;
   37919             :         }
   37920             : 
   37921           0 :         if (py_logon_server == NULL) {
   37922           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   37923           0 :                 return false;
   37924             :         }
   37925           0 :         if (py_logon_server == Py_None) {
   37926           0 :                 r->in.logon_server = NULL;
   37927             :         } else {
   37928           0 :                 r->in.logon_server = NULL;
   37929             :                 {
   37930           0 :                         const char *test_str;
   37931           0 :                         const char *talloc_str;
   37932           0 :                         PyObject *unicode = NULL;
   37933           0 :                         if (PyUnicode_Check(py_logon_server)) {
   37934           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   37935           0 :                                 if (unicode == NULL) {
   37936           0 :                                         return false;
   37937             :                                 }
   37938           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37939           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   37940           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   37941             :                         } else {
   37942           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   37943           0 :                                 return false;
   37944             :                         }
   37945           0 :                         talloc_str = talloc_strdup(r, test_str);
   37946           0 :                         if (unicode != NULL) {
   37947           0 :                                 Py_DECREF(unicode);
   37948             :                         }
   37949           0 :                         if (talloc_str == NULL) {
   37950           0 :                                 PyErr_NoMemory();
   37951           0 :                                 return false;
   37952             :                         }
   37953           0 :                         r->in.logon_server = talloc_str;
   37954             :                 }
   37955             :         }
   37956           0 :         if (py_domainname == NULL) {
   37957           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domainname");
   37958           0 :                 return false;
   37959             :         }
   37960           0 :         if (py_domainname == Py_None) {
   37961           0 :                 r->in.domainname = NULL;
   37962             :         } else {
   37963           0 :                 r->in.domainname = NULL;
   37964             :                 {
   37965           0 :                         const char *test_str;
   37966           0 :                         const char *talloc_str;
   37967           0 :                         PyObject *unicode = NULL;
   37968           0 :                         if (PyUnicode_Check(py_domainname)) {
   37969           0 :                                 unicode = PyUnicode_AsEncodedString(py_domainname, "utf-8", "ignore");
   37970           0 :                                 if (unicode == NULL) {
   37971           0 :                                         return false;
   37972             :                                 }
   37973           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37974           0 :                         } else if (PyBytes_Check(py_domainname)) {
   37975           0 :                                 test_str = PyBytes_AS_STRING(py_domainname);
   37976             :                         } else {
   37977           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domainname)->tp_name);
   37978           0 :                                 return false;
   37979             :                         }
   37980           0 :                         talloc_str = talloc_strdup(r, test_str);
   37981           0 :                         if (unicode != NULL) {
   37982           0 :                                 Py_DECREF(unicode);
   37983             :                         }
   37984           0 :                         if (talloc_str == NULL) {
   37985           0 :                                 PyErr_NoMemory();
   37986           0 :                                 return false;
   37987             :                         }
   37988           0 :                         r->in.domainname = talloc_str;
   37989             :                 }
   37990             :         }
   37991           0 :         return true;
   37992             : }
   37993             : 
   37994           0 : static PyObject *unpack_py_netr_GetAnyDCName_args_out(struct netr_GetAnyDCName *r)
   37995             : {
   37996           0 :         PyObject *result;
   37997           0 :         PyObject *py_dcname;
   37998           0 :         if (*r->out.dcname == NULL) {
   37999           0 :                 py_dcname = Py_None;
   38000           0 :                 Py_INCREF(py_dcname);
   38001             :         } else {
   38002           0 :                 if (*r->out.dcname == NULL) {
   38003           0 :                         py_dcname = Py_None;
   38004           0 :                         Py_INCREF(py_dcname);
   38005             :                 } else {
   38006           0 :                         py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
   38007             :                 }
   38008             :         }
   38009           0 :         result = py_dcname;
   38010           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   38011           0 :                 PyErr_SetWERROR(r->out.result);
   38012           0 :                 return NULL;
   38013             :         }
   38014             : 
   38015           0 :         return result;
   38016             : }
   38017             : 
   38018             : 
   38019           0 : static PyObject *py_netr_LogonControl2_in_get_logon_server(PyObject *obj, void *closure)
   38020             : {
   38021           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
   38022           0 :         PyObject *py_logon_server;
   38023           0 :         if (object->in.logon_server == NULL) {
   38024           0 :                 Py_RETURN_NONE;
   38025             :         }
   38026           0 :         if (object->in.logon_server == NULL) {
   38027           0 :                 py_logon_server = Py_None;
   38028           0 :                 Py_INCREF(py_logon_server);
   38029             :         } else {
   38030           0 :                 if (object->in.logon_server == NULL) {
   38031           0 :                         py_logon_server = Py_None;
   38032           0 :                         Py_INCREF(py_logon_server);
   38033             :                 } else {
   38034           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   38035             :                 }
   38036             :         }
   38037           0 :         return py_logon_server;
   38038             : }
   38039             : 
   38040           0 : static int py_netr_LogonControl2_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   38041             : {
   38042           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
   38043           0 :         if (value == NULL) {
   38044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   38045           0 :                 return -1;
   38046             :         }
   38047           0 :         if (value == Py_None) {
   38048           0 :                 object->in.logon_server = NULL;
   38049             :         } else {
   38050           0 :                 object->in.logon_server = NULL;
   38051             :                 {
   38052           0 :                         const char *test_str;
   38053           0 :                         const char *talloc_str;
   38054           0 :                         PyObject *unicode = NULL;
   38055           0 :                         if (PyUnicode_Check(value)) {
   38056           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38057           0 :                                 if (unicode == NULL) {
   38058           0 :                                         return -1;
   38059             :                                 }
   38060           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38061           0 :                         } else if (PyBytes_Check(value)) {
   38062           0 :                                 test_str = PyBytes_AS_STRING(value);
   38063             :                         } else {
   38064           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38065           0 :                                 return -1;
   38066             :                         }
   38067           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38068           0 :                         if (unicode != NULL) {
   38069           0 :                                 Py_DECREF(unicode);
   38070             :                         }
   38071           0 :                         if (talloc_str == NULL) {
   38072           0 :                                 PyErr_NoMemory();
   38073           0 :                                 return -1;
   38074             :                         }
   38075           0 :                         object->in.logon_server = talloc_str;
   38076             :                 }
   38077             :         }
   38078           0 :         return 0;
   38079             : }
   38080             : 
   38081           0 : static PyObject *py_netr_LogonControl2_in_get_function_code(PyObject *obj, void *closure)
   38082             : {
   38083           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
   38084           0 :         PyObject *py_function_code;
   38085           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)(object->in.function_code));
   38086           0 :         return py_function_code;
   38087             : }
   38088             : 
   38089           0 : static int py_netr_LogonControl2_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   38090             : {
   38091           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
   38092           0 :         if (value == NULL) {
   38093           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.function_code");
   38094           0 :                 return -1;
   38095             :         }
   38096             :         {
   38097           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   38098           0 :                 if (PyLong_Check(value)) {
   38099           0 :                         unsigned long long test_var;
   38100           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38101           0 :                         if (PyErr_Occurred() != NULL) {
   38102           0 :                                 return -1;
   38103             :                         }
   38104           0 :                         if (test_var > uint_max) {
   38105           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38106             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38107           0 :                                 return -1;
   38108             :                         }
   38109           0 :                         object->in.function_code = test_var;
   38110             :                 } else {
   38111           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38112             :                           PyLong_Type.tp_name);
   38113           0 :                         return -1;
   38114             :                 }
   38115             :         }
   38116           0 :         return 0;
   38117             : }
   38118             : 
   38119           0 : static PyObject *py_netr_LogonControl2_in_get_level(PyObject *obj, void *closure)
   38120             : {
   38121           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
   38122           0 :         PyObject *py_level;
   38123           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   38124           0 :         return py_level;
   38125             : }
   38126             : 
   38127           0 : static int py_netr_LogonControl2_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   38128             : {
   38129           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
   38130           0 :         if (value == NULL) {
   38131           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   38132           0 :                 return -1;
   38133             :         }
   38134             :         {
   38135           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   38136           0 :                 if (PyLong_Check(value)) {
   38137           0 :                         unsigned long long test_var;
   38138           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38139           0 :                         if (PyErr_Occurred() != NULL) {
   38140           0 :                                 return -1;
   38141             :                         }
   38142           0 :                         if (test_var > uint_max) {
   38143           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38144             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38145           0 :                                 return -1;
   38146             :                         }
   38147           0 :                         object->in.level = test_var;
   38148             :                 } else {
   38149           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38150             :                           PyLong_Type.tp_name);
   38151           0 :                         return -1;
   38152             :                 }
   38153             :         }
   38154           0 :         return 0;
   38155             : }
   38156             : 
   38157           0 : static PyObject *py_netr_LogonControl2_in_get_data(PyObject *obj, void *closure)
   38158             : {
   38159           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
   38160           0 :         PyObject *py_data;
   38161           0 :         if (object->in.data == NULL) {
   38162           0 :                 Py_RETURN_NONE;
   38163             :         }
   38164           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");
   38165           0 :         if (py_data == NULL) {
   38166           0 :                 return NULL;
   38167             :         }
   38168           0 :         return py_data;
   38169             : }
   38170             : 
   38171           0 : static int py_netr_LogonControl2_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
   38172             : {
   38173           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
   38174           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
   38175           0 :         if (value == NULL) {
   38176           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.data");
   38177           0 :                 return -1;
   38178             :         }
   38179           0 :         object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
   38180           0 :         if (object->in.data == NULL) {
   38181           0 :                 PyErr_NoMemory();
   38182           0 :                 return -1;
   38183             :         }
   38184             :         {
   38185           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   38186           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");
   38187           0 :                 if (data_switch_1 == NULL) {
   38188           0 :                         return -1;
   38189             :                 }
   38190           0 :                 object->in.data = data_switch_1;
   38191             :         }
   38192           0 :         return 0;
   38193             : }
   38194             : 
   38195           0 : static PyObject *py_netr_LogonControl2_out_get_query(PyObject *obj, void *closure)
   38196             : {
   38197           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
   38198           0 :         PyObject *py_query;
   38199           0 :         if (object->out.query == NULL) {
   38200           0 :                 Py_RETURN_NONE;
   38201             :         }
   38202           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");
   38203           0 :         if (py_query == NULL) {
   38204           0 :                 return NULL;
   38205             :         }
   38206           0 :         return py_query;
   38207             : }
   38208             : 
   38209           0 : static int py_netr_LogonControl2_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   38210             : {
   38211           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
   38212           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   38213           0 :         if (value == NULL) {
   38214           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.query");
   38215           0 :                 return -1;
   38216             :         }
   38217           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   38218           0 :         if (object->out.query == NULL) {
   38219           0 :                 PyErr_NoMemory();
   38220           0 :                 return -1;
   38221             :         }
   38222             :         {
   38223           0 :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   38224           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");
   38225           0 :                 if (query_switch_1 == NULL) {
   38226           0 :                         return -1;
   38227             :                 }
   38228           0 :                 object->out.query = query_switch_1;
   38229             :         }
   38230           0 :         return 0;
   38231             : }
   38232             : 
   38233           0 : static PyObject *py_netr_LogonControl2_get_result(PyObject *obj, void *closure)
   38234             : {
   38235           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
   38236           0 :         PyObject *py_result;
   38237           0 :         py_result = PyErr_FromWERROR(object->out.result);
   38238           0 :         return py_result;
   38239             : }
   38240             : 
   38241           0 : static int py_netr_LogonControl2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   38242             : {
   38243           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
   38244           0 :         if (value == NULL) {
   38245           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   38246           0 :                 return -1;
   38247             :         }
   38248           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   38249           0 :         return 0;
   38250             : }
   38251             : 
   38252             : static PyGetSetDef py_netr_LogonControl2_getsetters[] = {
   38253             :         {
   38254             :                 .name = discard_const_p(char, "in_logon_server"),
   38255             :                 .get = py_netr_LogonControl2_in_get_logon_server,
   38256             :                 .set = py_netr_LogonControl2_in_set_logon_server,
   38257             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38258             :         },
   38259             :         {
   38260             :                 .name = discard_const_p(char, "in_function_code"),
   38261             :                 .get = py_netr_LogonControl2_in_get_function_code,
   38262             :                 .set = py_netr_LogonControl2_in_set_function_code,
   38263             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   38264             :         },
   38265             :         {
   38266             :                 .name = discard_const_p(char, "in_level"),
   38267             :                 .get = py_netr_LogonControl2_in_get_level,
   38268             :                 .set = py_netr_LogonControl2_in_set_level,
   38269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   38270             :         },
   38271             :         {
   38272             :                 .name = discard_const_p(char, "in_data"),
   38273             :                 .get = py_netr_LogonControl2_in_get_data,
   38274             :                 .set = py_netr_LogonControl2_in_set_data,
   38275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
   38276             :         },
   38277             :         {
   38278             :                 .name = discard_const_p(char, "out_query"),
   38279             :                 .get = py_netr_LogonControl2_out_get_query,
   38280             :                 .set = py_netr_LogonControl2_out_set_query,
   38281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   38282             :         },
   38283             :         {
   38284             :                 .name = discard_const_p(char, "result"),
   38285             :                 .get = py_netr_LogonControl2_get_result,
   38286             :                 .set = py_netr_LogonControl2_set_result,
   38287             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   38288             :         },
   38289             :         { .name = NULL }
   38290             : };
   38291             : 
   38292           0 : static PyObject *py_netr_LogonControl2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   38293             : {
   38294           0 :         PyObject *self = pytalloc_new(struct netr_LogonControl2, type);
   38295           0 :         struct netr_LogonControl2 *_self = (struct netr_LogonControl2 *)pytalloc_get_ptr(self);
   38296           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   38297           0 :         _self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   38298           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   38299           0 :         return self;
   38300             : }
   38301             : 
   38302           0 : static PyObject *py_netr_LogonControl2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   38303             : {
   38304             : 
   38305             : 
   38306           0 :         return PyLong_FromLong(14);
   38307             : }
   38308             : 
   38309           0 : static PyObject *py_netr_LogonControl2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   38310             : {
   38311           0 :         const struct ndr_interface_call *call = NULL;
   38312           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
   38313           0 :         PyObject *ret = NULL;
   38314           0 :         struct ndr_push *push = NULL;
   38315           0 :         DATA_BLOB blob;
   38316           0 :         enum ndr_err_code err;
   38317             : 
   38318           0 :         if (ndr_table_netlogon.num_calls < 15) {
   38319           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_pack");
   38320           0 :                 return NULL;
   38321             :         }
   38322           0 :         call = &ndr_table_netlogon.calls[14];
   38323             : 
   38324           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   38325           0 :         if (push == NULL) {
   38326           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38327           0 :                 return NULL;
   38328             :         }
   38329             : 
   38330           0 :         push->flags |= ndr_push_flags;
   38331             : 
   38332           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   38333           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38334           0 :                 TALLOC_FREE(push);
   38335           0 :                 PyErr_SetNdrError(err);
   38336           0 :                 return NULL;
   38337             :         }
   38338           0 :         blob = ndr_push_blob(push);
   38339           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   38340           0 :         TALLOC_FREE(push);
   38341           0 :         return ret;
   38342             : }
   38343             : 
   38344           0 : static PyObject *py_netr_LogonControl2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38345             : {
   38346           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38347           0 :         PyObject *bigendian_obj = NULL;
   38348           0 :         PyObject *ndr64_obj = NULL;
   38349           0 :         libndr_flags ndr_push_flags = 0;
   38350             : 
   38351           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   38352             :                 discard_const_p(char *, kwnames),
   38353             :                 &bigendian_obj,
   38354             :                 &ndr64_obj)) {
   38355           0 :                 return NULL;
   38356             :         }
   38357             : 
   38358           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38359           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38360             :         }
   38361           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38362           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38363             :         }
   38364             : 
   38365           0 :         return py_netr_LogonControl2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   38366             : }
   38367             : 
   38368           0 : static PyObject *py_netr_LogonControl2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38369             : {
   38370           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38371           0 :         PyObject *bigendian_obj = NULL;
   38372           0 :         PyObject *ndr64_obj = NULL;
   38373           0 :         libndr_flags ndr_push_flags = 0;
   38374             : 
   38375           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   38376             :                 discard_const_p(char *, kwnames),
   38377             :                 &bigendian_obj,
   38378             :                 &ndr64_obj)) {
   38379           0 :                 return NULL;
   38380             :         }
   38381             : 
   38382           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38383           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38384             :         }
   38385           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38386           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38387             :         }
   38388             : 
   38389           0 :         return py_netr_LogonControl2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   38390             : }
   38391             : 
   38392           0 : static PyObject *py_netr_LogonControl2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   38393             : {
   38394           0 :         const struct ndr_interface_call *call = NULL;
   38395           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
   38396           0 :         struct ndr_pull *pull = NULL;
   38397           0 :         enum ndr_err_code err;
   38398             : 
   38399           0 :         if (ndr_table_netlogon.num_calls < 15) {
   38400           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_unpack");
   38401           0 :                 return NULL;
   38402             :         }
   38403           0 :         call = &ndr_table_netlogon.calls[14];
   38404             : 
   38405           0 :         pull = ndr_pull_init_blob(blob, object);
   38406           0 :         if (pull == NULL) {
   38407           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38408           0 :                 return NULL;
   38409             :         }
   38410             : 
   38411           0 :         pull->flags |= ndr_pull_flags;
   38412             : 
   38413           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   38414           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38415           0 :                 TALLOC_FREE(pull);
   38416           0 :                 PyErr_SetNdrError(err);
   38417           0 :                 return NULL;
   38418             :         }
   38419           0 :         if (!allow_remaining) {
   38420           0 :                 uint32_t highest_ofs;
   38421             : 
   38422           0 :                 if (pull->offset > pull->relative_highest_offset) {
   38423           0 :                         highest_ofs = pull->offset;
   38424             :                 } else {
   38425           0 :                         highest_ofs = pull->relative_highest_offset;
   38426             :                 }
   38427           0 :                 if (highest_ofs < pull->data_size) {
   38428           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   38429             :                                 "not all bytes consumed ofs[%u] size[%u]",
   38430             :                                 highest_ofs, pull->data_size);
   38431           0 :                         TALLOC_FREE(pull);
   38432           0 :                         PyErr_SetNdrError(err);
   38433           0 :                         return NULL;
   38434             :                 }
   38435             :         }
   38436             : 
   38437           0 :         TALLOC_FREE(pull);
   38438           0 :         Py_RETURN_NONE;
   38439             : }
   38440             : 
   38441           0 : static PyObject *py_netr_LogonControl2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38442             : {
   38443           0 :         DATA_BLOB blob;
   38444           0 :         Py_ssize_t blob_length = 0;
   38445           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38446           0 :         PyObject *bigendian_obj = NULL;
   38447           0 :         PyObject *ndr64_obj = NULL;
   38448           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38449           0 :         PyObject *allow_remaining_obj = NULL;
   38450           0 :         bool allow_remaining = false;
   38451             : 
   38452           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   38453             :                 discard_const_p(char *, kwnames),
   38454             :                 &blob.data, &blob_length,
   38455             :                 &bigendian_obj,
   38456             :                 &ndr64_obj,
   38457             :                 &allow_remaining_obj)) {
   38458           0 :                 return NULL;
   38459             :         }
   38460           0 :         blob.length = blob_length;
   38461             : 
   38462           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38463           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38464             :         }
   38465           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38466           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38467             :         }
   38468             : 
   38469           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38470           0 :                 allow_remaining = true;
   38471             :         }
   38472             : 
   38473           0 :         return py_netr_LogonControl2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   38474             : }
   38475             : 
   38476           0 : static PyObject *py_netr_LogonControl2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38477             : {
   38478           0 :         DATA_BLOB blob;
   38479           0 :         Py_ssize_t blob_length = 0;
   38480           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38481           0 :         PyObject *bigendian_obj = NULL;
   38482           0 :         PyObject *ndr64_obj = NULL;
   38483           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38484           0 :         PyObject *allow_remaining_obj = NULL;
   38485           0 :         bool allow_remaining = false;
   38486             : 
   38487           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   38488             :                 discard_const_p(char *, kwnames),
   38489             :                 &blob.data, &blob_length,
   38490             :                 &bigendian_obj,
   38491             :                 &ndr64_obj,
   38492             :                 &allow_remaining_obj)) {
   38493           0 :                 return NULL;
   38494             :         }
   38495           0 :         blob.length = blob_length;
   38496             : 
   38497           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38498           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38499             :         }
   38500           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38501           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38502             :         }
   38503             : 
   38504           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38505           0 :                 allow_remaining = true;
   38506             :         }
   38507             : 
   38508           0 :         return py_netr_LogonControl2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   38509             : }
   38510             : 
   38511           0 : static PyObject *py_netr_LogonControl2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   38512             : {
   38513           0 :         const struct ndr_interface_call *call = NULL;
   38514           0 :         struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
   38515           0 :         PyObject *ret;
   38516           0 :         char *retstr;
   38517             : 
   38518           0 :         if (ndr_table_netlogon.num_calls < 15) {
   38519           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_print");
   38520           0 :                 return NULL;
   38521             :         }
   38522           0 :         call = &ndr_table_netlogon.calls[14];
   38523             : 
   38524           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   38525           0 :         ret = PyUnicode_FromString(retstr);
   38526           0 :         TALLOC_FREE(retstr);
   38527             : 
   38528           0 :         return ret;
   38529             : }
   38530             : 
   38531           0 : static PyObject *py_netr_LogonControl2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38532             : {
   38533           0 :         return py_netr_LogonControl2_ndr_print(py_obj, "netr_LogonControl2_in", NDR_IN);
   38534             : }
   38535             : 
   38536           0 : static PyObject *py_netr_LogonControl2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38537             : {
   38538           0 :         return py_netr_LogonControl2_ndr_print(py_obj, "netr_LogonControl2_out", NDR_OUT);
   38539             : }
   38540             : 
   38541             : static PyMethodDef py_netr_LogonControl2_methods[] = {
   38542             :         { "opnum", (PyCFunction)py_netr_LogonControl2_ndr_opnum, METH_NOARGS|METH_CLASS,
   38543             :                 "netlogon.netr_LogonControl2.opnum() -> 14 (0x0e) " },
   38544             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   38545             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   38546             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   38547             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   38548             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   38549             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   38550             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   38551             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   38552             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonControl2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   38553             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonControl2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   38554             :         { NULL, NULL, 0, NULL }
   38555             : };
   38556             : 
   38557             : 
   38558             : static PyTypeObject netr_LogonControl2_Type = {
   38559             :         PyVarObject_HEAD_INIT(NULL, 0)
   38560             :         .tp_name = "netlogon.netr_LogonControl2",
   38561             :         .tp_getset = py_netr_LogonControl2_getsetters,
   38562             :         .tp_methods = py_netr_LogonControl2_methods,
   38563             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   38564             :         .tp_new = py_netr_LogonControl2_new,
   38565             : };
   38566             : 
   38567           0 : static bool pack_py_netr_LogonControl2_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl2 *r)
   38568             : {
   38569           0 :         PyObject *py_logon_server;
   38570           0 :         PyObject *py_function_code;
   38571           0 :         PyObject *py_level;
   38572           0 :         PyObject *py_data;
   38573           0 :         const char *kwnames[] = {
   38574             :                 "logon_server", "function_code", "level", "data", NULL
   38575             :         };
   38576             : 
   38577           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_LogonControl2", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level, &py_data)) {
   38578           0 :                 return false;
   38579             :         }
   38580             : 
   38581           0 :         if (py_logon_server == NULL) {
   38582           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   38583           0 :                 return false;
   38584             :         }
   38585           0 :         if (py_logon_server == Py_None) {
   38586           0 :                 r->in.logon_server = NULL;
   38587             :         } else {
   38588           0 :                 r->in.logon_server = NULL;
   38589             :                 {
   38590           0 :                         const char *test_str;
   38591           0 :                         const char *talloc_str;
   38592           0 :                         PyObject *unicode = NULL;
   38593           0 :                         if (PyUnicode_Check(py_logon_server)) {
   38594           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   38595           0 :                                 if (unicode == NULL) {
   38596           0 :                                         return false;
   38597             :                                 }
   38598           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38599           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   38600           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   38601             :                         } else {
   38602           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   38603           0 :                                 return false;
   38604             :                         }
   38605           0 :                         talloc_str = talloc_strdup(r, test_str);
   38606           0 :                         if (unicode != NULL) {
   38607           0 :                                 Py_DECREF(unicode);
   38608             :                         }
   38609           0 :                         if (talloc_str == NULL) {
   38610           0 :                                 PyErr_NoMemory();
   38611           0 :                                 return false;
   38612             :                         }
   38613           0 :                         r->in.logon_server = talloc_str;
   38614             :                 }
   38615             :         }
   38616           0 :         if (py_function_code == NULL) {
   38617           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.function_code");
   38618           0 :                 return false;
   38619             :         }
   38620             :         {
   38621           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   38622           0 :                 if (PyLong_Check(py_function_code)) {
   38623           0 :                         unsigned long long test_var;
   38624           0 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   38625           0 :                         if (PyErr_Occurred() != NULL) {
   38626           0 :                                 return false;
   38627             :                         }
   38628           0 :                         if (test_var > uint_max) {
   38629           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38630             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38631           0 :                                 return false;
   38632             :                         }
   38633           0 :                         r->in.function_code = test_var;
   38634             :                 } else {
   38635           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38636             :                           PyLong_Type.tp_name);
   38637           0 :                         return false;
   38638             :                 }
   38639             :         }
   38640           0 :         if (py_level == NULL) {
   38641           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   38642           0 :                 return false;
   38643             :         }
   38644             :         {
   38645           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   38646           0 :                 if (PyLong_Check(py_level)) {
   38647           0 :                         unsigned long long test_var;
   38648           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   38649           0 :                         if (PyErr_Occurred() != NULL) {
   38650           0 :                                 return false;
   38651             :                         }
   38652           0 :                         if (test_var > uint_max) {
   38653           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38654             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38655           0 :                                 return false;
   38656             :                         }
   38657           0 :                         r->in.level = test_var;
   38658             :                 } else {
   38659           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38660             :                           PyLong_Type.tp_name);
   38661           0 :                         return false;
   38662             :                 }
   38663             :         }
   38664           0 :         if (py_data == NULL) {
   38665           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.data");
   38666           0 :                 return false;
   38667             :         }
   38668           0 :         r->in.data = talloc_ptrtype(r, r->in.data);
   38669           0 :         if (r->in.data == NULL) {
   38670           0 :                 PyErr_NoMemory();
   38671           0 :                 return false;
   38672             :         }
   38673             :         {
   38674           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   38675           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");
   38676           0 :                 if (data_switch_1 == NULL) {
   38677           0 :                         return false;
   38678             :                 }
   38679           0 :                 r->in.data = data_switch_1;
   38680             :         }
   38681           0 :         return true;
   38682             : }
   38683             : 
   38684           0 : static PyObject *unpack_py_netr_LogonControl2_args_out(struct netr_LogonControl2 *r)
   38685             : {
   38686           0 :         PyObject *result;
   38687           0 :         PyObject *py_query;
   38688           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");
   38689           0 :         if (py_query == NULL) {
   38690           0 :                 return NULL;
   38691             :         }
   38692           0 :         result = py_query;
   38693           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   38694           0 :                 PyErr_SetWERROR(r->out.result);
   38695           0 :                 return NULL;
   38696             :         }
   38697             : 
   38698           0 :         return result;
   38699             : }
   38700             : 
   38701             : 
   38702           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_server_name(PyObject *obj, void *closure)
   38703             : {
   38704           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
   38705           0 :         PyObject *py_server_name;
   38706           0 :         if (object->in.server_name == NULL) {
   38707           0 :                 Py_RETURN_NONE;
   38708             :         }
   38709           0 :         if (object->in.server_name == NULL) {
   38710           0 :                 py_server_name = Py_None;
   38711           0 :                 Py_INCREF(py_server_name);
   38712             :         } else {
   38713           0 :                 if (object->in.server_name == NULL) {
   38714           0 :                         py_server_name = Py_None;
   38715           0 :                         Py_INCREF(py_server_name);
   38716             :                 } else {
   38717           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   38718             :                 }
   38719             :         }
   38720           0 :         return py_server_name;
   38721             : }
   38722             : 
   38723           0 : static int py_netr_ServerAuthenticate2_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   38724             : {
   38725           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   38726           0 :         if (value == NULL) {
   38727           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   38728           0 :                 return -1;
   38729             :         }
   38730           0 :         if (value == Py_None) {
   38731           0 :                 object->in.server_name = NULL;
   38732             :         } else {
   38733           0 :                 object->in.server_name = NULL;
   38734             :                 {
   38735           0 :                         const char *test_str;
   38736           0 :                         const char *talloc_str;
   38737           0 :                         PyObject *unicode = NULL;
   38738           0 :                         if (PyUnicode_Check(value)) {
   38739           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38740           0 :                                 if (unicode == NULL) {
   38741           0 :                                         return -1;
   38742             :                                 }
   38743           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38744           0 :                         } else if (PyBytes_Check(value)) {
   38745           0 :                                 test_str = PyBytes_AS_STRING(value);
   38746             :                         } else {
   38747           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38748           0 :                                 return -1;
   38749             :                         }
   38750           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38751           0 :                         if (unicode != NULL) {
   38752           0 :                                 Py_DECREF(unicode);
   38753             :                         }
   38754           0 :                         if (talloc_str == NULL) {
   38755           0 :                                 PyErr_NoMemory();
   38756           0 :                                 return -1;
   38757             :                         }
   38758           0 :                         object->in.server_name = talloc_str;
   38759             :                 }
   38760             :         }
   38761           0 :         return 0;
   38762             : }
   38763             : 
   38764           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_account_name(PyObject *obj, void *closure)
   38765             : {
   38766           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
   38767           0 :         PyObject *py_account_name;
   38768           0 :         if (object->in.account_name == NULL) {
   38769           0 :                 Py_RETURN_NONE;
   38770             :         }
   38771           0 :         if (object->in.account_name == NULL) {
   38772           0 :                 py_account_name = Py_None;
   38773           0 :                 Py_INCREF(py_account_name);
   38774             :         } else {
   38775           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   38776             :         }
   38777           0 :         return py_account_name;
   38778             : }
   38779             : 
   38780           0 : static int py_netr_ServerAuthenticate2_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   38781             : {
   38782           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   38783           0 :         if (value == NULL) {
   38784           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   38785           0 :                 return -1;
   38786             :         }
   38787           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   38788           0 :         if (object->in.account_name == NULL) {
   38789           0 :                 PyErr_NoMemory();
   38790           0 :                 return -1;
   38791             :         }
   38792             :         {
   38793           0 :                 const char *test_str;
   38794           0 :                 const char *talloc_str;
   38795           0 :                 PyObject *unicode = NULL;
   38796           0 :                 if (PyUnicode_Check(value)) {
   38797           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38798           0 :                         if (unicode == NULL) {
   38799           0 :                                 return -1;
   38800             :                         }
   38801           0 :                         test_str = PyBytes_AS_STRING(unicode);
   38802           0 :                 } else if (PyBytes_Check(value)) {
   38803           0 :                         test_str = PyBytes_AS_STRING(value);
   38804             :                 } else {
   38805           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38806           0 :                         return -1;
   38807             :                 }
   38808           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38809           0 :                 if (unicode != NULL) {
   38810           0 :                         Py_DECREF(unicode);
   38811             :                 }
   38812           0 :                 if (talloc_str == NULL) {
   38813           0 :                         PyErr_NoMemory();
   38814           0 :                         return -1;
   38815             :                 }
   38816           0 :                 object->in.account_name = talloc_str;
   38817             :         }
   38818           0 :         return 0;
   38819             : }
   38820             : 
   38821           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_secure_channel_type(PyObject *obj, void *closure)
   38822             : {
   38823           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
   38824           0 :         PyObject *py_secure_channel_type;
   38825           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
   38826           0 :         return py_secure_channel_type;
   38827             : }
   38828             : 
   38829           0 : static int py_netr_ServerAuthenticate2_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   38830             : {
   38831           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   38832           0 :         if (value == NULL) {
   38833           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
   38834           0 :                 return -1;
   38835             :         }
   38836             :         {
   38837           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   38838           0 :                 if (PyLong_Check(value)) {
   38839           0 :                         unsigned long long test_var;
   38840           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38841           0 :                         if (PyErr_Occurred() != NULL) {
   38842           0 :                                 return -1;
   38843             :                         }
   38844           0 :                         if (test_var > uint_max) {
   38845           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38846             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38847           0 :                                 return -1;
   38848             :                         }
   38849           0 :                         object->in.secure_channel_type = test_var;
   38850             :                 } else {
   38851           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38852             :                           PyLong_Type.tp_name);
   38853           0 :                         return -1;
   38854             :                 }
   38855             :         }
   38856           0 :         return 0;
   38857             : }
   38858             : 
   38859           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_computer_name(PyObject *obj, void *closure)
   38860             : {
   38861           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
   38862           0 :         PyObject *py_computer_name;
   38863           0 :         if (object->in.computer_name == NULL) {
   38864           0 :                 Py_RETURN_NONE;
   38865             :         }
   38866           0 :         if (object->in.computer_name == NULL) {
   38867           0 :                 py_computer_name = Py_None;
   38868           0 :                 Py_INCREF(py_computer_name);
   38869             :         } else {
   38870           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   38871             :         }
   38872           0 :         return py_computer_name;
   38873             : }
   38874             : 
   38875           0 : static int py_netr_ServerAuthenticate2_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   38876             : {
   38877           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   38878           0 :         if (value == NULL) {
   38879           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   38880           0 :                 return -1;
   38881             :         }
   38882           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   38883           0 :         if (object->in.computer_name == NULL) {
   38884           0 :                 PyErr_NoMemory();
   38885           0 :                 return -1;
   38886             :         }
   38887             :         {
   38888           0 :                 const char *test_str;
   38889           0 :                 const char *talloc_str;
   38890           0 :                 PyObject *unicode = NULL;
   38891           0 :                 if (PyUnicode_Check(value)) {
   38892           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38893           0 :                         if (unicode == NULL) {
   38894           0 :                                 return -1;
   38895             :                         }
   38896           0 :                         test_str = PyBytes_AS_STRING(unicode);
   38897           0 :                 } else if (PyBytes_Check(value)) {
   38898           0 :                         test_str = PyBytes_AS_STRING(value);
   38899             :                 } else {
   38900           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38901           0 :                         return -1;
   38902             :                 }
   38903           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38904           0 :                 if (unicode != NULL) {
   38905           0 :                         Py_DECREF(unicode);
   38906             :                 }
   38907           0 :                 if (talloc_str == NULL) {
   38908           0 :                         PyErr_NoMemory();
   38909           0 :                         return -1;
   38910             :                 }
   38911           0 :                 object->in.computer_name = talloc_str;
   38912             :         }
   38913           0 :         return 0;
   38914             : }
   38915             : 
   38916           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_credentials(PyObject *obj, void *closure)
   38917             : {
   38918           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
   38919           0 :         PyObject *py_credentials;
   38920           0 :         if (object->in.credentials == NULL) {
   38921           0 :                 Py_RETURN_NONE;
   38922             :         }
   38923           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   38924           0 :         return py_credentials;
   38925             : }
   38926             : 
   38927           0 : static int py_netr_ServerAuthenticate2_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   38928             : {
   38929           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   38930           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   38931           0 :         if (value == NULL) {
   38932           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credentials");
   38933           0 :                 return -1;
   38934             :         }
   38935           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   38936           0 :         if (object->in.credentials == NULL) {
   38937           0 :                 PyErr_NoMemory();
   38938           0 :                 return -1;
   38939             :         }
   38940           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   38941           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38942           0 :                 PyErr_NoMemory();
   38943           0 :                 return -1;
   38944             :         }
   38945           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   38946           0 :         return 0;
   38947             : }
   38948             : 
   38949           0 : static PyObject *py_netr_ServerAuthenticate2_out_get_return_credentials(PyObject *obj, void *closure)
   38950             : {
   38951           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
   38952           0 :         PyObject *py_return_credentials;
   38953           0 :         if (object->out.return_credentials == NULL) {
   38954           0 :                 Py_RETURN_NONE;
   38955             :         }
   38956           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   38957           0 :         return py_return_credentials;
   38958             : }
   38959             : 
   38960           0 : static int py_netr_ServerAuthenticate2_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   38961             : {
   38962           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   38963           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   38964           0 :         if (value == NULL) {
   38965           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_credentials");
   38966           0 :                 return -1;
   38967             :         }
   38968           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   38969           0 :         if (object->out.return_credentials == NULL) {
   38970           0 :                 PyErr_NoMemory();
   38971           0 :                 return -1;
   38972             :         }
   38973           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   38974           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38975           0 :                 PyErr_NoMemory();
   38976           0 :                 return -1;
   38977             :         }
   38978           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   38979           0 :         return 0;
   38980             : }
   38981             : 
   38982           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_negotiate_flags(PyObject *obj, void *closure)
   38983             : {
   38984           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
   38985           0 :         PyObject *py_negotiate_flags;
   38986           0 :         if (object->in.negotiate_flags == NULL) {
   38987           0 :                 Py_RETURN_NONE;
   38988             :         }
   38989           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.negotiate_flags));
   38990           0 :         return py_negotiate_flags;
   38991             : }
   38992             : 
   38993           0 : static int py_netr_ServerAuthenticate2_in_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   38994             : {
   38995           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   38996           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.negotiate_flags));
   38997           0 :         if (value == NULL) {
   38998           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.negotiate_flags");
   38999           0 :                 return -1;
   39000             :         }
   39001           0 :         object->in.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.negotiate_flags);
   39002           0 :         if (object->in.negotiate_flags == NULL) {
   39003           0 :                 PyErr_NoMemory();
   39004           0 :                 return -1;
   39005             :         }
   39006             :         {
   39007           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.negotiate_flags));
   39008           0 :                 if (PyLong_Check(value)) {
   39009           0 :                         unsigned long long test_var;
   39010           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39011           0 :                         if (PyErr_Occurred() != NULL) {
   39012           0 :                                 return -1;
   39013             :                         }
   39014           0 :                         if (test_var > uint_max) {
   39015           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39016             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39017           0 :                                 return -1;
   39018             :                         }
   39019           0 :                         *object->in.negotiate_flags = test_var;
   39020             :                 } else {
   39021           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39022             :                           PyLong_Type.tp_name);
   39023           0 :                         return -1;
   39024             :                 }
   39025             :         }
   39026           0 :         return 0;
   39027             : }
   39028             : 
   39029           0 : static PyObject *py_netr_ServerAuthenticate2_out_get_negotiate_flags(PyObject *obj, void *closure)
   39030             : {
   39031           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
   39032           0 :         PyObject *py_negotiate_flags;
   39033           0 :         if (object->out.negotiate_flags == NULL) {
   39034           0 :                 Py_RETURN_NONE;
   39035             :         }
   39036           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.negotiate_flags));
   39037           0 :         return py_negotiate_flags;
   39038             : }
   39039             : 
   39040           0 : static int py_netr_ServerAuthenticate2_out_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   39041             : {
   39042           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   39043           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.negotiate_flags));
   39044           0 :         if (value == NULL) {
   39045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.negotiate_flags");
   39046           0 :                 return -1;
   39047             :         }
   39048           0 :         object->out.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.negotiate_flags);
   39049           0 :         if (object->out.negotiate_flags == NULL) {
   39050           0 :                 PyErr_NoMemory();
   39051           0 :                 return -1;
   39052             :         }
   39053             :         {
   39054           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.negotiate_flags));
   39055           0 :                 if (PyLong_Check(value)) {
   39056           0 :                         unsigned long long test_var;
   39057           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39058           0 :                         if (PyErr_Occurred() != NULL) {
   39059           0 :                                 return -1;
   39060             :                         }
   39061           0 :                         if (test_var > uint_max) {
   39062           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39063             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39064           0 :                                 return -1;
   39065             :                         }
   39066           0 :                         *object->out.negotiate_flags = test_var;
   39067             :                 } else {
   39068           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39069             :                           PyLong_Type.tp_name);
   39070           0 :                         return -1;
   39071             :                 }
   39072             :         }
   39073           0 :         return 0;
   39074             : }
   39075             : 
   39076           0 : static PyObject *py_netr_ServerAuthenticate2_get_result(PyObject *obj, void *closure)
   39077             : {
   39078           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
   39079           0 :         PyObject *py_result;
   39080           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   39081           0 :         return py_result;
   39082             : }
   39083             : 
   39084           0 : static int py_netr_ServerAuthenticate2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   39085             : {
   39086           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   39087           0 :         if (value == NULL) {
   39088           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   39089           0 :                 return -1;
   39090             :         }
   39091           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   39092           0 :         return 0;
   39093             : }
   39094             : 
   39095             : static PyGetSetDef py_netr_ServerAuthenticate2_getsetters[] = {
   39096             :         {
   39097             :                 .name = discard_const_p(char, "in_server_name"),
   39098             :                 .get = py_netr_ServerAuthenticate2_in_get_server_name,
   39099             :                 .set = py_netr_ServerAuthenticate2_in_set_server_name,
   39100             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39101             :         },
   39102             :         {
   39103             :                 .name = discard_const_p(char, "in_account_name"),
   39104             :                 .get = py_netr_ServerAuthenticate2_in_get_account_name,
   39105             :                 .set = py_netr_ServerAuthenticate2_in_set_account_name,
   39106             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39107             :         },
   39108             :         {
   39109             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   39110             :                 .get = py_netr_ServerAuthenticate2_in_get_secure_channel_type,
   39111             :                 .set = py_netr_ServerAuthenticate2_in_set_secure_channel_type,
   39112             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   39113             :         },
   39114             :         {
   39115             :                 .name = discard_const_p(char, "in_computer_name"),
   39116             :                 .get = py_netr_ServerAuthenticate2_in_get_computer_name,
   39117             :                 .set = py_netr_ServerAuthenticate2_in_set_computer_name,
   39118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39119             :         },
   39120             :         {
   39121             :                 .name = discard_const_p(char, "in_credentials"),
   39122             :                 .get = py_netr_ServerAuthenticate2_in_get_credentials,
   39123             :                 .set = py_netr_ServerAuthenticate2_in_set_credentials,
   39124             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   39125             :         },
   39126             :         {
   39127             :                 .name = discard_const_p(char, "out_return_credentials"),
   39128             :                 .get = py_netr_ServerAuthenticate2_out_get_return_credentials,
   39129             :                 .set = py_netr_ServerAuthenticate2_out_set_return_credentials,
   39130             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   39131             :         },
   39132             :         {
   39133             :                 .name = discard_const_p(char, "in_negotiate_flags"),
   39134             :                 .get = py_netr_ServerAuthenticate2_in_get_negotiate_flags,
   39135             :                 .set = py_netr_ServerAuthenticate2_in_set_negotiate_flags,
   39136             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   39137             :         },
   39138             :         {
   39139             :                 .name = discard_const_p(char, "out_negotiate_flags"),
   39140             :                 .get = py_netr_ServerAuthenticate2_out_get_negotiate_flags,
   39141             :                 .set = py_netr_ServerAuthenticate2_out_set_negotiate_flags,
   39142             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   39143             :         },
   39144             :         {
   39145             :                 .name = discard_const_p(char, "result"),
   39146             :                 .get = py_netr_ServerAuthenticate2_get_result,
   39147             :                 .set = py_netr_ServerAuthenticate2_set_result,
   39148             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   39149             :         },
   39150             :         { .name = NULL }
   39151             : };
   39152             : 
   39153           0 : static PyObject *py_netr_ServerAuthenticate2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   39154             : {
   39155           0 :         PyObject *self = pytalloc_new(struct netr_ServerAuthenticate2, type);
   39156           0 :         struct netr_ServerAuthenticate2 *_self = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(self);
   39157           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   39158           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   39159           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   39160           0 :         _self->in.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   39161           0 :         _self->out.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   39162           0 :         return self;
   39163             : }
   39164             : 
   39165           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   39166             : {
   39167             : 
   39168             : 
   39169           0 :         return PyLong_FromLong(15);
   39170             : }
   39171             : 
   39172           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   39173             : {
   39174           0 :         const struct ndr_interface_call *call = NULL;
   39175           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   39176           0 :         PyObject *ret = NULL;
   39177           0 :         struct ndr_push *push = NULL;
   39178           0 :         DATA_BLOB blob;
   39179           0 :         enum ndr_err_code err;
   39180             : 
   39181           0 :         if (ndr_table_netlogon.num_calls < 16) {
   39182           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_pack");
   39183           0 :                 return NULL;
   39184             :         }
   39185           0 :         call = &ndr_table_netlogon.calls[15];
   39186             : 
   39187           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   39188           0 :         if (push == NULL) {
   39189           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39190           0 :                 return NULL;
   39191             :         }
   39192             : 
   39193           0 :         push->flags |= ndr_push_flags;
   39194             : 
   39195           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   39196           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39197           0 :                 TALLOC_FREE(push);
   39198           0 :                 PyErr_SetNdrError(err);
   39199           0 :                 return NULL;
   39200             :         }
   39201           0 :         blob = ndr_push_blob(push);
   39202           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   39203           0 :         TALLOC_FREE(push);
   39204           0 :         return ret;
   39205             : }
   39206             : 
   39207           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39208             : {
   39209           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39210           0 :         PyObject *bigendian_obj = NULL;
   39211           0 :         PyObject *ndr64_obj = NULL;
   39212           0 :         libndr_flags ndr_push_flags = 0;
   39213             : 
   39214           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   39215             :                 discard_const_p(char *, kwnames),
   39216             :                 &bigendian_obj,
   39217             :                 &ndr64_obj)) {
   39218           0 :                 return NULL;
   39219             :         }
   39220             : 
   39221           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39222           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39223             :         }
   39224           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39225           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39226             :         }
   39227             : 
   39228           0 :         return py_netr_ServerAuthenticate2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   39229             : }
   39230             : 
   39231           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39232             : {
   39233           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39234           0 :         PyObject *bigendian_obj = NULL;
   39235           0 :         PyObject *ndr64_obj = NULL;
   39236           0 :         libndr_flags ndr_push_flags = 0;
   39237             : 
   39238           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   39239             :                 discard_const_p(char *, kwnames),
   39240             :                 &bigendian_obj,
   39241             :                 &ndr64_obj)) {
   39242           0 :                 return NULL;
   39243             :         }
   39244             : 
   39245           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39246           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39247             :         }
   39248           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39249           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39250             :         }
   39251             : 
   39252           0 :         return py_netr_ServerAuthenticate2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   39253             : }
   39254             : 
   39255           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   39256             : {
   39257           0 :         const struct ndr_interface_call *call = NULL;
   39258           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   39259           0 :         struct ndr_pull *pull = NULL;
   39260           0 :         enum ndr_err_code err;
   39261             : 
   39262           0 :         if (ndr_table_netlogon.num_calls < 16) {
   39263           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_unpack");
   39264           0 :                 return NULL;
   39265             :         }
   39266           0 :         call = &ndr_table_netlogon.calls[15];
   39267             : 
   39268           0 :         pull = ndr_pull_init_blob(blob, object);
   39269           0 :         if (pull == NULL) {
   39270           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39271           0 :                 return NULL;
   39272             :         }
   39273             : 
   39274           0 :         pull->flags |= ndr_pull_flags;
   39275             : 
   39276           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   39277           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39278           0 :                 TALLOC_FREE(pull);
   39279           0 :                 PyErr_SetNdrError(err);
   39280           0 :                 return NULL;
   39281             :         }
   39282           0 :         if (!allow_remaining) {
   39283           0 :                 uint32_t highest_ofs;
   39284             : 
   39285           0 :                 if (pull->offset > pull->relative_highest_offset) {
   39286           0 :                         highest_ofs = pull->offset;
   39287             :                 } else {
   39288           0 :                         highest_ofs = pull->relative_highest_offset;
   39289             :                 }
   39290           0 :                 if (highest_ofs < pull->data_size) {
   39291           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   39292             :                                 "not all bytes consumed ofs[%u] size[%u]",
   39293             :                                 highest_ofs, pull->data_size);
   39294           0 :                         TALLOC_FREE(pull);
   39295           0 :                         PyErr_SetNdrError(err);
   39296           0 :                         return NULL;
   39297             :                 }
   39298             :         }
   39299             : 
   39300           0 :         TALLOC_FREE(pull);
   39301           0 :         Py_RETURN_NONE;
   39302             : }
   39303             : 
   39304           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39305             : {
   39306           0 :         DATA_BLOB blob;
   39307           0 :         Py_ssize_t blob_length = 0;
   39308           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39309           0 :         PyObject *bigendian_obj = NULL;
   39310           0 :         PyObject *ndr64_obj = NULL;
   39311           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39312           0 :         PyObject *allow_remaining_obj = NULL;
   39313           0 :         bool allow_remaining = false;
   39314             : 
   39315           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   39316             :                 discard_const_p(char *, kwnames),
   39317             :                 &blob.data, &blob_length,
   39318             :                 &bigendian_obj,
   39319             :                 &ndr64_obj,
   39320             :                 &allow_remaining_obj)) {
   39321           0 :                 return NULL;
   39322             :         }
   39323           0 :         blob.length = blob_length;
   39324             : 
   39325           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39326           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39327             :         }
   39328           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39329           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39330             :         }
   39331             : 
   39332           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39333           0 :                 allow_remaining = true;
   39334             :         }
   39335             : 
   39336           0 :         return py_netr_ServerAuthenticate2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   39337             : }
   39338             : 
   39339           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39340             : {
   39341           0 :         DATA_BLOB blob;
   39342           0 :         Py_ssize_t blob_length = 0;
   39343           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39344           0 :         PyObject *bigendian_obj = NULL;
   39345           0 :         PyObject *ndr64_obj = NULL;
   39346           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39347           0 :         PyObject *allow_remaining_obj = NULL;
   39348           0 :         bool allow_remaining = false;
   39349             : 
   39350           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   39351             :                 discard_const_p(char *, kwnames),
   39352             :                 &blob.data, &blob_length,
   39353             :                 &bigendian_obj,
   39354             :                 &ndr64_obj,
   39355             :                 &allow_remaining_obj)) {
   39356           0 :                 return NULL;
   39357             :         }
   39358           0 :         blob.length = blob_length;
   39359             : 
   39360           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39361           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39362             :         }
   39363           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39364           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39365             :         }
   39366             : 
   39367           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39368           0 :                 allow_remaining = true;
   39369             :         }
   39370             : 
   39371           0 :         return py_netr_ServerAuthenticate2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   39372             : }
   39373             : 
   39374           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   39375             : {
   39376           0 :         const struct ndr_interface_call *call = NULL;
   39377           0 :         struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
   39378           0 :         PyObject *ret;
   39379           0 :         char *retstr;
   39380             : 
   39381           0 :         if (ndr_table_netlogon.num_calls < 16) {
   39382           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_print");
   39383           0 :                 return NULL;
   39384             :         }
   39385           0 :         call = &ndr_table_netlogon.calls[15];
   39386             : 
   39387           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   39388           0 :         ret = PyUnicode_FromString(retstr);
   39389           0 :         TALLOC_FREE(retstr);
   39390             : 
   39391           0 :         return ret;
   39392             : }
   39393             : 
   39394           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39395             : {
   39396           0 :         return py_netr_ServerAuthenticate2_ndr_print(py_obj, "netr_ServerAuthenticate2_in", NDR_IN);
   39397             : }
   39398             : 
   39399           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39400             : {
   39401           0 :         return py_netr_ServerAuthenticate2_ndr_print(py_obj, "netr_ServerAuthenticate2_out", NDR_OUT);
   39402             : }
   39403             : 
   39404             : static PyMethodDef py_netr_ServerAuthenticate2_methods[] = {
   39405             :         { "opnum", (PyCFunction)py_netr_ServerAuthenticate2_ndr_opnum, METH_NOARGS|METH_CLASS,
   39406             :                 "netlogon.netr_ServerAuthenticate2.opnum() -> 15 (0x0f) " },
   39407             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   39408             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   39409             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   39410             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   39411             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   39412             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   39413             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   39414             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   39415             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerAuthenticate2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   39416             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerAuthenticate2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   39417             :         { NULL, NULL, 0, NULL }
   39418             : };
   39419             : 
   39420             : 
   39421             : static PyTypeObject netr_ServerAuthenticate2_Type = {
   39422             :         PyVarObject_HEAD_INIT(NULL, 0)
   39423             :         .tp_name = "netlogon.netr_ServerAuthenticate2",
   39424             :         .tp_getset = py_netr_ServerAuthenticate2_getsetters,
   39425             :         .tp_methods = py_netr_ServerAuthenticate2_methods,
   39426             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   39427             :         .tp_new = py_netr_ServerAuthenticate2_new,
   39428             : };
   39429             : 
   39430           0 : static bool pack_py_netr_ServerAuthenticate2_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate2 *r)
   39431             : {
   39432           0 :         PyObject *py_server_name;
   39433           0 :         PyObject *py_account_name;
   39434           0 :         PyObject *py_secure_channel_type;
   39435           0 :         PyObject *py_computer_name;
   39436           0 :         PyObject *py_credentials;
   39437           0 :         PyObject *py_negotiate_flags;
   39438           0 :         const char *kwnames[] = {
   39439             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credentials", "negotiate_flags", NULL
   39440             :         };
   39441             : 
   39442           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)) {
   39443           0 :                 return false;
   39444             :         }
   39445             : 
   39446           0 :         if (py_server_name == NULL) {
   39447           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   39448           0 :                 return false;
   39449             :         }
   39450           0 :         if (py_server_name == Py_None) {
   39451           0 :                 r->in.server_name = NULL;
   39452             :         } else {
   39453           0 :                 r->in.server_name = NULL;
   39454             :                 {
   39455           0 :                         const char *test_str;
   39456           0 :                         const char *talloc_str;
   39457           0 :                         PyObject *unicode = NULL;
   39458           0 :                         if (PyUnicode_Check(py_server_name)) {
   39459           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   39460           0 :                                 if (unicode == NULL) {
   39461           0 :                                         return false;
   39462             :                                 }
   39463           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39464           0 :                         } else if (PyBytes_Check(py_server_name)) {
   39465           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   39466             :                         } else {
   39467           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   39468           0 :                                 return false;
   39469             :                         }
   39470           0 :                         talloc_str = talloc_strdup(r, test_str);
   39471           0 :                         if (unicode != NULL) {
   39472           0 :                                 Py_DECREF(unicode);
   39473             :                         }
   39474           0 :                         if (talloc_str == NULL) {
   39475           0 :                                 PyErr_NoMemory();
   39476           0 :                                 return false;
   39477             :                         }
   39478           0 :                         r->in.server_name = talloc_str;
   39479             :                 }
   39480             :         }
   39481           0 :         if (py_account_name == NULL) {
   39482           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   39483           0 :                 return false;
   39484             :         }
   39485           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   39486           0 :         if (r->in.account_name == NULL) {
   39487           0 :                 PyErr_NoMemory();
   39488           0 :                 return false;
   39489             :         }
   39490             :         {
   39491           0 :                 const char *test_str;
   39492           0 :                 const char *talloc_str;
   39493           0 :                 PyObject *unicode = NULL;
   39494           0 :                 if (PyUnicode_Check(py_account_name)) {
   39495           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   39496           0 :                         if (unicode == NULL) {
   39497           0 :                                 return false;
   39498             :                         }
   39499           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39500           0 :                 } else if (PyBytes_Check(py_account_name)) {
   39501           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   39502             :                 } else {
   39503           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   39504           0 :                         return false;
   39505             :                 }
   39506           0 :                 talloc_str = talloc_strdup(r, test_str);
   39507           0 :                 if (unicode != NULL) {
   39508           0 :                         Py_DECREF(unicode);
   39509             :                 }
   39510           0 :                 if (talloc_str == NULL) {
   39511           0 :                         PyErr_NoMemory();
   39512           0 :                         return false;
   39513             :                 }
   39514           0 :                 r->in.account_name = talloc_str;
   39515             :         }
   39516           0 :         if (py_secure_channel_type == NULL) {
   39517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
   39518           0 :                 return false;
   39519             :         }
   39520             :         {
   39521           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   39522           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   39523           0 :                         unsigned long long test_var;
   39524           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   39525           0 :                         if (PyErr_Occurred() != NULL) {
   39526           0 :                                 return false;
   39527             :                         }
   39528           0 :                         if (test_var > uint_max) {
   39529           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39530             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39531           0 :                                 return false;
   39532             :                         }
   39533           0 :                         r->in.secure_channel_type = test_var;
   39534             :                 } else {
   39535           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39536             :                           PyLong_Type.tp_name);
   39537           0 :                         return false;
   39538             :                 }
   39539             :         }
   39540           0 :         if (py_computer_name == NULL) {
   39541           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   39542           0 :                 return false;
   39543             :         }
   39544           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   39545           0 :         if (r->in.computer_name == NULL) {
   39546           0 :                 PyErr_NoMemory();
   39547           0 :                 return false;
   39548             :         }
   39549             :         {
   39550           0 :                 const char *test_str;
   39551           0 :                 const char *talloc_str;
   39552           0 :                 PyObject *unicode = NULL;
   39553           0 :                 if (PyUnicode_Check(py_computer_name)) {
   39554           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   39555           0 :                         if (unicode == NULL) {
   39556           0 :                                 return false;
   39557             :                         }
   39558           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39559           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   39560           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   39561             :                 } else {
   39562           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   39563           0 :                         return false;
   39564             :                 }
   39565           0 :                 talloc_str = talloc_strdup(r, test_str);
   39566           0 :                 if (unicode != NULL) {
   39567           0 :                         Py_DECREF(unicode);
   39568             :                 }
   39569           0 :                 if (talloc_str == NULL) {
   39570           0 :                         PyErr_NoMemory();
   39571           0 :                         return false;
   39572             :                 }
   39573           0 :                 r->in.computer_name = talloc_str;
   39574             :         }
   39575           0 :         if (py_credentials == NULL) {
   39576           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credentials");
   39577           0 :                 return false;
   39578             :         }
   39579           0 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   39580           0 :         if (r->in.credentials == NULL) {
   39581           0 :                 PyErr_NoMemory();
   39582           0 :                 return false;
   39583             :         }
   39584           0 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   39585           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   39586           0 :                 PyErr_NoMemory();
   39587           0 :                 return false;
   39588             :         }
   39589           0 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   39590           0 :         if (py_negotiate_flags == NULL) {
   39591           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.negotiate_flags");
   39592           0 :                 return false;
   39593             :         }
   39594           0 :         r->in.negotiate_flags = talloc_ptrtype(r, r->in.negotiate_flags);
   39595           0 :         if (r->in.negotiate_flags == NULL) {
   39596           0 :                 PyErr_NoMemory();
   39597           0 :                 return false;
   39598             :         }
   39599             :         {
   39600           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.negotiate_flags));
   39601           0 :                 if (PyLong_Check(py_negotiate_flags)) {
   39602           0 :                         unsigned long long test_var;
   39603           0 :                         test_var = PyLong_AsUnsignedLongLong(py_negotiate_flags);
   39604           0 :                         if (PyErr_Occurred() != NULL) {
   39605           0 :                                 return false;
   39606             :                         }
   39607           0 :                         if (test_var > uint_max) {
   39608           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39609             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39610           0 :                                 return false;
   39611             :                         }
   39612           0 :                         *r->in.negotiate_flags = test_var;
   39613             :                 } else {
   39614           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39615             :                           PyLong_Type.tp_name);
   39616           0 :                         return false;
   39617             :                 }
   39618             :         }
   39619           0 :         return true;
   39620             : }
   39621             : 
   39622           0 : static PyObject *unpack_py_netr_ServerAuthenticate2_args_out(struct netr_ServerAuthenticate2 *r)
   39623             : {
   39624           0 :         PyObject *result;
   39625           0 :         PyObject *py_return_credentials;
   39626           0 :         PyObject *py_negotiate_flags;
   39627           0 :         result = PyTuple_New(2);
   39628           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   39629           0 :         PyTuple_SetItem(result, 0, py_return_credentials);
   39630           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.negotiate_flags));
   39631           0 :         PyTuple_SetItem(result, 1, py_negotiate_flags);
   39632           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   39633           0 :                 PyErr_SetNTSTATUS(r->out.result);
   39634           0 :                 return NULL;
   39635             :         }
   39636             : 
   39637           0 :         return result;
   39638             : }
   39639             : 
   39640             : 
   39641           0 : static PyObject *py_netr_DatabaseSync2_in_get_logon_server(PyObject *obj, void *closure)
   39642             : {
   39643           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   39644           0 :         PyObject *py_logon_server;
   39645           0 :         if (object->in.logon_server == NULL) {
   39646           0 :                 Py_RETURN_NONE;
   39647             :         }
   39648           0 :         if (object->in.logon_server == NULL) {
   39649           0 :                 py_logon_server = Py_None;
   39650           0 :                 Py_INCREF(py_logon_server);
   39651             :         } else {
   39652           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   39653             :         }
   39654           0 :         return py_logon_server;
   39655             : }
   39656             : 
   39657           0 : static int py_netr_DatabaseSync2_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   39658             : {
   39659           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   39660           0 :         if (value == NULL) {
   39661           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   39662           0 :                 return -1;
   39663             :         }
   39664           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   39665           0 :         if (object->in.logon_server == NULL) {
   39666           0 :                 PyErr_NoMemory();
   39667           0 :                 return -1;
   39668             :         }
   39669             :         {
   39670           0 :                 const char *test_str;
   39671           0 :                 const char *talloc_str;
   39672           0 :                 PyObject *unicode = NULL;
   39673           0 :                 if (PyUnicode_Check(value)) {
   39674           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39675           0 :                         if (unicode == NULL) {
   39676           0 :                                 return -1;
   39677             :                         }
   39678           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39679           0 :                 } else if (PyBytes_Check(value)) {
   39680           0 :                         test_str = PyBytes_AS_STRING(value);
   39681             :                 } else {
   39682           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39683           0 :                         return -1;
   39684             :                 }
   39685           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39686           0 :                 if (unicode != NULL) {
   39687           0 :                         Py_DECREF(unicode);
   39688             :                 }
   39689           0 :                 if (talloc_str == NULL) {
   39690           0 :                         PyErr_NoMemory();
   39691           0 :                         return -1;
   39692             :                 }
   39693           0 :                 object->in.logon_server = talloc_str;
   39694             :         }
   39695           0 :         return 0;
   39696             : }
   39697             : 
   39698           0 : static PyObject *py_netr_DatabaseSync2_in_get_computername(PyObject *obj, void *closure)
   39699             : {
   39700           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   39701           0 :         PyObject *py_computername;
   39702           0 :         if (object->in.computername == NULL) {
   39703           0 :                 Py_RETURN_NONE;
   39704             :         }
   39705           0 :         if (object->in.computername == NULL) {
   39706           0 :                 py_computername = Py_None;
   39707           0 :                 Py_INCREF(py_computername);
   39708             :         } else {
   39709           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   39710             :         }
   39711           0 :         return py_computername;
   39712             : }
   39713             : 
   39714           0 : static int py_netr_DatabaseSync2_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   39715             : {
   39716           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   39717           0 :         if (value == NULL) {
   39718           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
   39719           0 :                 return -1;
   39720             :         }
   39721           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   39722           0 :         if (object->in.computername == NULL) {
   39723           0 :                 PyErr_NoMemory();
   39724           0 :                 return -1;
   39725             :         }
   39726             :         {
   39727           0 :                 const char *test_str;
   39728           0 :                 const char *talloc_str;
   39729           0 :                 PyObject *unicode = NULL;
   39730           0 :                 if (PyUnicode_Check(value)) {
   39731           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39732           0 :                         if (unicode == NULL) {
   39733           0 :                                 return -1;
   39734             :                         }
   39735           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39736           0 :                 } else if (PyBytes_Check(value)) {
   39737           0 :                         test_str = PyBytes_AS_STRING(value);
   39738             :                 } else {
   39739           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39740           0 :                         return -1;
   39741             :                 }
   39742           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39743           0 :                 if (unicode != NULL) {
   39744           0 :                         Py_DECREF(unicode);
   39745             :                 }
   39746           0 :                 if (talloc_str == NULL) {
   39747           0 :                         PyErr_NoMemory();
   39748           0 :                         return -1;
   39749             :                 }
   39750           0 :                 object->in.computername = talloc_str;
   39751             :         }
   39752           0 :         return 0;
   39753             : }
   39754             : 
   39755           0 : static PyObject *py_netr_DatabaseSync2_in_get_credential(PyObject *obj, void *closure)
   39756             : {
   39757           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   39758           0 :         PyObject *py_credential;
   39759           0 :         if (object->in.credential == NULL) {
   39760           0 :                 Py_RETURN_NONE;
   39761             :         }
   39762           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   39763           0 :         return py_credential;
   39764             : }
   39765             : 
   39766           0 : static int py_netr_DatabaseSync2_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   39767             : {
   39768           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   39769           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   39770           0 :         if (value == NULL) {
   39771           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   39772           0 :                 return -1;
   39773             :         }
   39774           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   39775           0 :         if (object->in.credential == NULL) {
   39776           0 :                 PyErr_NoMemory();
   39777           0 :                 return -1;
   39778             :         }
   39779           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   39780           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39781           0 :                 PyErr_NoMemory();
   39782           0 :                 return -1;
   39783             :         }
   39784           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   39785           0 :         return 0;
   39786             : }
   39787             : 
   39788           0 : static PyObject *py_netr_DatabaseSync2_in_get_return_authenticator(PyObject *obj, void *closure)
   39789             : {
   39790           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   39791           0 :         PyObject *py_return_authenticator;
   39792           0 :         if (object->in.return_authenticator == NULL) {
   39793           0 :                 Py_RETURN_NONE;
   39794             :         }
   39795           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   39796           0 :         return py_return_authenticator;
   39797             : }
   39798             : 
   39799           0 : static int py_netr_DatabaseSync2_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   39800             : {
   39801           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   39802           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   39803           0 :         if (value == NULL) {
   39804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   39805           0 :                 return -1;
   39806             :         }
   39807           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   39808           0 :         if (object->in.return_authenticator == NULL) {
   39809           0 :                 PyErr_NoMemory();
   39810           0 :                 return -1;
   39811             :         }
   39812           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   39813           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39814           0 :                 PyErr_NoMemory();
   39815           0 :                 return -1;
   39816             :         }
   39817           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   39818           0 :         return 0;
   39819             : }
   39820             : 
   39821           0 : static PyObject *py_netr_DatabaseSync2_out_get_return_authenticator(PyObject *obj, void *closure)
   39822             : {
   39823           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   39824           0 :         PyObject *py_return_authenticator;
   39825           0 :         if (object->out.return_authenticator == NULL) {
   39826           0 :                 Py_RETURN_NONE;
   39827             :         }
   39828           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   39829           0 :         return py_return_authenticator;
   39830             : }
   39831             : 
   39832           0 : static int py_netr_DatabaseSync2_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   39833             : {
   39834           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   39835           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   39836           0 :         if (value == NULL) {
   39837           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   39838           0 :                 return -1;
   39839             :         }
   39840           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   39841           0 :         if (object->out.return_authenticator == NULL) {
   39842           0 :                 PyErr_NoMemory();
   39843           0 :                 return -1;
   39844             :         }
   39845           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   39846           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39847           0 :                 PyErr_NoMemory();
   39848           0 :                 return -1;
   39849             :         }
   39850           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   39851           0 :         return 0;
   39852             : }
   39853             : 
   39854           0 : static PyObject *py_netr_DatabaseSync2_in_get_database_id(PyObject *obj, void *closure)
   39855             : {
   39856           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   39857           0 :         PyObject *py_database_id;
   39858           0 :         py_database_id = PyLong_FromUnsignedLongLong((uint32_t)(object->in.database_id));
   39859           0 :         return py_database_id;
   39860             : }
   39861             : 
   39862           0 : static int py_netr_DatabaseSync2_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
   39863             : {
   39864           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   39865           0 :         if (value == NULL) {
   39866           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.database_id");
   39867           0 :                 return -1;
   39868             :         }
   39869             :         {
   39870           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
   39871           0 :                 if (PyLong_Check(value)) {
   39872           0 :                         unsigned long long test_var;
   39873           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39874           0 :                         if (PyErr_Occurred() != NULL) {
   39875           0 :                                 return -1;
   39876             :                         }
   39877           0 :                         if (test_var > uint_max) {
   39878           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39879             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39880           0 :                                 return -1;
   39881             :                         }
   39882           0 :                         object->in.database_id = test_var;
   39883             :                 } else {
   39884           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39885             :                           PyLong_Type.tp_name);
   39886           0 :                         return -1;
   39887             :                 }
   39888             :         }
   39889           0 :         return 0;
   39890             : }
   39891             : 
   39892           0 : static PyObject *py_netr_DatabaseSync2_in_get_restart_state(PyObject *obj, void *closure)
   39893             : {
   39894           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   39895           0 :         PyObject *py_restart_state;
   39896           0 :         py_restart_state = PyLong_FromLong((uint16_t)(object->in.restart_state));
   39897           0 :         return py_restart_state;
   39898             : }
   39899             : 
   39900           0 : static int py_netr_DatabaseSync2_in_set_restart_state(PyObject *py_obj, PyObject *value, void *closure)
   39901             : {
   39902           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   39903           0 :         if (value == NULL) {
   39904           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.restart_state");
   39905           0 :                 return -1;
   39906             :         }
   39907             :         {
   39908           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.restart_state));
   39909           0 :                 if (PyLong_Check(value)) {
   39910           0 :                         unsigned long long test_var;
   39911           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39912           0 :                         if (PyErr_Occurred() != NULL) {
   39913           0 :                                 return -1;
   39914             :                         }
   39915           0 :                         if (test_var > uint_max) {
   39916           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39917             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39918           0 :                                 return -1;
   39919             :                         }
   39920           0 :                         object->in.restart_state = test_var;
   39921             :                 } else {
   39922           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39923             :                           PyLong_Type.tp_name);
   39924           0 :                         return -1;
   39925             :                 }
   39926             :         }
   39927           0 :         return 0;
   39928             : }
   39929             : 
   39930           0 : static PyObject *py_netr_DatabaseSync2_in_get_sync_context(PyObject *obj, void *closure)
   39931             : {
   39932           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   39933           0 :         PyObject *py_sync_context;
   39934           0 :         if (object->in.sync_context == NULL) {
   39935           0 :                 Py_RETURN_NONE;
   39936             :         }
   39937           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.sync_context));
   39938           0 :         return py_sync_context;
   39939             : }
   39940             : 
   39941           0 : static int py_netr_DatabaseSync2_in_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   39942             : {
   39943           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   39944           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sync_context));
   39945           0 :         if (value == NULL) {
   39946           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sync_context");
   39947           0 :                 return -1;
   39948             :         }
   39949           0 :         object->in.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sync_context);
   39950           0 :         if (object->in.sync_context == NULL) {
   39951           0 :                 PyErr_NoMemory();
   39952           0 :                 return -1;
   39953             :         }
   39954             :         {
   39955           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sync_context));
   39956           0 :                 if (PyLong_Check(value)) {
   39957           0 :                         unsigned long long test_var;
   39958           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39959           0 :                         if (PyErr_Occurred() != NULL) {
   39960           0 :                                 return -1;
   39961             :                         }
   39962           0 :                         if (test_var > uint_max) {
   39963           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39964             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39965           0 :                                 return -1;
   39966             :                         }
   39967           0 :                         *object->in.sync_context = test_var;
   39968             :                 } else {
   39969           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39970             :                           PyLong_Type.tp_name);
   39971           0 :                         return -1;
   39972             :                 }
   39973             :         }
   39974           0 :         return 0;
   39975             : }
   39976             : 
   39977           0 : static PyObject *py_netr_DatabaseSync2_out_get_sync_context(PyObject *obj, void *closure)
   39978             : {
   39979           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   39980           0 :         PyObject *py_sync_context;
   39981           0 :         if (object->out.sync_context == NULL) {
   39982           0 :                 Py_RETURN_NONE;
   39983             :         }
   39984           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.sync_context));
   39985           0 :         return py_sync_context;
   39986             : }
   39987             : 
   39988           0 : static int py_netr_DatabaseSync2_out_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   39989             : {
   39990           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   39991           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sync_context));
   39992           0 :         if (value == NULL) {
   39993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.sync_context");
   39994           0 :                 return -1;
   39995             :         }
   39996           0 :         object->out.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sync_context);
   39997           0 :         if (object->out.sync_context == NULL) {
   39998           0 :                 PyErr_NoMemory();
   39999           0 :                 return -1;
   40000             :         }
   40001             :         {
   40002           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sync_context));
   40003           0 :                 if (PyLong_Check(value)) {
   40004           0 :                         unsigned long long test_var;
   40005           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40006           0 :                         if (PyErr_Occurred() != NULL) {
   40007           0 :                                 return -1;
   40008             :                         }
   40009           0 :                         if (test_var > uint_max) {
   40010           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40011             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40012           0 :                                 return -1;
   40013             :                         }
   40014           0 :                         *object->out.sync_context = test_var;
   40015             :                 } else {
   40016           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40017             :                           PyLong_Type.tp_name);
   40018           0 :                         return -1;
   40019             :                 }
   40020             :         }
   40021           0 :         return 0;
   40022             : }
   40023             : 
   40024           0 : static PyObject *py_netr_DatabaseSync2_out_get_delta_enum_array(PyObject *obj, void *closure)
   40025             : {
   40026           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   40027           0 :         PyObject *py_delta_enum_array;
   40028           0 :         if (object->out.delta_enum_array == NULL) {
   40029           0 :                 Py_RETURN_NONE;
   40030             :         }
   40031           0 :         if (*object->out.delta_enum_array == NULL) {
   40032           0 :                 py_delta_enum_array = Py_None;
   40033           0 :                 Py_INCREF(py_delta_enum_array);
   40034             :         } else {
   40035           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   40036             :         }
   40037           0 :         return py_delta_enum_array;
   40038             : }
   40039             : 
   40040           0 : static int py_netr_DatabaseSync2_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   40041             : {
   40042           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   40043           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   40044           0 :         if (value == NULL) {
   40045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.delta_enum_array");
   40046           0 :                 return -1;
   40047             :         }
   40048           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   40049           0 :         if (object->out.delta_enum_array == NULL) {
   40050           0 :                 PyErr_NoMemory();
   40051           0 :                 return -1;
   40052             :         }
   40053           0 :         if (value == Py_None) {
   40054           0 :                 *object->out.delta_enum_array = NULL;
   40055             :         } else {
   40056           0 :                 *object->out.delta_enum_array = NULL;
   40057           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   40058           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40059           0 :                         PyErr_NoMemory();
   40060           0 :                         return -1;
   40061             :                 }
   40062           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   40063             :         }
   40064           0 :         return 0;
   40065             : }
   40066             : 
   40067           0 : static PyObject *py_netr_DatabaseSync2_in_get_preferredmaximumlength(PyObject *obj, void *closure)
   40068             : {
   40069           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   40070           0 :         PyObject *py_preferredmaximumlength;
   40071           0 :         py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)(object->in.preferredmaximumlength));
   40072           0 :         return py_preferredmaximumlength;
   40073             : }
   40074             : 
   40075           0 : static int py_netr_DatabaseSync2_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
   40076             : {
   40077           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   40078           0 :         if (value == NULL) {
   40079           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.preferredmaximumlength");
   40080           0 :                 return -1;
   40081             :         }
   40082             :         {
   40083           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
   40084           0 :                 if (PyLong_Check(value)) {
   40085           0 :                         unsigned long long test_var;
   40086           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40087           0 :                         if (PyErr_Occurred() != NULL) {
   40088           0 :                                 return -1;
   40089             :                         }
   40090           0 :                         if (test_var > uint_max) {
   40091           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40092             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40093           0 :                                 return -1;
   40094             :                         }
   40095           0 :                         object->in.preferredmaximumlength = test_var;
   40096             :                 } else {
   40097           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40098             :                           PyLong_Type.tp_name);
   40099           0 :                         return -1;
   40100             :                 }
   40101             :         }
   40102           0 :         return 0;
   40103             : }
   40104             : 
   40105           0 : static PyObject *py_netr_DatabaseSync2_get_result(PyObject *obj, void *closure)
   40106             : {
   40107           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
   40108           0 :         PyObject *py_result;
   40109           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   40110           0 :         return py_result;
   40111             : }
   40112             : 
   40113           0 : static int py_netr_DatabaseSync2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   40114             : {
   40115           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   40116           0 :         if (value == NULL) {
   40117           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   40118           0 :                 return -1;
   40119             :         }
   40120           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   40121           0 :         return 0;
   40122             : }
   40123             : 
   40124             : static PyGetSetDef py_netr_DatabaseSync2_getsetters[] = {
   40125             :         {
   40126             :                 .name = discard_const_p(char, "in_logon_server"),
   40127             :                 .get = py_netr_DatabaseSync2_in_get_logon_server,
   40128             :                 .set = py_netr_DatabaseSync2_in_set_logon_server,
   40129             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   40130             :         },
   40131             :         {
   40132             :                 .name = discard_const_p(char, "in_computername"),
   40133             :                 .get = py_netr_DatabaseSync2_in_get_computername,
   40134             :                 .set = py_netr_DatabaseSync2_in_set_computername,
   40135             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   40136             :         },
   40137             :         {
   40138             :                 .name = discard_const_p(char, "in_credential"),
   40139             :                 .get = py_netr_DatabaseSync2_in_get_credential,
   40140             :                 .set = py_netr_DatabaseSync2_in_set_credential,
   40141             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   40142             :         },
   40143             :         {
   40144             :                 .name = discard_const_p(char, "in_return_authenticator"),
   40145             :                 .get = py_netr_DatabaseSync2_in_get_return_authenticator,
   40146             :                 .set = py_netr_DatabaseSync2_in_set_return_authenticator,
   40147             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   40148             :         },
   40149             :         {
   40150             :                 .name = discard_const_p(char, "out_return_authenticator"),
   40151             :                 .get = py_netr_DatabaseSync2_out_get_return_authenticator,
   40152             :                 .set = py_netr_DatabaseSync2_out_set_return_authenticator,
   40153             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   40154             :         },
   40155             :         {
   40156             :                 .name = discard_const_p(char, "in_database_id"),
   40157             :                 .get = py_netr_DatabaseSync2_in_get_database_id,
   40158             :                 .set = py_netr_DatabaseSync2_in_set_database_id,
   40159             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
   40160             :         },
   40161             :         {
   40162             :                 .name = discard_const_p(char, "in_restart_state"),
   40163             :                 .get = py_netr_DatabaseSync2_in_get_restart_state,
   40164             :                 .set = py_netr_DatabaseSync2_in_set_restart_state,
   40165             :                 .doc = discard_const_p(char, "PIDL-generated element of base type SyncStateEnum")
   40166             :         },
   40167             :         {
   40168             :                 .name = discard_const_p(char, "in_sync_context"),
   40169             :                 .get = py_netr_DatabaseSync2_in_get_sync_context,
   40170             :                 .set = py_netr_DatabaseSync2_in_set_sync_context,
   40171             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40172             :         },
   40173             :         {
   40174             :                 .name = discard_const_p(char, "out_sync_context"),
   40175             :                 .get = py_netr_DatabaseSync2_out_get_sync_context,
   40176             :                 .set = py_netr_DatabaseSync2_out_set_sync_context,
   40177             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40178             :         },
   40179             :         {
   40180             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   40181             :                 .get = py_netr_DatabaseSync2_out_get_delta_enum_array,
   40182             :                 .set = py_netr_DatabaseSync2_out_set_delta_enum_array,
   40183             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   40184             :         },
   40185             :         {
   40186             :                 .name = discard_const_p(char, "in_preferredmaximumlength"),
   40187             :                 .get = py_netr_DatabaseSync2_in_get_preferredmaximumlength,
   40188             :                 .set = py_netr_DatabaseSync2_in_set_preferredmaximumlength,
   40189             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40190             :         },
   40191             :         {
   40192             :                 .name = discard_const_p(char, "result"),
   40193             :                 .get = py_netr_DatabaseSync2_get_result,
   40194             :                 .set = py_netr_DatabaseSync2_set_result,
   40195             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   40196             :         },
   40197             :         { .name = NULL }
   40198             : };
   40199             : 
   40200           0 : static PyObject *py_netr_DatabaseSync2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   40201             : {
   40202           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseSync2, type);
   40203           0 :         struct netr_DatabaseSync2 *_self = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(self);
   40204           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   40205           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   40206           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   40207           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   40208           0 :         _self->in.sync_context = talloc_zero(mem_ctx, uint32_t);
   40209           0 :         _self->out.sync_context = talloc_zero(mem_ctx, uint32_t);
   40210             :         /* a pointer to a NULL pointer */
   40211           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   40212           0 :         return self;
   40213             : }
   40214             : 
   40215           0 : static PyObject *py_netr_DatabaseSync2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   40216             : {
   40217             : 
   40218             : 
   40219           0 :         return PyLong_FromLong(16);
   40220             : }
   40221             : 
   40222           0 : static PyObject *py_netr_DatabaseSync2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   40223             : {
   40224           0 :         const struct ndr_interface_call *call = NULL;
   40225           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   40226           0 :         PyObject *ret = NULL;
   40227           0 :         struct ndr_push *push = NULL;
   40228           0 :         DATA_BLOB blob;
   40229           0 :         enum ndr_err_code err;
   40230             : 
   40231           0 :         if (ndr_table_netlogon.num_calls < 17) {
   40232           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_pack");
   40233           0 :                 return NULL;
   40234             :         }
   40235           0 :         call = &ndr_table_netlogon.calls[16];
   40236             : 
   40237           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   40238           0 :         if (push == NULL) {
   40239           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40240           0 :                 return NULL;
   40241             :         }
   40242             : 
   40243           0 :         push->flags |= ndr_push_flags;
   40244             : 
   40245           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   40246           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40247           0 :                 TALLOC_FREE(push);
   40248           0 :                 PyErr_SetNdrError(err);
   40249           0 :                 return NULL;
   40250             :         }
   40251           0 :         blob = ndr_push_blob(push);
   40252           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   40253           0 :         TALLOC_FREE(push);
   40254           0 :         return ret;
   40255             : }
   40256             : 
   40257           0 : static PyObject *py_netr_DatabaseSync2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40258             : {
   40259           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40260           0 :         PyObject *bigendian_obj = NULL;
   40261           0 :         PyObject *ndr64_obj = NULL;
   40262           0 :         libndr_flags ndr_push_flags = 0;
   40263             : 
   40264           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   40265             :                 discard_const_p(char *, kwnames),
   40266             :                 &bigendian_obj,
   40267             :                 &ndr64_obj)) {
   40268           0 :                 return NULL;
   40269             :         }
   40270             : 
   40271           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40272           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40273             :         }
   40274           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40275           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40276             :         }
   40277             : 
   40278           0 :         return py_netr_DatabaseSync2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   40279             : }
   40280             : 
   40281           0 : static PyObject *py_netr_DatabaseSync2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40282             : {
   40283           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40284           0 :         PyObject *bigendian_obj = NULL;
   40285           0 :         PyObject *ndr64_obj = NULL;
   40286           0 :         libndr_flags ndr_push_flags = 0;
   40287             : 
   40288           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   40289             :                 discard_const_p(char *, kwnames),
   40290             :                 &bigendian_obj,
   40291             :                 &ndr64_obj)) {
   40292           0 :                 return NULL;
   40293             :         }
   40294             : 
   40295           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40296           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40297             :         }
   40298           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40299           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40300             :         }
   40301             : 
   40302           0 :         return py_netr_DatabaseSync2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   40303             : }
   40304             : 
   40305           0 : static PyObject *py_netr_DatabaseSync2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   40306             : {
   40307           0 :         const struct ndr_interface_call *call = NULL;
   40308           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   40309           0 :         struct ndr_pull *pull = NULL;
   40310           0 :         enum ndr_err_code err;
   40311             : 
   40312           0 :         if (ndr_table_netlogon.num_calls < 17) {
   40313           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_unpack");
   40314           0 :                 return NULL;
   40315             :         }
   40316           0 :         call = &ndr_table_netlogon.calls[16];
   40317             : 
   40318           0 :         pull = ndr_pull_init_blob(blob, object);
   40319           0 :         if (pull == NULL) {
   40320           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40321           0 :                 return NULL;
   40322             :         }
   40323             : 
   40324           0 :         pull->flags |= ndr_pull_flags;
   40325             : 
   40326           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   40327           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40328           0 :                 TALLOC_FREE(pull);
   40329           0 :                 PyErr_SetNdrError(err);
   40330           0 :                 return NULL;
   40331             :         }
   40332           0 :         if (!allow_remaining) {
   40333           0 :                 uint32_t highest_ofs;
   40334             : 
   40335           0 :                 if (pull->offset > pull->relative_highest_offset) {
   40336           0 :                         highest_ofs = pull->offset;
   40337             :                 } else {
   40338           0 :                         highest_ofs = pull->relative_highest_offset;
   40339             :                 }
   40340           0 :                 if (highest_ofs < pull->data_size) {
   40341           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   40342             :                                 "not all bytes consumed ofs[%u] size[%u]",
   40343             :                                 highest_ofs, pull->data_size);
   40344           0 :                         TALLOC_FREE(pull);
   40345           0 :                         PyErr_SetNdrError(err);
   40346           0 :                         return NULL;
   40347             :                 }
   40348             :         }
   40349             : 
   40350           0 :         TALLOC_FREE(pull);
   40351           0 :         Py_RETURN_NONE;
   40352             : }
   40353             : 
   40354           0 : static PyObject *py_netr_DatabaseSync2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40355             : {
   40356           0 :         DATA_BLOB blob;
   40357           0 :         Py_ssize_t blob_length = 0;
   40358           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40359           0 :         PyObject *bigendian_obj = NULL;
   40360           0 :         PyObject *ndr64_obj = NULL;
   40361           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40362           0 :         PyObject *allow_remaining_obj = NULL;
   40363           0 :         bool allow_remaining = false;
   40364             : 
   40365           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   40366             :                 discard_const_p(char *, kwnames),
   40367             :                 &blob.data, &blob_length,
   40368             :                 &bigendian_obj,
   40369             :                 &ndr64_obj,
   40370             :                 &allow_remaining_obj)) {
   40371           0 :                 return NULL;
   40372             :         }
   40373           0 :         blob.length = blob_length;
   40374             : 
   40375           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40376           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40377             :         }
   40378           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40379           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40380             :         }
   40381             : 
   40382           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40383           0 :                 allow_remaining = true;
   40384             :         }
   40385             : 
   40386           0 :         return py_netr_DatabaseSync2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   40387             : }
   40388             : 
   40389           0 : static PyObject *py_netr_DatabaseSync2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40390             : {
   40391           0 :         DATA_BLOB blob;
   40392           0 :         Py_ssize_t blob_length = 0;
   40393           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40394           0 :         PyObject *bigendian_obj = NULL;
   40395           0 :         PyObject *ndr64_obj = NULL;
   40396           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40397           0 :         PyObject *allow_remaining_obj = NULL;
   40398           0 :         bool allow_remaining = false;
   40399             : 
   40400           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   40401             :                 discard_const_p(char *, kwnames),
   40402             :                 &blob.data, &blob_length,
   40403             :                 &bigendian_obj,
   40404             :                 &ndr64_obj,
   40405             :                 &allow_remaining_obj)) {
   40406           0 :                 return NULL;
   40407             :         }
   40408           0 :         blob.length = blob_length;
   40409             : 
   40410           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40411           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40412             :         }
   40413           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40414           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40415             :         }
   40416             : 
   40417           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40418           0 :                 allow_remaining = true;
   40419             :         }
   40420             : 
   40421           0 :         return py_netr_DatabaseSync2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   40422             : }
   40423             : 
   40424           0 : static PyObject *py_netr_DatabaseSync2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   40425             : {
   40426           0 :         const struct ndr_interface_call *call = NULL;
   40427           0 :         struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
   40428           0 :         PyObject *ret;
   40429           0 :         char *retstr;
   40430             : 
   40431           0 :         if (ndr_table_netlogon.num_calls < 17) {
   40432           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_print");
   40433           0 :                 return NULL;
   40434             :         }
   40435           0 :         call = &ndr_table_netlogon.calls[16];
   40436             : 
   40437           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   40438           0 :         ret = PyUnicode_FromString(retstr);
   40439           0 :         TALLOC_FREE(retstr);
   40440             : 
   40441           0 :         return ret;
   40442             : }
   40443             : 
   40444           0 : static PyObject *py_netr_DatabaseSync2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40445             : {
   40446           0 :         return py_netr_DatabaseSync2_ndr_print(py_obj, "netr_DatabaseSync2_in", NDR_IN);
   40447             : }
   40448             : 
   40449           0 : static PyObject *py_netr_DatabaseSync2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40450             : {
   40451           0 :         return py_netr_DatabaseSync2_ndr_print(py_obj, "netr_DatabaseSync2_out", NDR_OUT);
   40452             : }
   40453             : 
   40454             : static PyMethodDef py_netr_DatabaseSync2_methods[] = {
   40455             :         { "opnum", (PyCFunction)py_netr_DatabaseSync2_ndr_opnum, METH_NOARGS|METH_CLASS,
   40456             :                 "netlogon.netr_DatabaseSync2.opnum() -> 16 (0x10) " },
   40457             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   40458             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   40459             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   40460             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   40461             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   40462             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   40463             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   40464             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   40465             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseSync2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   40466             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseSync2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   40467             :         { NULL, NULL, 0, NULL }
   40468             : };
   40469             : 
   40470             : 
   40471             : static PyTypeObject netr_DatabaseSync2_Type = {
   40472             :         PyVarObject_HEAD_INIT(NULL, 0)
   40473             :         .tp_name = "netlogon.netr_DatabaseSync2",
   40474             :         .tp_getset = py_netr_DatabaseSync2_getsetters,
   40475             :         .tp_methods = py_netr_DatabaseSync2_methods,
   40476             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   40477             :         .tp_new = py_netr_DatabaseSync2_new,
   40478             : };
   40479             : 
   40480           0 : static bool pack_py_netr_DatabaseSync2_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseSync2 *r)
   40481             : {
   40482           0 :         PyObject *py_logon_server;
   40483           0 :         PyObject *py_computername;
   40484           0 :         PyObject *py_credential;
   40485           0 :         PyObject *py_return_authenticator;
   40486           0 :         PyObject *py_database_id;
   40487           0 :         PyObject *py_restart_state;
   40488           0 :         PyObject *py_sync_context;
   40489           0 :         PyObject *py_preferredmaximumlength;
   40490           0 :         const char *kwnames[] = {
   40491             :                 "logon_server", "computername", "credential", "return_authenticator", "database_id", "restart_state", "sync_context", "preferredmaximumlength", NULL
   40492             :         };
   40493             : 
   40494           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)) {
   40495           0 :                 return false;
   40496             :         }
   40497             : 
   40498           0 :         if (py_logon_server == NULL) {
   40499           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   40500           0 :                 return false;
   40501             :         }
   40502           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   40503           0 :         if (r->in.logon_server == NULL) {
   40504           0 :                 PyErr_NoMemory();
   40505           0 :                 return false;
   40506             :         }
   40507             :         {
   40508           0 :                 const char *test_str;
   40509           0 :                 const char *talloc_str;
   40510           0 :                 PyObject *unicode = NULL;
   40511           0 :                 if (PyUnicode_Check(py_logon_server)) {
   40512           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   40513           0 :                         if (unicode == NULL) {
   40514           0 :                                 return false;
   40515             :                         }
   40516           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40517           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   40518           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   40519             :                 } else {
   40520           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   40521           0 :                         return false;
   40522             :                 }
   40523           0 :                 talloc_str = talloc_strdup(r, test_str);
   40524           0 :                 if (unicode != NULL) {
   40525           0 :                         Py_DECREF(unicode);
   40526             :                 }
   40527           0 :                 if (talloc_str == NULL) {
   40528           0 :                         PyErr_NoMemory();
   40529           0 :                         return false;
   40530             :                 }
   40531           0 :                 r->in.logon_server = talloc_str;
   40532             :         }
   40533           0 :         if (py_computername == NULL) {
   40534           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
   40535           0 :                 return false;
   40536             :         }
   40537           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   40538           0 :         if (r->in.computername == NULL) {
   40539           0 :                 PyErr_NoMemory();
   40540           0 :                 return false;
   40541             :         }
   40542             :         {
   40543           0 :                 const char *test_str;
   40544           0 :                 const char *talloc_str;
   40545           0 :                 PyObject *unicode = NULL;
   40546           0 :                 if (PyUnicode_Check(py_computername)) {
   40547           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   40548           0 :                         if (unicode == NULL) {
   40549           0 :                                 return false;
   40550             :                         }
   40551           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40552           0 :                 } else if (PyBytes_Check(py_computername)) {
   40553           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   40554             :                 } else {
   40555           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   40556           0 :                         return false;
   40557             :                 }
   40558           0 :                 talloc_str = talloc_strdup(r, test_str);
   40559           0 :                 if (unicode != NULL) {
   40560           0 :                         Py_DECREF(unicode);
   40561             :                 }
   40562           0 :                 if (talloc_str == NULL) {
   40563           0 :                         PyErr_NoMemory();
   40564           0 :                         return false;
   40565             :                 }
   40566           0 :                 r->in.computername = talloc_str;
   40567             :         }
   40568           0 :         if (py_credential == NULL) {
   40569           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   40570           0 :                 return false;
   40571             :         }
   40572           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   40573           0 :         if (r->in.credential == NULL) {
   40574           0 :                 PyErr_NoMemory();
   40575           0 :                 return false;
   40576             :         }
   40577           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   40578           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   40579           0 :                 PyErr_NoMemory();
   40580           0 :                 return false;
   40581             :         }
   40582           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   40583           0 :         if (py_return_authenticator == NULL) {
   40584           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   40585           0 :                 return false;
   40586             :         }
   40587           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   40588           0 :         if (r->in.return_authenticator == NULL) {
   40589           0 :                 PyErr_NoMemory();
   40590           0 :                 return false;
   40591             :         }
   40592           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   40593           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   40594           0 :                 PyErr_NoMemory();
   40595           0 :                 return false;
   40596             :         }
   40597           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   40598           0 :         if (py_database_id == NULL) {
   40599           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.database_id");
   40600           0 :                 return false;
   40601             :         }
   40602             :         {
   40603           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
   40604           0 :                 if (PyLong_Check(py_database_id)) {
   40605           0 :                         unsigned long long test_var;
   40606           0 :                         test_var = PyLong_AsUnsignedLongLong(py_database_id);
   40607           0 :                         if (PyErr_Occurred() != NULL) {
   40608           0 :                                 return false;
   40609             :                         }
   40610           0 :                         if (test_var > uint_max) {
   40611           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40612             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40613           0 :                                 return false;
   40614             :                         }
   40615           0 :                         r->in.database_id = test_var;
   40616             :                 } else {
   40617           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40618             :                           PyLong_Type.tp_name);
   40619           0 :                         return false;
   40620             :                 }
   40621             :         }
   40622           0 :         if (py_restart_state == NULL) {
   40623           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.restart_state");
   40624           0 :                 return false;
   40625             :         }
   40626             :         {
   40627           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.restart_state));
   40628           0 :                 if (PyLong_Check(py_restart_state)) {
   40629           0 :                         unsigned long long test_var;
   40630           0 :                         test_var = PyLong_AsUnsignedLongLong(py_restart_state);
   40631           0 :                         if (PyErr_Occurred() != NULL) {
   40632           0 :                                 return false;
   40633             :                         }
   40634           0 :                         if (test_var > uint_max) {
   40635           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40636             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40637           0 :                                 return false;
   40638             :                         }
   40639           0 :                         r->in.restart_state = test_var;
   40640             :                 } else {
   40641           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40642             :                           PyLong_Type.tp_name);
   40643           0 :                         return false;
   40644             :                 }
   40645             :         }
   40646           0 :         if (py_sync_context == NULL) {
   40647           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sync_context");
   40648           0 :                 return false;
   40649             :         }
   40650           0 :         r->in.sync_context = talloc_ptrtype(r, r->in.sync_context);
   40651           0 :         if (r->in.sync_context == NULL) {
   40652           0 :                 PyErr_NoMemory();
   40653           0 :                 return false;
   40654             :         }
   40655             :         {
   40656           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sync_context));
   40657           0 :                 if (PyLong_Check(py_sync_context)) {
   40658           0 :                         unsigned long long test_var;
   40659           0 :                         test_var = PyLong_AsUnsignedLongLong(py_sync_context);
   40660           0 :                         if (PyErr_Occurred() != NULL) {
   40661           0 :                                 return false;
   40662             :                         }
   40663           0 :                         if (test_var > uint_max) {
   40664           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40665             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40666           0 :                                 return false;
   40667             :                         }
   40668           0 :                         *r->in.sync_context = test_var;
   40669             :                 } else {
   40670           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40671             :                           PyLong_Type.tp_name);
   40672           0 :                         return false;
   40673             :                 }
   40674             :         }
   40675           0 :         if (py_preferredmaximumlength == NULL) {
   40676           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.preferredmaximumlength");
   40677           0 :                 return false;
   40678             :         }
   40679             :         {
   40680           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
   40681           0 :                 if (PyLong_Check(py_preferredmaximumlength)) {
   40682           0 :                         unsigned long long test_var;
   40683           0 :                         test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
   40684           0 :                         if (PyErr_Occurred() != NULL) {
   40685           0 :                                 return false;
   40686             :                         }
   40687           0 :                         if (test_var > uint_max) {
   40688           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40689             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40690           0 :                                 return false;
   40691             :                         }
   40692           0 :                         r->in.preferredmaximumlength = test_var;
   40693             :                 } else {
   40694           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40695             :                           PyLong_Type.tp_name);
   40696           0 :                         return false;
   40697             :                 }
   40698             :         }
   40699           0 :         return true;
   40700             : }
   40701             : 
   40702           0 : static PyObject *unpack_py_netr_DatabaseSync2_args_out(struct netr_DatabaseSync2 *r)
   40703             : {
   40704           0 :         PyObject *result;
   40705           0 :         PyObject *py_return_authenticator;
   40706           0 :         PyObject *py_sync_context;
   40707           0 :         PyObject *py_delta_enum_array;
   40708           0 :         result = PyTuple_New(3);
   40709           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   40710           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   40711           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.sync_context));
   40712           0 :         PyTuple_SetItem(result, 1, py_sync_context);
   40713           0 :         if (*r->out.delta_enum_array == NULL) {
   40714           0 :                 py_delta_enum_array = Py_None;
   40715           0 :                 Py_INCREF(py_delta_enum_array);
   40716             :         } else {
   40717           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   40718             :         }
   40719           0 :         PyTuple_SetItem(result, 2, py_delta_enum_array);
   40720           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   40721           0 :                 PyErr_SetNTSTATUS(r->out.result);
   40722           0 :                 return NULL;
   40723             :         }
   40724             : 
   40725           0 :         return result;
   40726             : }
   40727             : 
   40728             : 
   40729           0 : static PyObject *py_netr_DatabaseRedo_in_get_logon_server(PyObject *obj, void *closure)
   40730             : {
   40731           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
   40732           0 :         PyObject *py_logon_server;
   40733           0 :         if (object->in.logon_server == NULL) {
   40734           0 :                 Py_RETURN_NONE;
   40735             :         }
   40736           0 :         if (object->in.logon_server == NULL) {
   40737           0 :                 py_logon_server = Py_None;
   40738           0 :                 Py_INCREF(py_logon_server);
   40739             :         } else {
   40740           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   40741             :         }
   40742           0 :         return py_logon_server;
   40743             : }
   40744             : 
   40745           0 : static int py_netr_DatabaseRedo_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   40746             : {
   40747           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   40748           0 :         if (value == NULL) {
   40749           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   40750           0 :                 return -1;
   40751             :         }
   40752           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   40753           0 :         if (object->in.logon_server == NULL) {
   40754           0 :                 PyErr_NoMemory();
   40755           0 :                 return -1;
   40756             :         }
   40757             :         {
   40758           0 :                 const char *test_str;
   40759           0 :                 const char *talloc_str;
   40760           0 :                 PyObject *unicode = NULL;
   40761           0 :                 if (PyUnicode_Check(value)) {
   40762           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   40763           0 :                         if (unicode == NULL) {
   40764           0 :                                 return -1;
   40765             :                         }
   40766           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40767           0 :                 } else if (PyBytes_Check(value)) {
   40768           0 :                         test_str = PyBytes_AS_STRING(value);
   40769             :                 } else {
   40770           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   40771           0 :                         return -1;
   40772             :                 }
   40773           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   40774           0 :                 if (unicode != NULL) {
   40775           0 :                         Py_DECREF(unicode);
   40776             :                 }
   40777           0 :                 if (talloc_str == NULL) {
   40778           0 :                         PyErr_NoMemory();
   40779           0 :                         return -1;
   40780             :                 }
   40781           0 :                 object->in.logon_server = talloc_str;
   40782             :         }
   40783           0 :         return 0;
   40784             : }
   40785             : 
   40786           0 : static PyObject *py_netr_DatabaseRedo_in_get_computername(PyObject *obj, void *closure)
   40787             : {
   40788           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
   40789           0 :         PyObject *py_computername;
   40790           0 :         if (object->in.computername == NULL) {
   40791           0 :                 Py_RETURN_NONE;
   40792             :         }
   40793           0 :         if (object->in.computername == NULL) {
   40794           0 :                 py_computername = Py_None;
   40795           0 :                 Py_INCREF(py_computername);
   40796             :         } else {
   40797           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   40798             :         }
   40799           0 :         return py_computername;
   40800             : }
   40801             : 
   40802           0 : static int py_netr_DatabaseRedo_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   40803             : {
   40804           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   40805           0 :         if (value == NULL) {
   40806           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
   40807           0 :                 return -1;
   40808             :         }
   40809           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   40810           0 :         if (object->in.computername == NULL) {
   40811           0 :                 PyErr_NoMemory();
   40812           0 :                 return -1;
   40813             :         }
   40814             :         {
   40815           0 :                 const char *test_str;
   40816           0 :                 const char *talloc_str;
   40817           0 :                 PyObject *unicode = NULL;
   40818           0 :                 if (PyUnicode_Check(value)) {
   40819           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   40820           0 :                         if (unicode == NULL) {
   40821           0 :                                 return -1;
   40822             :                         }
   40823           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40824           0 :                 } else if (PyBytes_Check(value)) {
   40825           0 :                         test_str = PyBytes_AS_STRING(value);
   40826             :                 } else {
   40827           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   40828           0 :                         return -1;
   40829             :                 }
   40830           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   40831           0 :                 if (unicode != NULL) {
   40832           0 :                         Py_DECREF(unicode);
   40833             :                 }
   40834           0 :                 if (talloc_str == NULL) {
   40835           0 :                         PyErr_NoMemory();
   40836           0 :                         return -1;
   40837             :                 }
   40838           0 :                 object->in.computername = talloc_str;
   40839             :         }
   40840           0 :         return 0;
   40841             : }
   40842             : 
   40843           0 : static PyObject *py_netr_DatabaseRedo_in_get_credential(PyObject *obj, void *closure)
   40844             : {
   40845           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
   40846           0 :         PyObject *py_credential;
   40847           0 :         if (object->in.credential == NULL) {
   40848           0 :                 Py_RETURN_NONE;
   40849             :         }
   40850           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   40851           0 :         return py_credential;
   40852             : }
   40853             : 
   40854           0 : static int py_netr_DatabaseRedo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   40855             : {
   40856           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   40857           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   40858           0 :         if (value == NULL) {
   40859           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   40860           0 :                 return -1;
   40861             :         }
   40862           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   40863           0 :         if (object->in.credential == NULL) {
   40864           0 :                 PyErr_NoMemory();
   40865           0 :                 return -1;
   40866             :         }
   40867           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   40868           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40869           0 :                 PyErr_NoMemory();
   40870           0 :                 return -1;
   40871             :         }
   40872           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   40873           0 :         return 0;
   40874             : }
   40875             : 
   40876           0 : static PyObject *py_netr_DatabaseRedo_in_get_return_authenticator(PyObject *obj, void *closure)
   40877             : {
   40878           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
   40879           0 :         PyObject *py_return_authenticator;
   40880           0 :         if (object->in.return_authenticator == NULL) {
   40881           0 :                 Py_RETURN_NONE;
   40882             :         }
   40883           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   40884           0 :         return py_return_authenticator;
   40885             : }
   40886             : 
   40887           0 : static int py_netr_DatabaseRedo_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   40888             : {
   40889           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   40890           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   40891           0 :         if (value == NULL) {
   40892           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   40893           0 :                 return -1;
   40894             :         }
   40895           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   40896           0 :         if (object->in.return_authenticator == NULL) {
   40897           0 :                 PyErr_NoMemory();
   40898           0 :                 return -1;
   40899             :         }
   40900           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   40901           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40902           0 :                 PyErr_NoMemory();
   40903           0 :                 return -1;
   40904             :         }
   40905           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   40906           0 :         return 0;
   40907             : }
   40908             : 
   40909           0 : static PyObject *py_netr_DatabaseRedo_out_get_return_authenticator(PyObject *obj, void *closure)
   40910             : {
   40911           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
   40912           0 :         PyObject *py_return_authenticator;
   40913           0 :         if (object->out.return_authenticator == NULL) {
   40914           0 :                 Py_RETURN_NONE;
   40915             :         }
   40916           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   40917           0 :         return py_return_authenticator;
   40918             : }
   40919             : 
   40920           0 : static int py_netr_DatabaseRedo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   40921             : {
   40922           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   40923           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   40924           0 :         if (value == NULL) {
   40925           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   40926           0 :                 return -1;
   40927             :         }
   40928           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   40929           0 :         if (object->out.return_authenticator == NULL) {
   40930           0 :                 PyErr_NoMemory();
   40931           0 :                 return -1;
   40932             :         }
   40933           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   40934           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40935           0 :                 PyErr_NoMemory();
   40936           0 :                 return -1;
   40937             :         }
   40938           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   40939           0 :         return 0;
   40940             : }
   40941             : 
   40942           0 : static PyObject *py_netr_DatabaseRedo_in_get_change_log_entry(PyObject *obj, void *closure)
   40943             : {
   40944           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
   40945           0 :         PyObject *py_change_log_entry;
   40946           0 :         py_change_log_entry = pytalloc_reference_ex(&netr_ChangeLogEntry_Type, pytalloc_get_mem_ctx(obj), &object->in.change_log_entry);
   40947           0 :         return py_change_log_entry;
   40948             : }
   40949             : 
   40950           0 : static int py_netr_DatabaseRedo_in_set_change_log_entry(PyObject *py_obj, PyObject *value, void *closure)
   40951             : {
   40952           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   40953           0 :         if (value == NULL) {
   40954           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.change_log_entry");
   40955           0 :                 return -1;
   40956             :         }
   40957           0 :         PY_CHECK_TYPE(&netr_ChangeLogEntry_Type, value, return -1;);
   40958           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40959           0 :                 PyErr_NoMemory();
   40960           0 :                 return -1;
   40961             :         }
   40962           0 :         object->in.change_log_entry = *(struct netr_ChangeLogEntry *)pytalloc_get_ptr(value);
   40963           0 :         return 0;
   40964             : }
   40965             : 
   40966           0 : static PyObject *py_netr_DatabaseRedo_in_get_change_log_entry_size(PyObject *obj, void *closure)
   40967             : {
   40968           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
   40969           0 :         PyObject *py_change_log_entry_size;
   40970           0 :         py_change_log_entry_size = PyLong_FromUnsignedLongLong((uint32_t)(object->in.change_log_entry_size));
   40971           0 :         return py_change_log_entry_size;
   40972             : }
   40973             : 
   40974           0 : static int py_netr_DatabaseRedo_in_set_change_log_entry_size(PyObject *py_obj, PyObject *value, void *closure)
   40975             : {
   40976           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   40977           0 :         if (value == NULL) {
   40978           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.change_log_entry_size");
   40979           0 :                 return -1;
   40980             :         }
   40981             :         {
   40982           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.change_log_entry_size));
   40983           0 :                 if (PyLong_Check(value)) {
   40984           0 :                         unsigned long long test_var;
   40985           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40986           0 :                         if (PyErr_Occurred() != NULL) {
   40987           0 :                                 return -1;
   40988             :                         }
   40989           0 :                         if (test_var > uint_max) {
   40990           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40991             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40992           0 :                                 return -1;
   40993             :                         }
   40994           0 :                         object->in.change_log_entry_size = test_var;
   40995             :                 } else {
   40996           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40997             :                           PyLong_Type.tp_name);
   40998           0 :                         return -1;
   40999             :                 }
   41000             :         }
   41001           0 :         return 0;
   41002             : }
   41003             : 
   41004           0 : static PyObject *py_netr_DatabaseRedo_out_get_delta_enum_array(PyObject *obj, void *closure)
   41005             : {
   41006           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
   41007           0 :         PyObject *py_delta_enum_array;
   41008           0 :         if (object->out.delta_enum_array == NULL) {
   41009           0 :                 Py_RETURN_NONE;
   41010             :         }
   41011           0 :         if (*object->out.delta_enum_array == NULL) {
   41012           0 :                 py_delta_enum_array = Py_None;
   41013           0 :                 Py_INCREF(py_delta_enum_array);
   41014             :         } else {
   41015           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   41016             :         }
   41017           0 :         return py_delta_enum_array;
   41018             : }
   41019             : 
   41020           0 : static int py_netr_DatabaseRedo_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   41021             : {
   41022           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   41023           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   41024           0 :         if (value == NULL) {
   41025           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.delta_enum_array");
   41026           0 :                 return -1;
   41027             :         }
   41028           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   41029           0 :         if (object->out.delta_enum_array == NULL) {
   41030           0 :                 PyErr_NoMemory();
   41031           0 :                 return -1;
   41032             :         }
   41033           0 :         if (value == Py_None) {
   41034           0 :                 *object->out.delta_enum_array = NULL;
   41035             :         } else {
   41036           0 :                 *object->out.delta_enum_array = NULL;
   41037           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   41038           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41039           0 :                         PyErr_NoMemory();
   41040           0 :                         return -1;
   41041             :                 }
   41042           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   41043             :         }
   41044           0 :         return 0;
   41045             : }
   41046             : 
   41047           0 : static PyObject *py_netr_DatabaseRedo_get_result(PyObject *obj, void *closure)
   41048             : {
   41049           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
   41050           0 :         PyObject *py_result;
   41051           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   41052           0 :         return py_result;
   41053             : }
   41054             : 
   41055           0 : static int py_netr_DatabaseRedo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41056             : {
   41057           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   41058           0 :         if (value == NULL) {
   41059           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   41060           0 :                 return -1;
   41061             :         }
   41062           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   41063           0 :         return 0;
   41064             : }
   41065             : 
   41066             : static PyGetSetDef py_netr_DatabaseRedo_getsetters[] = {
   41067             :         {
   41068             :                 .name = discard_const_p(char, "in_logon_server"),
   41069             :                 .get = py_netr_DatabaseRedo_in_get_logon_server,
   41070             :                 .set = py_netr_DatabaseRedo_in_set_logon_server,
   41071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41072             :         },
   41073             :         {
   41074             :                 .name = discard_const_p(char, "in_computername"),
   41075             :                 .get = py_netr_DatabaseRedo_in_get_computername,
   41076             :                 .set = py_netr_DatabaseRedo_in_set_computername,
   41077             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41078             :         },
   41079             :         {
   41080             :                 .name = discard_const_p(char, "in_credential"),
   41081             :                 .get = py_netr_DatabaseRedo_in_get_credential,
   41082             :                 .set = py_netr_DatabaseRedo_in_set_credential,
   41083             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   41084             :         },
   41085             :         {
   41086             :                 .name = discard_const_p(char, "in_return_authenticator"),
   41087             :                 .get = py_netr_DatabaseRedo_in_get_return_authenticator,
   41088             :                 .set = py_netr_DatabaseRedo_in_set_return_authenticator,
   41089             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   41090             :         },
   41091             :         {
   41092             :                 .name = discard_const_p(char, "out_return_authenticator"),
   41093             :                 .get = py_netr_DatabaseRedo_out_get_return_authenticator,
   41094             :                 .set = py_netr_DatabaseRedo_out_set_return_authenticator,
   41095             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   41096             :         },
   41097             :         {
   41098             :                 .name = discard_const_p(char, "in_change_log_entry"),
   41099             :                 .get = py_netr_DatabaseRedo_in_get_change_log_entry,
   41100             :                 .set = py_netr_DatabaseRedo_in_set_change_log_entry,
   41101             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogEntry")
   41102             :         },
   41103             :         {
   41104             :                 .name = discard_const_p(char, "in_change_log_entry_size"),
   41105             :                 .get = py_netr_DatabaseRedo_in_get_change_log_entry_size,
   41106             :                 .set = py_netr_DatabaseRedo_in_set_change_log_entry_size,
   41107             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41108             :         },
   41109             :         {
   41110             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   41111             :                 .get = py_netr_DatabaseRedo_out_get_delta_enum_array,
   41112             :                 .set = py_netr_DatabaseRedo_out_set_delta_enum_array,
   41113             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   41114             :         },
   41115             :         {
   41116             :                 .name = discard_const_p(char, "result"),
   41117             :                 .get = py_netr_DatabaseRedo_get_result,
   41118             :                 .set = py_netr_DatabaseRedo_set_result,
   41119             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   41120             :         },
   41121             :         { .name = NULL }
   41122             : };
   41123             : 
   41124           0 : static PyObject *py_netr_DatabaseRedo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   41125             : {
   41126           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseRedo, type);
   41127           0 :         struct netr_DatabaseRedo *_self = (struct netr_DatabaseRedo *)pytalloc_get_ptr(self);
   41128           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   41129           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   41130           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   41131           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   41132             :         /* a pointer to a NULL pointer */
   41133           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   41134           0 :         return self;
   41135             : }
   41136             : 
   41137           0 : static PyObject *py_netr_DatabaseRedo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   41138             : {
   41139             : 
   41140             : 
   41141           0 :         return PyLong_FromLong(17);
   41142             : }
   41143             : 
   41144           0 : static PyObject *py_netr_DatabaseRedo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   41145             : {
   41146           0 :         const struct ndr_interface_call *call = NULL;
   41147           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   41148           0 :         PyObject *ret = NULL;
   41149           0 :         struct ndr_push *push = NULL;
   41150           0 :         DATA_BLOB blob;
   41151           0 :         enum ndr_err_code err;
   41152             : 
   41153           0 :         if (ndr_table_netlogon.num_calls < 18) {
   41154           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_pack");
   41155           0 :                 return NULL;
   41156             :         }
   41157           0 :         call = &ndr_table_netlogon.calls[17];
   41158             : 
   41159           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   41160           0 :         if (push == NULL) {
   41161           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41162           0 :                 return NULL;
   41163             :         }
   41164             : 
   41165           0 :         push->flags |= ndr_push_flags;
   41166             : 
   41167           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   41168           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41169           0 :                 TALLOC_FREE(push);
   41170           0 :                 PyErr_SetNdrError(err);
   41171           0 :                 return NULL;
   41172             :         }
   41173           0 :         blob = ndr_push_blob(push);
   41174           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   41175           0 :         TALLOC_FREE(push);
   41176           0 :         return ret;
   41177             : }
   41178             : 
   41179           0 : static PyObject *py_netr_DatabaseRedo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41180             : {
   41181           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41182           0 :         PyObject *bigendian_obj = NULL;
   41183           0 :         PyObject *ndr64_obj = NULL;
   41184           0 :         libndr_flags ndr_push_flags = 0;
   41185             : 
   41186           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   41187             :                 discard_const_p(char *, kwnames),
   41188             :                 &bigendian_obj,
   41189             :                 &ndr64_obj)) {
   41190           0 :                 return NULL;
   41191             :         }
   41192             : 
   41193           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41194           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41195             :         }
   41196           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41197           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41198             :         }
   41199             : 
   41200           0 :         return py_netr_DatabaseRedo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   41201             : }
   41202             : 
   41203           0 : static PyObject *py_netr_DatabaseRedo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41204             : {
   41205           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41206           0 :         PyObject *bigendian_obj = NULL;
   41207           0 :         PyObject *ndr64_obj = NULL;
   41208           0 :         libndr_flags ndr_push_flags = 0;
   41209             : 
   41210           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   41211             :                 discard_const_p(char *, kwnames),
   41212             :                 &bigendian_obj,
   41213             :                 &ndr64_obj)) {
   41214           0 :                 return NULL;
   41215             :         }
   41216             : 
   41217           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41218           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41219             :         }
   41220           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41221           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41222             :         }
   41223             : 
   41224           0 :         return py_netr_DatabaseRedo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   41225             : }
   41226             : 
   41227           0 : static PyObject *py_netr_DatabaseRedo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   41228             : {
   41229           0 :         const struct ndr_interface_call *call = NULL;
   41230           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   41231           0 :         struct ndr_pull *pull = NULL;
   41232           0 :         enum ndr_err_code err;
   41233             : 
   41234           0 :         if (ndr_table_netlogon.num_calls < 18) {
   41235           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_unpack");
   41236           0 :                 return NULL;
   41237             :         }
   41238           0 :         call = &ndr_table_netlogon.calls[17];
   41239             : 
   41240           0 :         pull = ndr_pull_init_blob(blob, object);
   41241           0 :         if (pull == NULL) {
   41242           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41243           0 :                 return NULL;
   41244             :         }
   41245             : 
   41246           0 :         pull->flags |= ndr_pull_flags;
   41247             : 
   41248           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   41249           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41250           0 :                 TALLOC_FREE(pull);
   41251           0 :                 PyErr_SetNdrError(err);
   41252           0 :                 return NULL;
   41253             :         }
   41254           0 :         if (!allow_remaining) {
   41255           0 :                 uint32_t highest_ofs;
   41256             : 
   41257           0 :                 if (pull->offset > pull->relative_highest_offset) {
   41258           0 :                         highest_ofs = pull->offset;
   41259             :                 } else {
   41260           0 :                         highest_ofs = pull->relative_highest_offset;
   41261             :                 }
   41262           0 :                 if (highest_ofs < pull->data_size) {
   41263           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   41264             :                                 "not all bytes consumed ofs[%u] size[%u]",
   41265             :                                 highest_ofs, pull->data_size);
   41266           0 :                         TALLOC_FREE(pull);
   41267           0 :                         PyErr_SetNdrError(err);
   41268           0 :                         return NULL;
   41269             :                 }
   41270             :         }
   41271             : 
   41272           0 :         TALLOC_FREE(pull);
   41273           0 :         Py_RETURN_NONE;
   41274             : }
   41275             : 
   41276           0 : static PyObject *py_netr_DatabaseRedo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41277             : {
   41278           0 :         DATA_BLOB blob;
   41279           0 :         Py_ssize_t blob_length = 0;
   41280           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41281           0 :         PyObject *bigendian_obj = NULL;
   41282           0 :         PyObject *ndr64_obj = NULL;
   41283           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41284           0 :         PyObject *allow_remaining_obj = NULL;
   41285           0 :         bool allow_remaining = false;
   41286             : 
   41287           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   41288             :                 discard_const_p(char *, kwnames),
   41289             :                 &blob.data, &blob_length,
   41290             :                 &bigendian_obj,
   41291             :                 &ndr64_obj,
   41292             :                 &allow_remaining_obj)) {
   41293           0 :                 return NULL;
   41294             :         }
   41295           0 :         blob.length = blob_length;
   41296             : 
   41297           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41298           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41299             :         }
   41300           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41301           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41302             :         }
   41303             : 
   41304           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41305           0 :                 allow_remaining = true;
   41306             :         }
   41307             : 
   41308           0 :         return py_netr_DatabaseRedo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   41309             : }
   41310             : 
   41311           0 : static PyObject *py_netr_DatabaseRedo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41312             : {
   41313           0 :         DATA_BLOB blob;
   41314           0 :         Py_ssize_t blob_length = 0;
   41315           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41316           0 :         PyObject *bigendian_obj = NULL;
   41317           0 :         PyObject *ndr64_obj = NULL;
   41318           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41319           0 :         PyObject *allow_remaining_obj = NULL;
   41320           0 :         bool allow_remaining = false;
   41321             : 
   41322           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   41323             :                 discard_const_p(char *, kwnames),
   41324             :                 &blob.data, &blob_length,
   41325             :                 &bigendian_obj,
   41326             :                 &ndr64_obj,
   41327             :                 &allow_remaining_obj)) {
   41328           0 :                 return NULL;
   41329             :         }
   41330           0 :         blob.length = blob_length;
   41331             : 
   41332           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41333           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41334             :         }
   41335           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41336           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41337             :         }
   41338             : 
   41339           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41340           0 :                 allow_remaining = true;
   41341             :         }
   41342             : 
   41343           0 :         return py_netr_DatabaseRedo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   41344             : }
   41345             : 
   41346           0 : static PyObject *py_netr_DatabaseRedo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   41347             : {
   41348           0 :         const struct ndr_interface_call *call = NULL;
   41349           0 :         struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
   41350           0 :         PyObject *ret;
   41351           0 :         char *retstr;
   41352             : 
   41353           0 :         if (ndr_table_netlogon.num_calls < 18) {
   41354           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_print");
   41355           0 :                 return NULL;
   41356             :         }
   41357           0 :         call = &ndr_table_netlogon.calls[17];
   41358             : 
   41359           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   41360           0 :         ret = PyUnicode_FromString(retstr);
   41361           0 :         TALLOC_FREE(retstr);
   41362             : 
   41363           0 :         return ret;
   41364             : }
   41365             : 
   41366           0 : static PyObject *py_netr_DatabaseRedo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41367             : {
   41368           0 :         return py_netr_DatabaseRedo_ndr_print(py_obj, "netr_DatabaseRedo_in", NDR_IN);
   41369             : }
   41370             : 
   41371           0 : static PyObject *py_netr_DatabaseRedo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41372             : {
   41373           0 :         return py_netr_DatabaseRedo_ndr_print(py_obj, "netr_DatabaseRedo_out", NDR_OUT);
   41374             : }
   41375             : 
   41376             : static PyMethodDef py_netr_DatabaseRedo_methods[] = {
   41377             :         { "opnum", (PyCFunction)py_netr_DatabaseRedo_ndr_opnum, METH_NOARGS|METH_CLASS,
   41378             :                 "netlogon.netr_DatabaseRedo.opnum() -> 17 (0x11) " },
   41379             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   41380             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   41381             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   41382             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   41383             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   41384             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   41385             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   41386             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   41387             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseRedo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   41388             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseRedo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   41389             :         { NULL, NULL, 0, NULL }
   41390             : };
   41391             : 
   41392             : 
   41393             : static PyTypeObject netr_DatabaseRedo_Type = {
   41394             :         PyVarObject_HEAD_INIT(NULL, 0)
   41395             :         .tp_name = "netlogon.netr_DatabaseRedo",
   41396             :         .tp_getset = py_netr_DatabaseRedo_getsetters,
   41397             :         .tp_methods = py_netr_DatabaseRedo_methods,
   41398             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   41399             :         .tp_new = py_netr_DatabaseRedo_new,
   41400             : };
   41401             : 
   41402           0 : static bool pack_py_netr_DatabaseRedo_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseRedo *r)
   41403             : {
   41404           0 :         PyObject *py_logon_server;
   41405           0 :         PyObject *py_computername;
   41406           0 :         PyObject *py_credential;
   41407           0 :         PyObject *py_return_authenticator;
   41408           0 :         PyObject *py_change_log_entry;
   41409           0 :         PyObject *py_change_log_entry_size;
   41410           0 :         const char *kwnames[] = {
   41411             :                 "logon_server", "computername", "credential", "return_authenticator", "change_log_entry", "change_log_entry_size", NULL
   41412             :         };
   41413             : 
   41414           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)) {
   41415           0 :                 return false;
   41416             :         }
   41417             : 
   41418           0 :         if (py_logon_server == NULL) {
   41419           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   41420           0 :                 return false;
   41421             :         }
   41422           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   41423           0 :         if (r->in.logon_server == NULL) {
   41424           0 :                 PyErr_NoMemory();
   41425           0 :                 return false;
   41426             :         }
   41427             :         {
   41428           0 :                 const char *test_str;
   41429           0 :                 const char *talloc_str;
   41430           0 :                 PyObject *unicode = NULL;
   41431           0 :                 if (PyUnicode_Check(py_logon_server)) {
   41432           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   41433           0 :                         if (unicode == NULL) {
   41434           0 :                                 return false;
   41435             :                         }
   41436           0 :                         test_str = PyBytes_AS_STRING(unicode);
   41437           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   41438           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   41439             :                 } else {
   41440           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   41441           0 :                         return false;
   41442             :                 }
   41443           0 :                 talloc_str = talloc_strdup(r, test_str);
   41444           0 :                 if (unicode != NULL) {
   41445           0 :                         Py_DECREF(unicode);
   41446             :                 }
   41447           0 :                 if (talloc_str == NULL) {
   41448           0 :                         PyErr_NoMemory();
   41449           0 :                         return false;
   41450             :                 }
   41451           0 :                 r->in.logon_server = talloc_str;
   41452             :         }
   41453           0 :         if (py_computername == NULL) {
   41454           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
   41455           0 :                 return false;
   41456             :         }
   41457           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   41458           0 :         if (r->in.computername == NULL) {
   41459           0 :                 PyErr_NoMemory();
   41460           0 :                 return false;
   41461             :         }
   41462             :         {
   41463           0 :                 const char *test_str;
   41464           0 :                 const char *talloc_str;
   41465           0 :                 PyObject *unicode = NULL;
   41466           0 :                 if (PyUnicode_Check(py_computername)) {
   41467           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   41468           0 :                         if (unicode == NULL) {
   41469           0 :                                 return false;
   41470             :                         }
   41471           0 :                         test_str = PyBytes_AS_STRING(unicode);
   41472           0 :                 } else if (PyBytes_Check(py_computername)) {
   41473           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   41474             :                 } else {
   41475           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   41476           0 :                         return false;
   41477             :                 }
   41478           0 :                 talloc_str = talloc_strdup(r, test_str);
   41479           0 :                 if (unicode != NULL) {
   41480           0 :                         Py_DECREF(unicode);
   41481             :                 }
   41482           0 :                 if (talloc_str == NULL) {
   41483           0 :                         PyErr_NoMemory();
   41484           0 :                         return false;
   41485             :                 }
   41486           0 :                 r->in.computername = talloc_str;
   41487             :         }
   41488           0 :         if (py_credential == NULL) {
   41489           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   41490           0 :                 return false;
   41491             :         }
   41492           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   41493           0 :         if (r->in.credential == NULL) {
   41494           0 :                 PyErr_NoMemory();
   41495           0 :                 return false;
   41496             :         }
   41497           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   41498           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   41499           0 :                 PyErr_NoMemory();
   41500           0 :                 return false;
   41501             :         }
   41502           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   41503           0 :         if (py_return_authenticator == NULL) {
   41504           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   41505           0 :                 return false;
   41506             :         }
   41507           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   41508           0 :         if (r->in.return_authenticator == NULL) {
   41509           0 :                 PyErr_NoMemory();
   41510           0 :                 return false;
   41511             :         }
   41512           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   41513           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   41514           0 :                 PyErr_NoMemory();
   41515           0 :                 return false;
   41516             :         }
   41517           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   41518           0 :         if (py_change_log_entry == NULL) {
   41519           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.change_log_entry");
   41520           0 :                 return false;
   41521             :         }
   41522           0 :         PY_CHECK_TYPE(&netr_ChangeLogEntry_Type, py_change_log_entry, return false;);
   41523           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_change_log_entry)) == NULL) {
   41524           0 :                 PyErr_NoMemory();
   41525           0 :                 return false;
   41526             :         }
   41527           0 :         r->in.change_log_entry = *(struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_change_log_entry);
   41528           0 :         if (py_change_log_entry_size == NULL) {
   41529           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.change_log_entry_size");
   41530           0 :                 return false;
   41531             :         }
   41532             :         {
   41533           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.change_log_entry_size));
   41534           0 :                 if (PyLong_Check(py_change_log_entry_size)) {
   41535           0 :                         unsigned long long test_var;
   41536           0 :                         test_var = PyLong_AsUnsignedLongLong(py_change_log_entry_size);
   41537           0 :                         if (PyErr_Occurred() != NULL) {
   41538           0 :                                 return false;
   41539             :                         }
   41540           0 :                         if (test_var > uint_max) {
   41541           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41542             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41543           0 :                                 return false;
   41544             :                         }
   41545           0 :                         r->in.change_log_entry_size = test_var;
   41546             :                 } else {
   41547           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41548             :                           PyLong_Type.tp_name);
   41549           0 :                         return false;
   41550             :                 }
   41551             :         }
   41552           0 :         return true;
   41553             : }
   41554             : 
   41555           0 : static PyObject *unpack_py_netr_DatabaseRedo_args_out(struct netr_DatabaseRedo *r)
   41556             : {
   41557           0 :         PyObject *result;
   41558           0 :         PyObject *py_return_authenticator;
   41559           0 :         PyObject *py_delta_enum_array;
   41560           0 :         result = PyTuple_New(2);
   41561           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   41562           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   41563           0 :         if (*r->out.delta_enum_array == NULL) {
   41564           0 :                 py_delta_enum_array = Py_None;
   41565           0 :                 Py_INCREF(py_delta_enum_array);
   41566             :         } else {
   41567           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   41568             :         }
   41569           0 :         PyTuple_SetItem(result, 1, py_delta_enum_array);
   41570           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   41571           0 :                 PyErr_SetNTSTATUS(r->out.result);
   41572           0 :                 return NULL;
   41573             :         }
   41574             : 
   41575           0 :         return result;
   41576             : }
   41577             : 
   41578             : 
   41579           0 : static PyObject *py_netr_LogonControl2Ex_in_get_logon_server(PyObject *obj, void *closure)
   41580             : {
   41581           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
   41582           0 :         PyObject *py_logon_server;
   41583           0 :         if (object->in.logon_server == NULL) {
   41584           0 :                 Py_RETURN_NONE;
   41585             :         }
   41586           0 :         if (object->in.logon_server == NULL) {
   41587           0 :                 py_logon_server = Py_None;
   41588           0 :                 Py_INCREF(py_logon_server);
   41589             :         } else {
   41590           0 :                 if (object->in.logon_server == NULL) {
   41591           0 :                         py_logon_server = Py_None;
   41592           0 :                         Py_INCREF(py_logon_server);
   41593             :                 } else {
   41594           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   41595             :                 }
   41596             :         }
   41597           0 :         return py_logon_server;
   41598             : }
   41599             : 
   41600           0 : static int py_netr_LogonControl2Ex_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   41601             : {
   41602           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
   41603           0 :         if (value == NULL) {
   41604           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
   41605           0 :                 return -1;
   41606             :         }
   41607           0 :         if (value == Py_None) {
   41608           0 :                 object->in.logon_server = NULL;
   41609             :         } else {
   41610           0 :                 object->in.logon_server = NULL;
   41611             :                 {
   41612           0 :                         const char *test_str;
   41613           0 :                         const char *talloc_str;
   41614           0 :                         PyObject *unicode = NULL;
   41615           0 :                         if (PyUnicode_Check(value)) {
   41616           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   41617           0 :                                 if (unicode == NULL) {
   41618           0 :                                         return -1;
   41619             :                                 }
   41620           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   41621           0 :                         } else if (PyBytes_Check(value)) {
   41622           0 :                                 test_str = PyBytes_AS_STRING(value);
   41623             :                         } else {
   41624           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   41625           0 :                                 return -1;
   41626             :                         }
   41627           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   41628           0 :                         if (unicode != NULL) {
   41629           0 :                                 Py_DECREF(unicode);
   41630             :                         }
   41631           0 :                         if (talloc_str == NULL) {
   41632           0 :                                 PyErr_NoMemory();
   41633           0 :                                 return -1;
   41634             :                         }
   41635           0 :                         object->in.logon_server = talloc_str;
   41636             :                 }
   41637             :         }
   41638           0 :         return 0;
   41639             : }
   41640             : 
   41641           0 : static PyObject *py_netr_LogonControl2Ex_in_get_function_code(PyObject *obj, void *closure)
   41642             : {
   41643           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
   41644           0 :         PyObject *py_function_code;
   41645           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)(object->in.function_code));
   41646           0 :         return py_function_code;
   41647             : }
   41648             : 
   41649           0 : static int py_netr_LogonControl2Ex_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   41650             : {
   41651           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
   41652           0 :         if (value == NULL) {
   41653           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.function_code");
   41654           0 :                 return -1;
   41655             :         }
   41656             :         {
   41657           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   41658           0 :                 if (PyLong_Check(value)) {
   41659           0 :                         unsigned long long test_var;
   41660           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41661           0 :                         if (PyErr_Occurred() != NULL) {
   41662           0 :                                 return -1;
   41663             :                         }
   41664           0 :                         if (test_var > uint_max) {
   41665           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41666             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41667           0 :                                 return -1;
   41668             :                         }
   41669           0 :                         object->in.function_code = test_var;
   41670             :                 } else {
   41671           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41672             :                           PyLong_Type.tp_name);
   41673           0 :                         return -1;
   41674             :                 }
   41675             :         }
   41676           0 :         return 0;
   41677             : }
   41678             : 
   41679           0 : static PyObject *py_netr_LogonControl2Ex_in_get_level(PyObject *obj, void *closure)
   41680             : {
   41681           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
   41682           0 :         PyObject *py_level;
   41683           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   41684           0 :         return py_level;
   41685             : }
   41686             : 
   41687           0 : static int py_netr_LogonControl2Ex_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   41688             : {
   41689           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
   41690           0 :         if (value == NULL) {
   41691           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   41692           0 :                 return -1;
   41693             :         }
   41694             :         {
   41695           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   41696           0 :                 if (PyLong_Check(value)) {
   41697           0 :                         unsigned long long test_var;
   41698           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41699           0 :                         if (PyErr_Occurred() != NULL) {
   41700           0 :                                 return -1;
   41701             :                         }
   41702           0 :                         if (test_var > uint_max) {
   41703           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41704             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41705           0 :                                 return -1;
   41706             :                         }
   41707           0 :                         object->in.level = test_var;
   41708             :                 } else {
   41709           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41710             :                           PyLong_Type.tp_name);
   41711           0 :                         return -1;
   41712             :                 }
   41713             :         }
   41714           0 :         return 0;
   41715             : }
   41716             : 
   41717           0 : static PyObject *py_netr_LogonControl2Ex_in_get_data(PyObject *obj, void *closure)
   41718             : {
   41719           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
   41720           0 :         PyObject *py_data;
   41721           0 :         if (object->in.data == NULL) {
   41722           0 :                 Py_RETURN_NONE;
   41723             :         }
   41724           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");
   41725           0 :         if (py_data == NULL) {
   41726           0 :                 return NULL;
   41727             :         }
   41728           0 :         return py_data;
   41729             : }
   41730             : 
   41731           0 : static int py_netr_LogonControl2Ex_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
   41732             : {
   41733           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
   41734           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
   41735           0 :         if (value == NULL) {
   41736           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.data");
   41737           0 :                 return -1;
   41738             :         }
   41739           0 :         object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
   41740           0 :         if (object->in.data == NULL) {
   41741           0 :                 PyErr_NoMemory();
   41742           0 :                 return -1;
   41743             :         }
   41744             :         {
   41745           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   41746           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");
   41747           0 :                 if (data_switch_1 == NULL) {
   41748           0 :                         return -1;
   41749             :                 }
   41750           0 :                 object->in.data = data_switch_1;
   41751             :         }
   41752           0 :         return 0;
   41753             : }
   41754             : 
   41755           0 : static PyObject *py_netr_LogonControl2Ex_out_get_query(PyObject *obj, void *closure)
   41756             : {
   41757           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
   41758           0 :         PyObject *py_query;
   41759           0 :         if (object->out.query == NULL) {
   41760           0 :                 Py_RETURN_NONE;
   41761             :         }
   41762           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");
   41763           0 :         if (py_query == NULL) {
   41764           0 :                 return NULL;
   41765             :         }
   41766           0 :         return py_query;
   41767             : }
   41768             : 
   41769           0 : static int py_netr_LogonControl2Ex_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   41770             : {
   41771           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
   41772           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   41773           0 :         if (value == NULL) {
   41774           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.query");
   41775           0 :                 return -1;
   41776             :         }
   41777           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   41778           0 :         if (object->out.query == NULL) {
   41779           0 :                 PyErr_NoMemory();
   41780           0 :                 return -1;
   41781             :         }
   41782             :         {
   41783           0 :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   41784           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");
   41785           0 :                 if (query_switch_1 == NULL) {
   41786           0 :                         return -1;
   41787             :                 }
   41788           0 :                 object->out.query = query_switch_1;
   41789             :         }
   41790           0 :         return 0;
   41791             : }
   41792             : 
   41793           0 : static PyObject *py_netr_LogonControl2Ex_get_result(PyObject *obj, void *closure)
   41794             : {
   41795           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
   41796           0 :         PyObject *py_result;
   41797           0 :         py_result = PyErr_FromWERROR(object->out.result);
   41798           0 :         return py_result;
   41799             : }
   41800             : 
   41801           0 : static int py_netr_LogonControl2Ex_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41802             : {
   41803           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
   41804           0 :         if (value == NULL) {
   41805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   41806           0 :                 return -1;
   41807             :         }
   41808           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   41809           0 :         return 0;
   41810             : }
   41811             : 
   41812             : static PyGetSetDef py_netr_LogonControl2Ex_getsetters[] = {
   41813             :         {
   41814             :                 .name = discard_const_p(char, "in_logon_server"),
   41815             :                 .get = py_netr_LogonControl2Ex_in_get_logon_server,
   41816             :                 .set = py_netr_LogonControl2Ex_in_set_logon_server,
   41817             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41818             :         },
   41819             :         {
   41820             :                 .name = discard_const_p(char, "in_function_code"),
   41821             :                 .get = py_netr_LogonControl2Ex_in_get_function_code,
   41822             :                 .set = py_netr_LogonControl2Ex_in_set_function_code,
   41823             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   41824             :         },
   41825             :         {
   41826             :                 .name = discard_const_p(char, "in_level"),
   41827             :                 .get = py_netr_LogonControl2Ex_in_get_level,
   41828             :                 .set = py_netr_LogonControl2Ex_in_set_level,
   41829             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41830             :         },
   41831             :         {
   41832             :                 .name = discard_const_p(char, "in_data"),
   41833             :                 .get = py_netr_LogonControl2Ex_in_get_data,
   41834             :                 .set = py_netr_LogonControl2Ex_in_set_data,
   41835             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
   41836             :         },
   41837             :         {
   41838             :                 .name = discard_const_p(char, "out_query"),
   41839             :                 .get = py_netr_LogonControl2Ex_out_get_query,
   41840             :                 .set = py_netr_LogonControl2Ex_out_set_query,
   41841             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   41842             :         },
   41843             :         {
   41844             :                 .name = discard_const_p(char, "result"),
   41845             :                 .get = py_netr_LogonControl2Ex_get_result,
   41846             :                 .set = py_netr_LogonControl2Ex_set_result,
   41847             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   41848             :         },
   41849             :         { .name = NULL }
   41850             : };
   41851             : 
   41852           0 : static PyObject *py_netr_LogonControl2Ex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   41853             : {
   41854           0 :         PyObject *self = pytalloc_new(struct netr_LogonControl2Ex, type);
   41855           0 :         struct netr_LogonControl2Ex *_self = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(self);
   41856           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   41857           0 :         _self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   41858           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   41859           0 :         return self;
   41860             : }
   41861             : 
   41862           0 : static PyObject *py_netr_LogonControl2Ex_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   41863             : {
   41864             : 
   41865             : 
   41866           0 :         return PyLong_FromLong(18);
   41867             : }
   41868             : 
   41869           0 : static PyObject *py_netr_LogonControl2Ex_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   41870             : {
   41871           0 :         const struct ndr_interface_call *call = NULL;
   41872           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
   41873           0 :         PyObject *ret = NULL;
   41874           0 :         struct ndr_push *push = NULL;
   41875           0 :         DATA_BLOB blob;
   41876           0 :         enum ndr_err_code err;
   41877             : 
   41878           0 :         if (ndr_table_netlogon.num_calls < 19) {
   41879           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_pack");
   41880           0 :                 return NULL;
   41881             :         }
   41882           0 :         call = &ndr_table_netlogon.calls[18];
   41883             : 
   41884           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   41885           0 :         if (push == NULL) {
   41886           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41887           0 :                 return NULL;
   41888             :         }
   41889             : 
   41890           0 :         push->flags |= ndr_push_flags;
   41891             : 
   41892           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   41893           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41894           0 :                 TALLOC_FREE(push);
   41895           0 :                 PyErr_SetNdrError(err);
   41896           0 :                 return NULL;
   41897             :         }
   41898           0 :         blob = ndr_push_blob(push);
   41899           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   41900           0 :         TALLOC_FREE(push);
   41901           0 :         return ret;
   41902             : }
   41903             : 
   41904           0 : static PyObject *py_netr_LogonControl2Ex_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41905             : {
   41906           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41907           0 :         PyObject *bigendian_obj = NULL;
   41908           0 :         PyObject *ndr64_obj = NULL;
   41909           0 :         libndr_flags ndr_push_flags = 0;
   41910             : 
   41911           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   41912             :                 discard_const_p(char *, kwnames),
   41913             :                 &bigendian_obj,
   41914             :                 &ndr64_obj)) {
   41915           0 :                 return NULL;
   41916             :         }
   41917             : 
   41918           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41919           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41920             :         }
   41921           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41922           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41923             :         }
   41924             : 
   41925           0 :         return py_netr_LogonControl2Ex_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   41926             : }
   41927             : 
   41928           0 : static PyObject *py_netr_LogonControl2Ex_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41929             : {
   41930           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41931           0 :         PyObject *bigendian_obj = NULL;
   41932           0 :         PyObject *ndr64_obj = NULL;
   41933           0 :         libndr_flags ndr_push_flags = 0;
   41934             : 
   41935           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   41936             :                 discard_const_p(char *, kwnames),
   41937             :                 &bigendian_obj,
   41938             :                 &ndr64_obj)) {
   41939           0 :                 return NULL;
   41940             :         }
   41941             : 
   41942           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41943           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41944             :         }
   41945           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41946           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41947             :         }
   41948             : 
   41949           0 :         return py_netr_LogonControl2Ex_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   41950             : }
   41951             : 
   41952           0 : static PyObject *py_netr_LogonControl2Ex_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   41953             : {
   41954           0 :         const struct ndr_interface_call *call = NULL;
   41955           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
   41956           0 :         struct ndr_pull *pull = NULL;
   41957           0 :         enum ndr_err_code err;
   41958             : 
   41959           0 :         if (ndr_table_netlogon.num_calls < 19) {
   41960           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_unpack");
   41961           0 :                 return NULL;
   41962             :         }
   41963           0 :         call = &ndr_table_netlogon.calls[18];
   41964             : 
   41965           0 :         pull = ndr_pull_init_blob(blob, object);
   41966           0 :         if (pull == NULL) {
   41967           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41968           0 :                 return NULL;
   41969             :         }
   41970             : 
   41971           0 :         pull->flags |= ndr_pull_flags;
   41972             : 
   41973           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   41974           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41975           0 :                 TALLOC_FREE(pull);
   41976           0 :                 PyErr_SetNdrError(err);
   41977           0 :                 return NULL;
   41978             :         }
   41979           0 :         if (!allow_remaining) {
   41980           0 :                 uint32_t highest_ofs;
   41981             : 
   41982           0 :                 if (pull->offset > pull->relative_highest_offset) {
   41983           0 :                         highest_ofs = pull->offset;
   41984             :                 } else {
   41985           0 :                         highest_ofs = pull->relative_highest_offset;
   41986             :                 }
   41987           0 :                 if (highest_ofs < pull->data_size) {
   41988           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   41989             :                                 "not all bytes consumed ofs[%u] size[%u]",
   41990             :                                 highest_ofs, pull->data_size);
   41991           0 :                         TALLOC_FREE(pull);
   41992           0 :                         PyErr_SetNdrError(err);
   41993           0 :                         return NULL;
   41994             :                 }
   41995             :         }
   41996             : 
   41997           0 :         TALLOC_FREE(pull);
   41998           0 :         Py_RETURN_NONE;
   41999             : }
   42000             : 
   42001           0 : static PyObject *py_netr_LogonControl2Ex_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42002             : {
   42003           0 :         DATA_BLOB blob;
   42004           0 :         Py_ssize_t blob_length = 0;
   42005           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42006           0 :         PyObject *bigendian_obj = NULL;
   42007           0 :         PyObject *ndr64_obj = NULL;
   42008           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42009           0 :         PyObject *allow_remaining_obj = NULL;
   42010           0 :         bool allow_remaining = false;
   42011             : 
   42012           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42013             :                 discard_const_p(char *, kwnames),
   42014             :                 &blob.data, &blob_length,
   42015             :                 &bigendian_obj,
   42016             :                 &ndr64_obj,
   42017             :                 &allow_remaining_obj)) {
   42018           0 :                 return NULL;
   42019             :         }
   42020           0 :         blob.length = blob_length;
   42021             : 
   42022           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42023           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42024             :         }
   42025           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42026           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42027             :         }
   42028             : 
   42029           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42030           0 :                 allow_remaining = true;
   42031             :         }
   42032             : 
   42033           0 :         return py_netr_LogonControl2Ex_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42034             : }
   42035             : 
   42036           0 : static PyObject *py_netr_LogonControl2Ex_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42037             : {
   42038           0 :         DATA_BLOB blob;
   42039           0 :         Py_ssize_t blob_length = 0;
   42040           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42041           0 :         PyObject *bigendian_obj = NULL;
   42042           0 :         PyObject *ndr64_obj = NULL;
   42043           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42044           0 :         PyObject *allow_remaining_obj = NULL;
   42045           0 :         bool allow_remaining = false;
   42046             : 
   42047           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42048             :                 discard_const_p(char *, kwnames),
   42049             :                 &blob.data, &blob_length,
   42050             :                 &bigendian_obj,
   42051             :                 &ndr64_obj,
   42052             :                 &allow_remaining_obj)) {
   42053           0 :                 return NULL;
   42054             :         }
   42055           0 :         blob.length = blob_length;
   42056             : 
   42057           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42058           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42059             :         }
   42060           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42061           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42062             :         }
   42063             : 
   42064           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42065           0 :                 allow_remaining = true;
   42066             :         }
   42067             : 
   42068           0 :         return py_netr_LogonControl2Ex_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42069             : }
   42070             : 
   42071           0 : static PyObject *py_netr_LogonControl2Ex_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   42072             : {
   42073           0 :         const struct ndr_interface_call *call = NULL;
   42074           0 :         struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
   42075           0 :         PyObject *ret;
   42076           0 :         char *retstr;
   42077             : 
   42078           0 :         if (ndr_table_netlogon.num_calls < 19) {
   42079           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_print");
   42080           0 :                 return NULL;
   42081             :         }
   42082           0 :         call = &ndr_table_netlogon.calls[18];
   42083             : 
   42084           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42085           0 :         ret = PyUnicode_FromString(retstr);
   42086           0 :         TALLOC_FREE(retstr);
   42087             : 
   42088           0 :         return ret;
   42089             : }
   42090             : 
   42091           0 : static PyObject *py_netr_LogonControl2Ex_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42092             : {
   42093           0 :         return py_netr_LogonControl2Ex_ndr_print(py_obj, "netr_LogonControl2Ex_in", NDR_IN);
   42094             : }
   42095             : 
   42096           0 : static PyObject *py_netr_LogonControl2Ex_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42097             : {
   42098           0 :         return py_netr_LogonControl2Ex_ndr_print(py_obj, "netr_LogonControl2Ex_out", NDR_OUT);
   42099             : }
   42100             : 
   42101             : static PyMethodDef py_netr_LogonControl2Ex_methods[] = {
   42102             :         { "opnum", (PyCFunction)py_netr_LogonControl2Ex_ndr_opnum, METH_NOARGS|METH_CLASS,
   42103             :                 "netlogon.netr_LogonControl2Ex.opnum() -> 18 (0x12) " },
   42104             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42105             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42106             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42107             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42108             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42109             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42110             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42111             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42112             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonControl2Ex_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42113             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonControl2Ex_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42114             :         { NULL, NULL, 0, NULL }
   42115             : };
   42116             : 
   42117             : 
   42118             : static PyTypeObject netr_LogonControl2Ex_Type = {
   42119             :         PyVarObject_HEAD_INIT(NULL, 0)
   42120             :         .tp_name = "netlogon.netr_LogonControl2Ex",
   42121             :         .tp_getset = py_netr_LogonControl2Ex_getsetters,
   42122             :         .tp_methods = py_netr_LogonControl2Ex_methods,
   42123             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42124             :         .tp_new = py_netr_LogonControl2Ex_new,
   42125             : };
   42126             : 
   42127          81 : static bool pack_py_netr_LogonControl2Ex_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl2Ex *r)
   42128             : {
   42129           0 :         PyObject *py_logon_server;
   42130           0 :         PyObject *py_function_code;
   42131           0 :         PyObject *py_level;
   42132           0 :         PyObject *py_data;
   42133          81 :         const char *kwnames[] = {
   42134             :                 "logon_server", "function_code", "level", "data", NULL
   42135             :         };
   42136             : 
   42137          81 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_LogonControl2Ex", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level, &py_data)) {
   42138           0 :                 return false;
   42139             :         }
   42140             : 
   42141          81 :         if (py_logon_server == NULL) {
   42142           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
   42143           0 :                 return false;
   42144             :         }
   42145          81 :         if (py_logon_server == Py_None) {
   42146           0 :                 r->in.logon_server = NULL;
   42147             :         } else {
   42148          81 :                 r->in.logon_server = NULL;
   42149             :                 {
   42150           0 :                         const char *test_str;
   42151           0 :                         const char *talloc_str;
   42152          81 :                         PyObject *unicode = NULL;
   42153          81 :                         if (PyUnicode_Check(py_logon_server)) {
   42154          81 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   42155          81 :                                 if (unicode == NULL) {
   42156           0 :                                         return false;
   42157             :                                 }
   42158          81 :                                 test_str = PyBytes_AS_STRING(unicode);
   42159           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   42160           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   42161             :                         } else {
   42162           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   42163           0 :                                 return false;
   42164             :                         }
   42165          81 :                         talloc_str = talloc_strdup(r, test_str);
   42166          81 :                         if (unicode != NULL) {
   42167          41 :                                 Py_DECREF(unicode);
   42168             :                         }
   42169          81 :                         if (talloc_str == NULL) {
   42170           0 :                                 PyErr_NoMemory();
   42171           0 :                                 return false;
   42172             :                         }
   42173          81 :                         r->in.logon_server = talloc_str;
   42174             :                 }
   42175             :         }
   42176          81 :         if (py_function_code == NULL) {
   42177           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.function_code");
   42178           0 :                 return false;
   42179             :         }
   42180             :         {
   42181          81 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   42182          81 :                 if (PyLong_Check(py_function_code)) {
   42183           0 :                         unsigned long long test_var;
   42184          81 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   42185          81 :                         if (PyErr_Occurred() != NULL) {
   42186           0 :                                 return false;
   42187             :                         }
   42188          81 :                         if (test_var > uint_max) {
   42189           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42190             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42191           0 :                                 return false;
   42192             :                         }
   42193          81 :                         r->in.function_code = test_var;
   42194             :                 } else {
   42195           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42196             :                           PyLong_Type.tp_name);
   42197           0 :                         return false;
   42198             :                 }
   42199             :         }
   42200          81 :         if (py_level == NULL) {
   42201           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   42202           0 :                 return false;
   42203             :         }
   42204             :         {
   42205          81 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   42206          81 :                 if (PyLong_Check(py_level)) {
   42207           0 :                         unsigned long long test_var;
   42208          81 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   42209          81 :                         if (PyErr_Occurred() != NULL) {
   42210           0 :                                 return false;
   42211             :                         }
   42212          81 :                         if (test_var > uint_max) {
   42213           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42214             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42215           0 :                                 return false;
   42216             :                         }
   42217          81 :                         r->in.level = test_var;
   42218             :                 } else {
   42219           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42220             :                           PyLong_Type.tp_name);
   42221           0 :                         return false;
   42222             :                 }
   42223             :         }
   42224          81 :         if (py_data == NULL) {
   42225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.data");
   42226           0 :                 return false;
   42227             :         }
   42228          81 :         r->in.data = talloc_ptrtype(r, r->in.data);
   42229          81 :         if (r->in.data == NULL) {
   42230           0 :                 PyErr_NoMemory();
   42231           0 :                 return false;
   42232             :         }
   42233             :         {
   42234           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   42235          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");
   42236          81 :                 if (data_switch_1 == NULL) {
   42237           0 :                         return false;
   42238             :                 }
   42239          81 :                 r->in.data = data_switch_1;
   42240             :         }
   42241          81 :         return true;
   42242             : }
   42243             : 
   42244          81 : static PyObject *unpack_py_netr_LogonControl2Ex_args_out(struct netr_LogonControl2Ex *r)
   42245             : {
   42246           0 :         PyObject *result;
   42247           0 :         PyObject *py_query;
   42248          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");
   42249          81 :         if (py_query == NULL) {
   42250           0 :                 return NULL;
   42251             :         }
   42252          81 :         result = py_query;
   42253          81 :         if (!W_ERROR_IS_OK(r->out.result)) {
   42254           0 :                 PyErr_SetWERROR(r->out.result);
   42255           0 :                 return NULL;
   42256             :         }
   42257             : 
   42258          81 :         return result;
   42259             : }
   42260             : 
   42261             : 
   42262           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_in_get_server_name(PyObject *obj, void *closure)
   42263             : {
   42264           0 :         struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(obj);
   42265           0 :         PyObject *py_server_name;
   42266           0 :         if (object->in.server_name == NULL) {
   42267           0 :                 Py_RETURN_NONE;
   42268             :         }
   42269           0 :         if (object->in.server_name == NULL) {
   42270           0 :                 py_server_name = Py_None;
   42271           0 :                 Py_INCREF(py_server_name);
   42272             :         } else {
   42273           0 :                 if (object->in.server_name == NULL) {
   42274           0 :                         py_server_name = Py_None;
   42275           0 :                         Py_INCREF(py_server_name);
   42276             :                 } else {
   42277           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   42278             :                 }
   42279             :         }
   42280           0 :         return py_server_name;
   42281             : }
   42282             : 
   42283           0 : static int py_netr_NetrEnumerateTrustedDomains_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   42284             : {
   42285           0 :         struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
   42286           0 :         if (value == NULL) {
   42287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   42288           0 :                 return -1;
   42289             :         }
   42290           0 :         if (value == Py_None) {
   42291           0 :                 object->in.server_name = NULL;
   42292             :         } else {
   42293           0 :                 object->in.server_name = NULL;
   42294             :                 {
   42295           0 :                         const char *test_str;
   42296           0 :                         const char *talloc_str;
   42297           0 :                         PyObject *unicode = NULL;
   42298           0 :                         if (PyUnicode_Check(value)) {
   42299           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42300           0 :                                 if (unicode == NULL) {
   42301           0 :                                         return -1;
   42302             :                                 }
   42303           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42304           0 :                         } else if (PyBytes_Check(value)) {
   42305           0 :                                 test_str = PyBytes_AS_STRING(value);
   42306             :                         } else {
   42307           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42308           0 :                                 return -1;
   42309             :                         }
   42310           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42311           0 :                         if (unicode != NULL) {
   42312           0 :                                 Py_DECREF(unicode);
   42313             :                         }
   42314           0 :                         if (talloc_str == NULL) {
   42315           0 :                                 PyErr_NoMemory();
   42316           0 :                                 return -1;
   42317             :                         }
   42318           0 :                         object->in.server_name = talloc_str;
   42319             :                 }
   42320             :         }
   42321           0 :         return 0;
   42322             : }
   42323             : 
   42324           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_out_get_trusted_domains_blob(PyObject *obj, void *closure)
   42325             : {
   42326           0 :         struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(obj);
   42327           0 :         PyObject *py_trusted_domains_blob;
   42328           0 :         if (object->out.trusted_domains_blob == NULL) {
   42329           0 :                 Py_RETURN_NONE;
   42330             :         }
   42331           0 :         py_trusted_domains_blob = pytalloc_reference_ex(&netr_Blob_Type, object->out.trusted_domains_blob, object->out.trusted_domains_blob);
   42332           0 :         return py_trusted_domains_blob;
   42333             : }
   42334             : 
   42335           0 : static int py_netr_NetrEnumerateTrustedDomains_out_set_trusted_domains_blob(PyObject *py_obj, PyObject *value, void *closure)
   42336             : {
   42337           0 :         struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
   42338           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trusted_domains_blob));
   42339           0 :         if (value == NULL) {
   42340           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.trusted_domains_blob");
   42341           0 :                 return -1;
   42342             :         }
   42343           0 :         object->out.trusted_domains_blob = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trusted_domains_blob);
   42344           0 :         if (object->out.trusted_domains_blob == NULL) {
   42345           0 :                 PyErr_NoMemory();
   42346           0 :                 return -1;
   42347             :         }
   42348           0 :         PY_CHECK_TYPE(&netr_Blob_Type, value, return -1;);
   42349           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42350           0 :                 PyErr_NoMemory();
   42351           0 :                 return -1;
   42352             :         }
   42353           0 :         object->out.trusted_domains_blob = (struct netr_Blob *)pytalloc_get_ptr(value);
   42354           0 :         return 0;
   42355             : }
   42356             : 
   42357           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_get_result(PyObject *obj, void *closure)
   42358             : {
   42359           0 :         struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(obj);
   42360           0 :         PyObject *py_result;
   42361           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   42362           0 :         return py_result;
   42363             : }
   42364             : 
   42365           0 : static int py_netr_NetrEnumerateTrustedDomains_set_result(PyObject *py_obj, PyObject *value, void *closure)
   42366             : {
   42367           0 :         struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
   42368           0 :         if (value == NULL) {
   42369           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   42370           0 :                 return -1;
   42371             :         }
   42372           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   42373           0 :         return 0;
   42374             : }
   42375             : 
   42376             : static PyGetSetDef py_netr_NetrEnumerateTrustedDomains_getsetters[] = {
   42377             :         {
   42378             :                 .name = discard_const_p(char, "in_server_name"),
   42379             :                 .get = py_netr_NetrEnumerateTrustedDomains_in_get_server_name,
   42380             :                 .set = py_netr_NetrEnumerateTrustedDomains_in_set_server_name,
   42381             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42382             :         },
   42383             :         {
   42384             :                 .name = discard_const_p(char, "out_trusted_domains_blob"),
   42385             :                 .get = py_netr_NetrEnumerateTrustedDomains_out_get_trusted_domains_blob,
   42386             :                 .set = py_netr_NetrEnumerateTrustedDomains_out_set_trusted_domains_blob,
   42387             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Blob")
   42388             :         },
   42389             :         {
   42390             :                 .name = discard_const_p(char, "result"),
   42391             :                 .get = py_netr_NetrEnumerateTrustedDomains_get_result,
   42392             :                 .set = py_netr_NetrEnumerateTrustedDomains_set_result,
   42393             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   42394             :         },
   42395             :         { .name = NULL }
   42396             : };
   42397             : 
   42398           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   42399             : {
   42400           0 :         PyObject *self = pytalloc_new(struct netr_NetrEnumerateTrustedDomains, type);
   42401           0 :         struct netr_NetrEnumerateTrustedDomains *_self = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(self);
   42402           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   42403           0 :         _self->out.trusted_domains_blob = talloc_zero(mem_ctx, struct netr_Blob);
   42404           0 :         return self;
   42405             : }
   42406             : 
   42407           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   42408             : {
   42409             : 
   42410             : 
   42411           0 :         return PyLong_FromLong(19);
   42412             : }
   42413             : 
   42414           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   42415             : {
   42416           0 :         const struct ndr_interface_call *call = NULL;
   42417           0 :         struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
   42418           0 :         PyObject *ret = NULL;
   42419           0 :         struct ndr_push *push = NULL;
   42420           0 :         DATA_BLOB blob;
   42421           0 :         enum ndr_err_code err;
   42422             : 
   42423           0 :         if (ndr_table_netlogon.num_calls < 20) {
   42424           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_pack");
   42425           0 :                 return NULL;
   42426             :         }
   42427           0 :         call = &ndr_table_netlogon.calls[19];
   42428             : 
   42429           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   42430           0 :         if (push == NULL) {
   42431           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42432           0 :                 return NULL;
   42433             :         }
   42434             : 
   42435           0 :         push->flags |= ndr_push_flags;
   42436             : 
   42437           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42438           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42439           0 :                 TALLOC_FREE(push);
   42440           0 :                 PyErr_SetNdrError(err);
   42441           0 :                 return NULL;
   42442             :         }
   42443           0 :         blob = ndr_push_blob(push);
   42444           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42445           0 :         TALLOC_FREE(push);
   42446           0 :         return ret;
   42447             : }
   42448             : 
   42449           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42450             : {
   42451           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42452           0 :         PyObject *bigendian_obj = NULL;
   42453           0 :         PyObject *ndr64_obj = NULL;
   42454           0 :         libndr_flags ndr_push_flags = 0;
   42455             : 
   42456           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42457             :                 discard_const_p(char *, kwnames),
   42458             :                 &bigendian_obj,
   42459             :                 &ndr64_obj)) {
   42460           0 :                 return NULL;
   42461             :         }
   42462             : 
   42463           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42464           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42465             :         }
   42466           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42467           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42468             :         }
   42469             : 
   42470           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42471             : }
   42472             : 
   42473           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42474             : {
   42475           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42476           0 :         PyObject *bigendian_obj = NULL;
   42477           0 :         PyObject *ndr64_obj = NULL;
   42478           0 :         libndr_flags ndr_push_flags = 0;
   42479             : 
   42480           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42481             :                 discard_const_p(char *, kwnames),
   42482             :                 &bigendian_obj,
   42483             :                 &ndr64_obj)) {
   42484           0 :                 return NULL;
   42485             :         }
   42486             : 
   42487           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42488           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42489             :         }
   42490           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42491           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42492             :         }
   42493             : 
   42494           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42495             : }
   42496             : 
   42497           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   42498             : {
   42499           0 :         const struct ndr_interface_call *call = NULL;
   42500           0 :         struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
   42501           0 :         struct ndr_pull *pull = NULL;
   42502           0 :         enum ndr_err_code err;
   42503             : 
   42504           0 :         if (ndr_table_netlogon.num_calls < 20) {
   42505           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_unpack");
   42506           0 :                 return NULL;
   42507             :         }
   42508           0 :         call = &ndr_table_netlogon.calls[19];
   42509             : 
   42510           0 :         pull = ndr_pull_init_blob(blob, object);
   42511           0 :         if (pull == NULL) {
   42512           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42513           0 :                 return NULL;
   42514             :         }
   42515             : 
   42516           0 :         pull->flags |= ndr_pull_flags;
   42517             : 
   42518           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42519           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42520           0 :                 TALLOC_FREE(pull);
   42521           0 :                 PyErr_SetNdrError(err);
   42522           0 :                 return NULL;
   42523             :         }
   42524           0 :         if (!allow_remaining) {
   42525           0 :                 uint32_t highest_ofs;
   42526             : 
   42527           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42528           0 :                         highest_ofs = pull->offset;
   42529             :                 } else {
   42530           0 :                         highest_ofs = pull->relative_highest_offset;
   42531             :                 }
   42532           0 :                 if (highest_ofs < pull->data_size) {
   42533           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42534             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42535             :                                 highest_ofs, pull->data_size);
   42536           0 :                         TALLOC_FREE(pull);
   42537           0 :                         PyErr_SetNdrError(err);
   42538           0 :                         return NULL;
   42539             :                 }
   42540             :         }
   42541             : 
   42542           0 :         TALLOC_FREE(pull);
   42543           0 :         Py_RETURN_NONE;
   42544             : }
   42545             : 
   42546           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42547             : {
   42548           0 :         DATA_BLOB blob;
   42549           0 :         Py_ssize_t blob_length = 0;
   42550           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42551           0 :         PyObject *bigendian_obj = NULL;
   42552           0 :         PyObject *ndr64_obj = NULL;
   42553           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42554           0 :         PyObject *allow_remaining_obj = NULL;
   42555           0 :         bool allow_remaining = false;
   42556             : 
   42557           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42558             :                 discard_const_p(char *, kwnames),
   42559             :                 &blob.data, &blob_length,
   42560             :                 &bigendian_obj,
   42561             :                 &ndr64_obj,
   42562             :                 &allow_remaining_obj)) {
   42563           0 :                 return NULL;
   42564             :         }
   42565           0 :         blob.length = blob_length;
   42566             : 
   42567           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42568           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42569             :         }
   42570           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42571           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42572             :         }
   42573             : 
   42574           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42575           0 :                 allow_remaining = true;
   42576             :         }
   42577             : 
   42578           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42579             : }
   42580             : 
   42581           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42582             : {
   42583           0 :         DATA_BLOB blob;
   42584           0 :         Py_ssize_t blob_length = 0;
   42585           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42586           0 :         PyObject *bigendian_obj = NULL;
   42587           0 :         PyObject *ndr64_obj = NULL;
   42588           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42589           0 :         PyObject *allow_remaining_obj = NULL;
   42590           0 :         bool allow_remaining = false;
   42591             : 
   42592           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42593             :                 discard_const_p(char *, kwnames),
   42594             :                 &blob.data, &blob_length,
   42595             :                 &bigendian_obj,
   42596             :                 &ndr64_obj,
   42597             :                 &allow_remaining_obj)) {
   42598           0 :                 return NULL;
   42599             :         }
   42600           0 :         blob.length = blob_length;
   42601             : 
   42602           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42603           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42604             :         }
   42605           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42606           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42607             :         }
   42608             : 
   42609           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42610           0 :                 allow_remaining = true;
   42611             :         }
   42612             : 
   42613           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42614             : }
   42615             : 
   42616           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   42617             : {
   42618           0 :         const struct ndr_interface_call *call = NULL;
   42619           0 :         struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
   42620           0 :         PyObject *ret;
   42621           0 :         char *retstr;
   42622             : 
   42623           0 :         if (ndr_table_netlogon.num_calls < 20) {
   42624           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_print");
   42625           0 :                 return NULL;
   42626             :         }
   42627           0 :         call = &ndr_table_netlogon.calls[19];
   42628             : 
   42629           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42630           0 :         ret = PyUnicode_FromString(retstr);
   42631           0 :         TALLOC_FREE(retstr);
   42632             : 
   42633           0 :         return ret;
   42634             : }
   42635             : 
   42636           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42637             : {
   42638           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomains_in", NDR_IN);
   42639             : }
   42640             : 
   42641           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42642             : {
   42643           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomains_out", NDR_OUT);
   42644             : }
   42645             : 
   42646             : static PyMethodDef py_netr_NetrEnumerateTrustedDomains_methods[] = {
   42647             :         { "opnum", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_opnum, METH_NOARGS|METH_CLASS,
   42648             :                 "netlogon.netr_NetrEnumerateTrustedDomains.opnum() -> 19 (0x13) " },
   42649             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42650             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42651             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42652             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42653             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42654             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42655             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42656             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42657             :         { "__ndr_print_in__", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42658             :         { "__ndr_print_out__", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42659             :         { NULL, NULL, 0, NULL }
   42660             : };
   42661             : 
   42662             : 
   42663             : static PyTypeObject netr_NetrEnumerateTrustedDomains_Type = {
   42664             :         PyVarObject_HEAD_INIT(NULL, 0)
   42665             :         .tp_name = "netlogon.netr_NetrEnumerateTrustedDomains",
   42666             :         .tp_getset = py_netr_NetrEnumerateTrustedDomains_getsetters,
   42667             :         .tp_methods = py_netr_NetrEnumerateTrustedDomains_methods,
   42668             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42669             :         .tp_new = py_netr_NetrEnumerateTrustedDomains_new,
   42670             : };
   42671             : 
   42672           0 : static bool pack_py_netr_NetrEnumerateTrustedDomains_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrEnumerateTrustedDomains *r)
   42673             : {
   42674           0 :         PyObject *py_server_name;
   42675           0 :         const char *kwnames[] = {
   42676             :                 "server_name", NULL
   42677             :         };
   42678             : 
   42679           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_NetrEnumerateTrustedDomains", discard_const_p(char *, kwnames), &py_server_name)) {
   42680           0 :                 return false;
   42681             :         }
   42682             : 
   42683           0 :         if (py_server_name == NULL) {
   42684           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   42685           0 :                 return false;
   42686             :         }
   42687           0 :         if (py_server_name == Py_None) {
   42688           0 :                 r->in.server_name = NULL;
   42689             :         } else {
   42690           0 :                 r->in.server_name = NULL;
   42691             :                 {
   42692           0 :                         const char *test_str;
   42693           0 :                         const char *talloc_str;
   42694           0 :                         PyObject *unicode = NULL;
   42695           0 :                         if (PyUnicode_Check(py_server_name)) {
   42696           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   42697           0 :                                 if (unicode == NULL) {
   42698           0 :                                         return false;
   42699             :                                 }
   42700           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42701           0 :                         } else if (PyBytes_Check(py_server_name)) {
   42702           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   42703             :                         } else {
   42704           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   42705           0 :                                 return false;
   42706             :                         }
   42707           0 :                         talloc_str = talloc_strdup(r, test_str);
   42708           0 :                         if (unicode != NULL) {
   42709           0 :                                 Py_DECREF(unicode);
   42710             :                         }
   42711           0 :                         if (talloc_str == NULL) {
   42712           0 :                                 PyErr_NoMemory();
   42713           0 :                                 return false;
   42714             :                         }
   42715           0 :                         r->in.server_name = talloc_str;
   42716             :                 }
   42717             :         }
   42718           0 :         return true;
   42719             : }
   42720             : 
   42721           0 : static PyObject *unpack_py_netr_NetrEnumerateTrustedDomains_args_out(struct netr_NetrEnumerateTrustedDomains *r)
   42722             : {
   42723           0 :         PyObject *result;
   42724           0 :         PyObject *py_trusted_domains_blob;
   42725           0 :         py_trusted_domains_blob = pytalloc_reference_ex(&netr_Blob_Type, r->out.trusted_domains_blob, r->out.trusted_domains_blob);
   42726           0 :         result = py_trusted_domains_blob;
   42727           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   42728           0 :                 PyErr_SetNTSTATUS(r->out.result);
   42729           0 :                 return NULL;
   42730             :         }
   42731             : 
   42732           0 :         return result;
   42733             : }
   42734             : 
   42735             : 
   42736           0 : static PyObject *py_netr_DsRGetDCName_in_get_server_unc(PyObject *obj, void *closure)
   42737             : {
   42738           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
   42739           0 :         PyObject *py_server_unc;
   42740           0 :         if (object->in.server_unc == NULL) {
   42741           0 :                 Py_RETURN_NONE;
   42742             :         }
   42743           0 :         if (object->in.server_unc == NULL) {
   42744           0 :                 py_server_unc = Py_None;
   42745           0 :                 Py_INCREF(py_server_unc);
   42746             :         } else {
   42747           0 :                 if (object->in.server_unc == NULL) {
   42748           0 :                         py_server_unc = Py_None;
   42749           0 :                         Py_INCREF(py_server_unc);
   42750             :                 } else {
   42751           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   42752             :                 }
   42753             :         }
   42754           0 :         return py_server_unc;
   42755             : }
   42756             : 
   42757           0 : static int py_netr_DsRGetDCName_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   42758             : {
   42759           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   42760           0 :         if (value == NULL) {
   42761           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   42762           0 :                 return -1;
   42763             :         }
   42764           0 :         if (value == Py_None) {
   42765           0 :                 object->in.server_unc = NULL;
   42766             :         } else {
   42767           0 :                 object->in.server_unc = NULL;
   42768             :                 {
   42769           0 :                         const char *test_str;
   42770           0 :                         const char *talloc_str;
   42771           0 :                         PyObject *unicode = NULL;
   42772           0 :                         if (PyUnicode_Check(value)) {
   42773           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42774           0 :                                 if (unicode == NULL) {
   42775           0 :                                         return -1;
   42776             :                                 }
   42777           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42778           0 :                         } else if (PyBytes_Check(value)) {
   42779           0 :                                 test_str = PyBytes_AS_STRING(value);
   42780             :                         } else {
   42781           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42782           0 :                                 return -1;
   42783             :                         }
   42784           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42785           0 :                         if (unicode != NULL) {
   42786           0 :                                 Py_DECREF(unicode);
   42787             :                         }
   42788           0 :                         if (talloc_str == NULL) {
   42789           0 :                                 PyErr_NoMemory();
   42790           0 :                                 return -1;
   42791             :                         }
   42792           0 :                         object->in.server_unc = talloc_str;
   42793             :                 }
   42794             :         }
   42795           0 :         return 0;
   42796             : }
   42797             : 
   42798           0 : static PyObject *py_netr_DsRGetDCName_in_get_domain_name(PyObject *obj, void *closure)
   42799             : {
   42800           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
   42801           0 :         PyObject *py_domain_name;
   42802           0 :         if (object->in.domain_name == NULL) {
   42803           0 :                 Py_RETURN_NONE;
   42804             :         }
   42805           0 :         if (object->in.domain_name == NULL) {
   42806           0 :                 py_domain_name = Py_None;
   42807           0 :                 Py_INCREF(py_domain_name);
   42808             :         } else {
   42809           0 :                 if (object->in.domain_name == NULL) {
   42810           0 :                         py_domain_name = Py_None;
   42811           0 :                         Py_INCREF(py_domain_name);
   42812             :                 } else {
   42813           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   42814             :                 }
   42815             :         }
   42816           0 :         return py_domain_name;
   42817             : }
   42818             : 
   42819           0 : static int py_netr_DsRGetDCName_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   42820             : {
   42821           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   42822           0 :         if (value == NULL) {
   42823           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_name");
   42824           0 :                 return -1;
   42825             :         }
   42826           0 :         if (value == Py_None) {
   42827           0 :                 object->in.domain_name = NULL;
   42828             :         } else {
   42829           0 :                 object->in.domain_name = NULL;
   42830             :                 {
   42831           0 :                         const char *test_str;
   42832           0 :                         const char *talloc_str;
   42833           0 :                         PyObject *unicode = NULL;
   42834           0 :                         if (PyUnicode_Check(value)) {
   42835           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42836           0 :                                 if (unicode == NULL) {
   42837           0 :                                         return -1;
   42838             :                                 }
   42839           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42840           0 :                         } else if (PyBytes_Check(value)) {
   42841           0 :                                 test_str = PyBytes_AS_STRING(value);
   42842             :                         } else {
   42843           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42844           0 :                                 return -1;
   42845             :                         }
   42846           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42847           0 :                         if (unicode != NULL) {
   42848           0 :                                 Py_DECREF(unicode);
   42849             :                         }
   42850           0 :                         if (talloc_str == NULL) {
   42851           0 :                                 PyErr_NoMemory();
   42852           0 :                                 return -1;
   42853             :                         }
   42854           0 :                         object->in.domain_name = talloc_str;
   42855             :                 }
   42856             :         }
   42857           0 :         return 0;
   42858             : }
   42859             : 
   42860           0 : static PyObject *py_netr_DsRGetDCName_in_get_domain_guid(PyObject *obj, void *closure)
   42861             : {
   42862           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
   42863           0 :         PyObject *py_domain_guid;
   42864           0 :         if (object->in.domain_guid == NULL) {
   42865           0 :                 Py_RETURN_NONE;
   42866             :         }
   42867           0 :         if (object->in.domain_guid == NULL) {
   42868           0 :                 py_domain_guid = Py_None;
   42869           0 :                 Py_INCREF(py_domain_guid);
   42870             :         } else {
   42871           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   42872             :         }
   42873           0 :         return py_domain_guid;
   42874             : }
   42875             : 
   42876           0 : static int py_netr_DsRGetDCName_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   42877             : {
   42878           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   42879           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   42880           0 :         if (value == NULL) {
   42881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_guid");
   42882           0 :                 return -1;
   42883             :         }
   42884           0 :         if (value == Py_None) {
   42885           0 :                 object->in.domain_guid = NULL;
   42886             :         } else {
   42887           0 :                 object->in.domain_guid = NULL;
   42888           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   42889           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42890           0 :                         PyErr_NoMemory();
   42891           0 :                         return -1;
   42892             :                 }
   42893           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   42894             :         }
   42895           0 :         return 0;
   42896             : }
   42897             : 
   42898           0 : static PyObject *py_netr_DsRGetDCName_in_get_site_guid(PyObject *obj, void *closure)
   42899             : {
   42900           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
   42901           0 :         PyObject *py_site_guid;
   42902           0 :         if (object->in.site_guid == NULL) {
   42903           0 :                 Py_RETURN_NONE;
   42904             :         }
   42905           0 :         if (object->in.site_guid == NULL) {
   42906           0 :                 py_site_guid = Py_None;
   42907           0 :                 Py_INCREF(py_site_guid);
   42908             :         } else {
   42909           0 :                 py_site_guid = pytalloc_reference_ex(GUID_Type, object->in.site_guid, object->in.site_guid);
   42910             :         }
   42911           0 :         return py_site_guid;
   42912             : }
   42913             : 
   42914           0 : static int py_netr_DsRGetDCName_in_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
   42915             : {
   42916           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   42917           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.site_guid));
   42918           0 :         if (value == NULL) {
   42919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.site_guid");
   42920           0 :                 return -1;
   42921             :         }
   42922           0 :         if (value == Py_None) {
   42923           0 :                 object->in.site_guid = NULL;
   42924             :         } else {
   42925           0 :                 object->in.site_guid = NULL;
   42926           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   42927           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42928           0 :                         PyErr_NoMemory();
   42929           0 :                         return -1;
   42930             :                 }
   42931           0 :                 object->in.site_guid = (struct GUID *)pytalloc_get_ptr(value);
   42932             :         }
   42933           0 :         return 0;
   42934             : }
   42935             : 
   42936           0 : static PyObject *py_netr_DsRGetDCName_in_get_flags(PyObject *obj, void *closure)
   42937             : {
   42938           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
   42939           0 :         PyObject *py_flags;
   42940           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
   42941           0 :         return py_flags;
   42942             : }
   42943             : 
   42944           0 : static int py_netr_DsRGetDCName_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   42945             : {
   42946           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   42947           0 :         if (value == NULL) {
   42948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
   42949           0 :                 return -1;
   42950             :         }
   42951             :         {
   42952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   42953           0 :                 if (PyLong_Check(value)) {
   42954           0 :                         unsigned long long test_var;
   42955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   42956           0 :                         if (PyErr_Occurred() != NULL) {
   42957           0 :                                 return -1;
   42958             :                         }
   42959           0 :                         if (test_var > uint_max) {
   42960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42961             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42962           0 :                                 return -1;
   42963             :                         }
   42964           0 :                         object->in.flags = test_var;
   42965             :                 } else {
   42966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42967             :                           PyLong_Type.tp_name);
   42968           0 :                         return -1;
   42969             :                 }
   42970             :         }
   42971           0 :         return 0;
   42972             : }
   42973             : 
   42974           0 : static PyObject *py_netr_DsRGetDCName_out_get_info(PyObject *obj, void *closure)
   42975             : {
   42976           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
   42977           0 :         PyObject *py_info;
   42978           0 :         if (object->out.info == NULL) {
   42979           0 :                 Py_RETURN_NONE;
   42980             :         }
   42981           0 :         if (*object->out.info == NULL) {
   42982           0 :                 py_info = Py_None;
   42983           0 :                 Py_INCREF(py_info);
   42984             :         } else {
   42985           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
   42986             :         }
   42987           0 :         return py_info;
   42988             : }
   42989             : 
   42990           0 : static int py_netr_DsRGetDCName_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   42991             : {
   42992           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   42993           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   42994           0 :         if (value == NULL) {
   42995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   42996           0 :                 return -1;
   42997             :         }
   42998           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   42999           0 :         if (object->out.info == NULL) {
   43000           0 :                 PyErr_NoMemory();
   43001           0 :                 return -1;
   43002             :         }
   43003           0 :         if (value == Py_None) {
   43004           0 :                 *object->out.info = NULL;
   43005             :         } else {
   43006           0 :                 *object->out.info = NULL;
   43007           0 :                 PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
   43008           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43009           0 :                         PyErr_NoMemory();
   43010           0 :                         return -1;
   43011             :                 }
   43012           0 :                 *object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   43013             :         }
   43014           0 :         return 0;
   43015             : }
   43016             : 
   43017           0 : static PyObject *py_netr_DsRGetDCName_get_result(PyObject *obj, void *closure)
   43018             : {
   43019           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
   43020           0 :         PyObject *py_result;
   43021           0 :         py_result = PyErr_FromWERROR(object->out.result);
   43022           0 :         return py_result;
   43023             : }
   43024             : 
   43025           0 : static int py_netr_DsRGetDCName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43026             : {
   43027           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   43028           0 :         if (value == NULL) {
   43029           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   43030           0 :                 return -1;
   43031             :         }
   43032           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   43033           0 :         return 0;
   43034             : }
   43035             : 
   43036             : static PyGetSetDef py_netr_DsRGetDCName_getsetters[] = {
   43037             :         {
   43038             :                 .name = discard_const_p(char, "in_server_unc"),
   43039             :                 .get = py_netr_DsRGetDCName_in_get_server_unc,
   43040             :                 .set = py_netr_DsRGetDCName_in_set_server_unc,
   43041             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43042             :         },
   43043             :         {
   43044             :                 .name = discard_const_p(char, "in_domain_name"),
   43045             :                 .get = py_netr_DsRGetDCName_in_get_domain_name,
   43046             :                 .set = py_netr_DsRGetDCName_in_set_domain_name,
   43047             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43048             :         },
   43049             :         {
   43050             :                 .name = discard_const_p(char, "in_domain_guid"),
   43051             :                 .get = py_netr_DsRGetDCName_in_get_domain_guid,
   43052             :                 .set = py_netr_DsRGetDCName_in_set_domain_guid,
   43053             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   43054             :         },
   43055             :         {
   43056             :                 .name = discard_const_p(char, "in_site_guid"),
   43057             :                 .get = py_netr_DsRGetDCName_in_get_site_guid,
   43058             :                 .set = py_netr_DsRGetDCName_in_set_site_guid,
   43059             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   43060             :         },
   43061             :         {
   43062             :                 .name = discard_const_p(char, "in_flags"),
   43063             :                 .get = py_netr_DsRGetDCName_in_get_flags,
   43064             :                 .set = py_netr_DsRGetDCName_in_set_flags,
   43065             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
   43066             :         },
   43067             :         {
   43068             :                 .name = discard_const_p(char, "out_info"),
   43069             :                 .get = py_netr_DsRGetDCName_out_get_info,
   43070             :                 .set = py_netr_DsRGetDCName_out_set_info,
   43071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   43072             :         },
   43073             :         {
   43074             :                 .name = discard_const_p(char, "result"),
   43075             :                 .get = py_netr_DsRGetDCName_get_result,
   43076             :                 .set = py_netr_DsRGetDCName_set_result,
   43077             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   43078             :         },
   43079             :         { .name = NULL }
   43080             : };
   43081             : 
   43082           0 : static PyObject *py_netr_DsRGetDCName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   43083             : {
   43084           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetDCName, type);
   43085           0 :         struct netr_DsRGetDCName *_self = (struct netr_DsRGetDCName *)pytalloc_get_ptr(self);
   43086           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   43087             :         /* a pointer to a NULL pointer */
   43088           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   43089           0 :         return self;
   43090             : }
   43091             : 
   43092           0 : static PyObject *py_netr_DsRGetDCName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   43093             : {
   43094             : 
   43095             : 
   43096           0 :         return PyLong_FromLong(20);
   43097             : }
   43098             : 
   43099           0 : static PyObject *py_netr_DsRGetDCName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   43100             : {
   43101           0 :         const struct ndr_interface_call *call = NULL;
   43102           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   43103           0 :         PyObject *ret = NULL;
   43104           0 :         struct ndr_push *push = NULL;
   43105           0 :         DATA_BLOB blob;
   43106           0 :         enum ndr_err_code err;
   43107             : 
   43108           0 :         if (ndr_table_netlogon.num_calls < 21) {
   43109           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_pack");
   43110           0 :                 return NULL;
   43111             :         }
   43112           0 :         call = &ndr_table_netlogon.calls[20];
   43113             : 
   43114           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   43115           0 :         if (push == NULL) {
   43116           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43117           0 :                 return NULL;
   43118             :         }
   43119             : 
   43120           0 :         push->flags |= ndr_push_flags;
   43121             : 
   43122           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   43123           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43124           0 :                 TALLOC_FREE(push);
   43125           0 :                 PyErr_SetNdrError(err);
   43126           0 :                 return NULL;
   43127             :         }
   43128           0 :         blob = ndr_push_blob(push);
   43129           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   43130           0 :         TALLOC_FREE(push);
   43131           0 :         return ret;
   43132             : }
   43133             : 
   43134           0 : static PyObject *py_netr_DsRGetDCName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43135             : {
   43136           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43137           0 :         PyObject *bigendian_obj = NULL;
   43138           0 :         PyObject *ndr64_obj = NULL;
   43139           0 :         libndr_flags ndr_push_flags = 0;
   43140             : 
   43141           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   43142             :                 discard_const_p(char *, kwnames),
   43143             :                 &bigendian_obj,
   43144             :                 &ndr64_obj)) {
   43145           0 :                 return NULL;
   43146             :         }
   43147             : 
   43148           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43149           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43150             :         }
   43151           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43152           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43153             :         }
   43154             : 
   43155           0 :         return py_netr_DsRGetDCName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   43156             : }
   43157             : 
   43158           0 : static PyObject *py_netr_DsRGetDCName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43159             : {
   43160           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43161           0 :         PyObject *bigendian_obj = NULL;
   43162           0 :         PyObject *ndr64_obj = NULL;
   43163           0 :         libndr_flags ndr_push_flags = 0;
   43164             : 
   43165           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   43166             :                 discard_const_p(char *, kwnames),
   43167             :                 &bigendian_obj,
   43168             :                 &ndr64_obj)) {
   43169           0 :                 return NULL;
   43170             :         }
   43171             : 
   43172           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43173           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43174             :         }
   43175           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43176           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43177             :         }
   43178             : 
   43179           0 :         return py_netr_DsRGetDCName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   43180             : }
   43181             : 
   43182           0 : static PyObject *py_netr_DsRGetDCName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   43183             : {
   43184           0 :         const struct ndr_interface_call *call = NULL;
   43185           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   43186           0 :         struct ndr_pull *pull = NULL;
   43187           0 :         enum ndr_err_code err;
   43188             : 
   43189           0 :         if (ndr_table_netlogon.num_calls < 21) {
   43190           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_unpack");
   43191           0 :                 return NULL;
   43192             :         }
   43193           0 :         call = &ndr_table_netlogon.calls[20];
   43194             : 
   43195           0 :         pull = ndr_pull_init_blob(blob, object);
   43196           0 :         if (pull == NULL) {
   43197           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43198           0 :                 return NULL;
   43199             :         }
   43200             : 
   43201           0 :         pull->flags |= ndr_pull_flags;
   43202             : 
   43203           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   43204           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43205           0 :                 TALLOC_FREE(pull);
   43206           0 :                 PyErr_SetNdrError(err);
   43207           0 :                 return NULL;
   43208             :         }
   43209           0 :         if (!allow_remaining) {
   43210           0 :                 uint32_t highest_ofs;
   43211             : 
   43212           0 :                 if (pull->offset > pull->relative_highest_offset) {
   43213           0 :                         highest_ofs = pull->offset;
   43214             :                 } else {
   43215           0 :                         highest_ofs = pull->relative_highest_offset;
   43216             :                 }
   43217           0 :                 if (highest_ofs < pull->data_size) {
   43218           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   43219             :                                 "not all bytes consumed ofs[%u] size[%u]",
   43220             :                                 highest_ofs, pull->data_size);
   43221           0 :                         TALLOC_FREE(pull);
   43222           0 :                         PyErr_SetNdrError(err);
   43223           0 :                         return NULL;
   43224             :                 }
   43225             :         }
   43226             : 
   43227           0 :         TALLOC_FREE(pull);
   43228           0 :         Py_RETURN_NONE;
   43229             : }
   43230             : 
   43231           0 : static PyObject *py_netr_DsRGetDCName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43232             : {
   43233           0 :         DATA_BLOB blob;
   43234           0 :         Py_ssize_t blob_length = 0;
   43235           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43236           0 :         PyObject *bigendian_obj = NULL;
   43237           0 :         PyObject *ndr64_obj = NULL;
   43238           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43239           0 :         PyObject *allow_remaining_obj = NULL;
   43240           0 :         bool allow_remaining = false;
   43241             : 
   43242           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   43243             :                 discard_const_p(char *, kwnames),
   43244             :                 &blob.data, &blob_length,
   43245             :                 &bigendian_obj,
   43246             :                 &ndr64_obj,
   43247             :                 &allow_remaining_obj)) {
   43248           0 :                 return NULL;
   43249             :         }
   43250           0 :         blob.length = blob_length;
   43251             : 
   43252           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43253           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43254             :         }
   43255           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43256           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43257             :         }
   43258             : 
   43259           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43260           0 :                 allow_remaining = true;
   43261             :         }
   43262             : 
   43263           0 :         return py_netr_DsRGetDCName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   43264             : }
   43265             : 
   43266           0 : static PyObject *py_netr_DsRGetDCName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43267             : {
   43268           0 :         DATA_BLOB blob;
   43269           0 :         Py_ssize_t blob_length = 0;
   43270           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43271           0 :         PyObject *bigendian_obj = NULL;
   43272           0 :         PyObject *ndr64_obj = NULL;
   43273           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43274           0 :         PyObject *allow_remaining_obj = NULL;
   43275           0 :         bool allow_remaining = false;
   43276             : 
   43277           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   43278             :                 discard_const_p(char *, kwnames),
   43279             :                 &blob.data, &blob_length,
   43280             :                 &bigendian_obj,
   43281             :                 &ndr64_obj,
   43282             :                 &allow_remaining_obj)) {
   43283           0 :                 return NULL;
   43284             :         }
   43285           0 :         blob.length = blob_length;
   43286             : 
   43287           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43288           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43289             :         }
   43290           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43291           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43292             :         }
   43293             : 
   43294           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43295           0 :                 allow_remaining = true;
   43296             :         }
   43297             : 
   43298           0 :         return py_netr_DsRGetDCName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   43299             : }
   43300             : 
   43301           0 : static PyObject *py_netr_DsRGetDCName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   43302             : {
   43303           0 :         const struct ndr_interface_call *call = NULL;
   43304           0 :         struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
   43305           0 :         PyObject *ret;
   43306           0 :         char *retstr;
   43307             : 
   43308           0 :         if (ndr_table_netlogon.num_calls < 21) {
   43309           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_print");
   43310           0 :                 return NULL;
   43311             :         }
   43312           0 :         call = &ndr_table_netlogon.calls[20];
   43313             : 
   43314           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   43315           0 :         ret = PyUnicode_FromString(retstr);
   43316           0 :         TALLOC_FREE(retstr);
   43317             : 
   43318           0 :         return ret;
   43319             : }
   43320             : 
   43321           0 : static PyObject *py_netr_DsRGetDCName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43322             : {
   43323           0 :         return py_netr_DsRGetDCName_ndr_print(py_obj, "netr_DsRGetDCName_in", NDR_IN);
   43324             : }
   43325             : 
   43326           0 : static PyObject *py_netr_DsRGetDCName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43327             : {
   43328           0 :         return py_netr_DsRGetDCName_ndr_print(py_obj, "netr_DsRGetDCName_out", NDR_OUT);
   43329             : }
   43330             : 
   43331             : static PyMethodDef py_netr_DsRGetDCName_methods[] = {
   43332             :         { "opnum", (PyCFunction)py_netr_DsRGetDCName_ndr_opnum, METH_NOARGS|METH_CLASS,
   43333             :                 "netlogon.netr_DsRGetDCName.opnum() -> 20 (0x14) " },
   43334             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   43335             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   43336             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   43337             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   43338             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   43339             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   43340             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   43341             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   43342             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetDCName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   43343             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetDCName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   43344             :         { NULL, NULL, 0, NULL }
   43345             : };
   43346             : 
   43347             : 
   43348             : static PyTypeObject netr_DsRGetDCName_Type = {
   43349             :         PyVarObject_HEAD_INIT(NULL, 0)
   43350             :         .tp_name = "netlogon.netr_DsRGetDCName",
   43351             :         .tp_getset = py_netr_DsRGetDCName_getsetters,
   43352             :         .tp_methods = py_netr_DsRGetDCName_methods,
   43353             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   43354             :         .tp_new = py_netr_DsRGetDCName_new,
   43355             : };
   43356             : 
   43357           0 : static bool pack_py_netr_DsRGetDCName_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCName *r)
   43358             : {
   43359           0 :         PyObject *py_server_unc;
   43360           0 :         PyObject *py_domain_name;
   43361           0 :         PyObject *py_domain_guid;
   43362           0 :         PyObject *py_site_guid;
   43363           0 :         PyObject *py_flags;
   43364           0 :         const char *kwnames[] = {
   43365             :                 "server_unc", "domain_name", "domain_guid", "site_guid", "flags", NULL
   43366             :         };
   43367             : 
   43368           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)) {
   43369           0 :                 return false;
   43370             :         }
   43371             : 
   43372           0 :         if (py_server_unc == NULL) {
   43373           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   43374           0 :                 return false;
   43375             :         }
   43376           0 :         if (py_server_unc == Py_None) {
   43377           0 :                 r->in.server_unc = NULL;
   43378             :         } else {
   43379           0 :                 r->in.server_unc = NULL;
   43380             :                 {
   43381           0 :                         const char *test_str;
   43382           0 :                         const char *talloc_str;
   43383           0 :                         PyObject *unicode = NULL;
   43384           0 :                         if (PyUnicode_Check(py_server_unc)) {
   43385           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   43386           0 :                                 if (unicode == NULL) {
   43387           0 :                                         return false;
   43388             :                                 }
   43389           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43390           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   43391           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   43392             :                         } else {
   43393           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   43394           0 :                                 return false;
   43395             :                         }
   43396           0 :                         talloc_str = talloc_strdup(r, test_str);
   43397           0 :                         if (unicode != NULL) {
   43398           0 :                                 Py_DECREF(unicode);
   43399             :                         }
   43400           0 :                         if (talloc_str == NULL) {
   43401           0 :                                 PyErr_NoMemory();
   43402           0 :                                 return false;
   43403             :                         }
   43404           0 :                         r->in.server_unc = talloc_str;
   43405             :                 }
   43406             :         }
   43407           0 :         if (py_domain_name == NULL) {
   43408           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_name");
   43409           0 :                 return false;
   43410             :         }
   43411           0 :         if (py_domain_name == Py_None) {
   43412           0 :                 r->in.domain_name = NULL;
   43413             :         } else {
   43414           0 :                 r->in.domain_name = NULL;
   43415             :                 {
   43416           0 :                         const char *test_str;
   43417           0 :                         const char *talloc_str;
   43418           0 :                         PyObject *unicode = NULL;
   43419           0 :                         if (PyUnicode_Check(py_domain_name)) {
   43420           0 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   43421           0 :                                 if (unicode == NULL) {
   43422           0 :                                         return false;
   43423             :                                 }
   43424           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43425           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   43426           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   43427             :                         } else {
   43428           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   43429           0 :                                 return false;
   43430             :                         }
   43431           0 :                         talloc_str = talloc_strdup(r, test_str);
   43432           0 :                         if (unicode != NULL) {
   43433           0 :                                 Py_DECREF(unicode);
   43434             :                         }
   43435           0 :                         if (talloc_str == NULL) {
   43436           0 :                                 PyErr_NoMemory();
   43437           0 :                                 return false;
   43438             :                         }
   43439           0 :                         r->in.domain_name = talloc_str;
   43440             :                 }
   43441             :         }
   43442           0 :         if (py_domain_guid == NULL) {
   43443           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_guid");
   43444           0 :                 return false;
   43445             :         }
   43446           0 :         if (py_domain_guid == Py_None) {
   43447           0 :                 r->in.domain_guid = NULL;
   43448             :         } else {
   43449           0 :                 r->in.domain_guid = NULL;
   43450           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   43451           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   43452           0 :                         PyErr_NoMemory();
   43453           0 :                         return false;
   43454             :                 }
   43455           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   43456             :         }
   43457           0 :         if (py_site_guid == NULL) {
   43458           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.site_guid");
   43459           0 :                 return false;
   43460             :         }
   43461           0 :         if (py_site_guid == Py_None) {
   43462           0 :                 r->in.site_guid = NULL;
   43463             :         } else {
   43464           0 :                 r->in.site_guid = NULL;
   43465           0 :                 PY_CHECK_TYPE(GUID_Type, py_site_guid, return false;);
   43466           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_site_guid)) == NULL) {
   43467           0 :                         PyErr_NoMemory();
   43468           0 :                         return false;
   43469             :                 }
   43470           0 :                 r->in.site_guid = (struct GUID *)pytalloc_get_ptr(py_site_guid);
   43471             :         }
   43472           0 :         if (py_flags == NULL) {
   43473           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
   43474           0 :                 return false;
   43475             :         }
   43476             :         {
   43477           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   43478           0 :                 if (PyLong_Check(py_flags)) {
   43479           0 :                         unsigned long long test_var;
   43480           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   43481           0 :                         if (PyErr_Occurred() != NULL) {
   43482           0 :                                 return false;
   43483             :                         }
   43484           0 :                         if (test_var > uint_max) {
   43485           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43486             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43487           0 :                                 return false;
   43488             :                         }
   43489           0 :                         r->in.flags = test_var;
   43490             :                 } else {
   43491           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43492             :                           PyLong_Type.tp_name);
   43493           0 :                         return false;
   43494             :                 }
   43495             :         }
   43496           0 :         return true;
   43497             : }
   43498             : 
   43499           0 : static PyObject *unpack_py_netr_DsRGetDCName_args_out(struct netr_DsRGetDCName *r)
   43500             : {
   43501           0 :         PyObject *result;
   43502           0 :         PyObject *py_info;
   43503           0 :         if (*r->out.info == NULL) {
   43504           0 :                 py_info = Py_None;
   43505           0 :                 Py_INCREF(py_info);
   43506             :         } else {
   43507           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
   43508             :         }
   43509           0 :         result = py_info;
   43510           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   43511           0 :                 PyErr_SetWERROR(r->out.result);
   43512           0 :                 return NULL;
   43513             :         }
   43514             : 
   43515           0 :         return result;
   43516             : }
   43517             : 
   43518             : 
   43519           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_server_name(PyObject *obj, void *closure)
   43520             : {
   43521           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
   43522           0 :         PyObject *py_server_name;
   43523           0 :         if (object->in.server_name == NULL) {
   43524           0 :                 Py_RETURN_NONE;
   43525             :         }
   43526           0 :         if (object->in.server_name == NULL) {
   43527           0 :                 py_server_name = Py_None;
   43528           0 :                 Py_INCREF(py_server_name);
   43529             :         } else {
   43530           0 :                 py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   43531             :         }
   43532           0 :         return py_server_name;
   43533             : }
   43534             : 
   43535           0 : static int py_netr_LogonGetCapabilities_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   43536             : {
   43537           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43538           0 :         if (value == NULL) {
   43539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   43540           0 :                 return -1;
   43541             :         }
   43542           0 :         object->in.server_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server_name);
   43543           0 :         if (object->in.server_name == NULL) {
   43544           0 :                 PyErr_NoMemory();
   43545           0 :                 return -1;
   43546             :         }
   43547             :         {
   43548           0 :                 const char *test_str;
   43549           0 :                 const char *talloc_str;
   43550           0 :                 PyObject *unicode = NULL;
   43551           0 :                 if (PyUnicode_Check(value)) {
   43552           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43553           0 :                         if (unicode == NULL) {
   43554           0 :                                 return -1;
   43555             :                         }
   43556           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43557           0 :                 } else if (PyBytes_Check(value)) {
   43558           0 :                         test_str = PyBytes_AS_STRING(value);
   43559             :                 } else {
   43560           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43561           0 :                         return -1;
   43562             :                 }
   43563           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43564           0 :                 if (unicode != NULL) {
   43565           0 :                         Py_DECREF(unicode);
   43566             :                 }
   43567           0 :                 if (talloc_str == NULL) {
   43568           0 :                         PyErr_NoMemory();
   43569           0 :                         return -1;
   43570             :                 }
   43571           0 :                 object->in.server_name = talloc_str;
   43572             :         }
   43573           0 :         return 0;
   43574             : }
   43575             : 
   43576           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_computer_name(PyObject *obj, void *closure)
   43577             : {
   43578           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
   43579           0 :         PyObject *py_computer_name;
   43580           0 :         if (object->in.computer_name == NULL) {
   43581           0 :                 Py_RETURN_NONE;
   43582             :         }
   43583           0 :         if (object->in.computer_name == NULL) {
   43584           0 :                 py_computer_name = Py_None;
   43585           0 :                 Py_INCREF(py_computer_name);
   43586             :         } else {
   43587           0 :                 if (object->in.computer_name == NULL) {
   43588           0 :                         py_computer_name = Py_None;
   43589           0 :                         Py_INCREF(py_computer_name);
   43590             :                 } else {
   43591           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   43592             :                 }
   43593             :         }
   43594           0 :         return py_computer_name;
   43595             : }
   43596             : 
   43597           0 : static int py_netr_LogonGetCapabilities_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   43598             : {
   43599           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43600           0 :         if (value == NULL) {
   43601           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   43602           0 :                 return -1;
   43603             :         }
   43604           0 :         if (value == Py_None) {
   43605           0 :                 object->in.computer_name = NULL;
   43606             :         } else {
   43607           0 :                 object->in.computer_name = NULL;
   43608             :                 {
   43609           0 :                         const char *test_str;
   43610           0 :                         const char *talloc_str;
   43611           0 :                         PyObject *unicode = NULL;
   43612           0 :                         if (PyUnicode_Check(value)) {
   43613           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43614           0 :                                 if (unicode == NULL) {
   43615           0 :                                         return -1;
   43616             :                                 }
   43617           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43618           0 :                         } else if (PyBytes_Check(value)) {
   43619           0 :                                 test_str = PyBytes_AS_STRING(value);
   43620             :                         } else {
   43621           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43622           0 :                                 return -1;
   43623             :                         }
   43624           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43625           0 :                         if (unicode != NULL) {
   43626           0 :                                 Py_DECREF(unicode);
   43627             :                         }
   43628           0 :                         if (talloc_str == NULL) {
   43629           0 :                                 PyErr_NoMemory();
   43630           0 :                                 return -1;
   43631             :                         }
   43632           0 :                         object->in.computer_name = talloc_str;
   43633             :                 }
   43634             :         }
   43635           0 :         return 0;
   43636             : }
   43637             : 
   43638           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_credential(PyObject *obj, void *closure)
   43639             : {
   43640           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
   43641           0 :         PyObject *py_credential;
   43642           0 :         if (object->in.credential == NULL) {
   43643           0 :                 Py_RETURN_NONE;
   43644             :         }
   43645           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   43646           0 :         return py_credential;
   43647             : }
   43648             : 
   43649           0 : static int py_netr_LogonGetCapabilities_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   43650             : {
   43651           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43652           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   43653           0 :         if (value == NULL) {
   43654           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   43655           0 :                 return -1;
   43656             :         }
   43657           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   43658           0 :         if (object->in.credential == NULL) {
   43659           0 :                 PyErr_NoMemory();
   43660           0 :                 return -1;
   43661             :         }
   43662           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   43663           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43664           0 :                 PyErr_NoMemory();
   43665           0 :                 return -1;
   43666             :         }
   43667           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   43668           0 :         return 0;
   43669             : }
   43670             : 
   43671           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_return_authenticator(PyObject *obj, void *closure)
   43672             : {
   43673           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
   43674           0 :         PyObject *py_return_authenticator;
   43675           0 :         if (object->in.return_authenticator == NULL) {
   43676           0 :                 Py_RETURN_NONE;
   43677             :         }
   43678           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   43679           0 :         return py_return_authenticator;
   43680             : }
   43681             : 
   43682           0 : static int py_netr_LogonGetCapabilities_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   43683             : {
   43684           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43685           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   43686           0 :         if (value == NULL) {
   43687           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   43688           0 :                 return -1;
   43689             :         }
   43690           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   43691           0 :         if (object->in.return_authenticator == NULL) {
   43692           0 :                 PyErr_NoMemory();
   43693           0 :                 return -1;
   43694             :         }
   43695           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   43696           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43697           0 :                 PyErr_NoMemory();
   43698           0 :                 return -1;
   43699             :         }
   43700           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   43701           0 :         return 0;
   43702             : }
   43703             : 
   43704           0 : static PyObject *py_netr_LogonGetCapabilities_out_get_return_authenticator(PyObject *obj, void *closure)
   43705             : {
   43706           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
   43707           0 :         PyObject *py_return_authenticator;
   43708           0 :         if (object->out.return_authenticator == NULL) {
   43709           0 :                 Py_RETURN_NONE;
   43710             :         }
   43711           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   43712           0 :         return py_return_authenticator;
   43713             : }
   43714             : 
   43715           0 : static int py_netr_LogonGetCapabilities_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   43716             : {
   43717           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43718           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   43719           0 :         if (value == NULL) {
   43720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   43721           0 :                 return -1;
   43722             :         }
   43723           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   43724           0 :         if (object->out.return_authenticator == NULL) {
   43725           0 :                 PyErr_NoMemory();
   43726           0 :                 return -1;
   43727             :         }
   43728           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   43729           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43730           0 :                 PyErr_NoMemory();
   43731           0 :                 return -1;
   43732             :         }
   43733           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   43734           0 :         return 0;
   43735             : }
   43736             : 
   43737           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_query_level(PyObject *obj, void *closure)
   43738             : {
   43739           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
   43740           0 :         PyObject *py_query_level;
   43741           0 :         py_query_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.query_level));
   43742           0 :         return py_query_level;
   43743             : }
   43744             : 
   43745           0 : static int py_netr_LogonGetCapabilities_in_set_query_level(PyObject *py_obj, PyObject *value, void *closure)
   43746             : {
   43747           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43748           0 :         if (value == NULL) {
   43749           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.query_level");
   43750           0 :                 return -1;
   43751             :         }
   43752             :         {
   43753           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.query_level));
   43754           0 :                 if (PyLong_Check(value)) {
   43755           0 :                         unsigned long long test_var;
   43756           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43757           0 :                         if (PyErr_Occurred() != NULL) {
   43758           0 :                                 return -1;
   43759             :                         }
   43760           0 :                         if (test_var > uint_max) {
   43761           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43762             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43763           0 :                                 return -1;
   43764             :                         }
   43765           0 :                         object->in.query_level = test_var;
   43766             :                 } else {
   43767           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43768             :                           PyLong_Type.tp_name);
   43769           0 :                         return -1;
   43770             :                 }
   43771             :         }
   43772           0 :         return 0;
   43773             : }
   43774             : 
   43775           0 : static PyObject *py_netr_LogonGetCapabilities_out_get_capabilities(PyObject *obj, void *closure)
   43776             : {
   43777           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
   43778           0 :         PyObject *py_capabilities;
   43779           0 :         if (object->out.capabilities == NULL) {
   43780           0 :                 Py_RETURN_NONE;
   43781             :         }
   43782           0 :         py_capabilities = pyrpc_import_union(&netr_Capabilities_Type, object->out.capabilities, object->in.query_level, object->out.capabilities, "union netr_Capabilities");
   43783           0 :         if (py_capabilities == NULL) {
   43784           0 :                 return NULL;
   43785             :         }
   43786           0 :         return py_capabilities;
   43787             : }
   43788             : 
   43789           0 : static int py_netr_LogonGetCapabilities_out_set_capabilities(PyObject *py_obj, PyObject *value, void *closure)
   43790             : {
   43791           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43792           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.capabilities));
   43793           0 :         if (value == NULL) {
   43794           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.capabilities");
   43795           0 :                 return -1;
   43796             :         }
   43797           0 :         object->out.capabilities = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.capabilities);
   43798           0 :         if (object->out.capabilities == NULL) {
   43799           0 :                 PyErr_NoMemory();
   43800           0 :                 return -1;
   43801             :         }
   43802             :         {
   43803           0 :                 union netr_Capabilities *capabilities_switch_1;
   43804           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");
   43805           0 :                 if (capabilities_switch_1 == NULL) {
   43806           0 :                         return -1;
   43807             :                 }
   43808           0 :                 object->out.capabilities = capabilities_switch_1;
   43809             :         }
   43810           0 :         return 0;
   43811             : }
   43812             : 
   43813           0 : static PyObject *py_netr_LogonGetCapabilities_get_result(PyObject *obj, void *closure)
   43814             : {
   43815           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
   43816           0 :         PyObject *py_result;
   43817           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   43818           0 :         return py_result;
   43819             : }
   43820             : 
   43821           0 : static int py_netr_LogonGetCapabilities_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43822             : {
   43823           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43824           0 :         if (value == NULL) {
   43825           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   43826           0 :                 return -1;
   43827             :         }
   43828           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   43829           0 :         return 0;
   43830             : }
   43831             : 
   43832             : static PyGetSetDef py_netr_LogonGetCapabilities_getsetters[] = {
   43833             :         {
   43834             :                 .name = discard_const_p(char, "in_server_name"),
   43835             :                 .get = py_netr_LogonGetCapabilities_in_get_server_name,
   43836             :                 .set = py_netr_LogonGetCapabilities_in_set_server_name,
   43837             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43838             :         },
   43839             :         {
   43840             :                 .name = discard_const_p(char, "in_computer_name"),
   43841             :                 .get = py_netr_LogonGetCapabilities_in_get_computer_name,
   43842             :                 .set = py_netr_LogonGetCapabilities_in_set_computer_name,
   43843             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43844             :         },
   43845             :         {
   43846             :                 .name = discard_const_p(char, "in_credential"),
   43847             :                 .get = py_netr_LogonGetCapabilities_in_get_credential,
   43848             :                 .set = py_netr_LogonGetCapabilities_in_set_credential,
   43849             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   43850             :         },
   43851             :         {
   43852             :                 .name = discard_const_p(char, "in_return_authenticator"),
   43853             :                 .get = py_netr_LogonGetCapabilities_in_get_return_authenticator,
   43854             :                 .set = py_netr_LogonGetCapabilities_in_set_return_authenticator,
   43855             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   43856             :         },
   43857             :         {
   43858             :                 .name = discard_const_p(char, "out_return_authenticator"),
   43859             :                 .get = py_netr_LogonGetCapabilities_out_get_return_authenticator,
   43860             :                 .set = py_netr_LogonGetCapabilities_out_set_return_authenticator,
   43861             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   43862             :         },
   43863             :         {
   43864             :                 .name = discard_const_p(char, "in_query_level"),
   43865             :                 .get = py_netr_LogonGetCapabilities_in_get_query_level,
   43866             :                 .set = py_netr_LogonGetCapabilities_in_set_query_level,
   43867             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   43868             :         },
   43869             :         {
   43870             :                 .name = discard_const_p(char, "out_capabilities"),
   43871             :                 .get = py_netr_LogonGetCapabilities_out_get_capabilities,
   43872             :                 .set = py_netr_LogonGetCapabilities_out_set_capabilities,
   43873             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Capabilities")
   43874             :         },
   43875             :         {
   43876             :                 .name = discard_const_p(char, "result"),
   43877             :                 .get = py_netr_LogonGetCapabilities_get_result,
   43878             :                 .set = py_netr_LogonGetCapabilities_set_result,
   43879             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   43880             :         },
   43881             :         { .name = NULL }
   43882             : };
   43883             : 
   43884           0 : static PyObject *py_netr_LogonGetCapabilities_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   43885             : {
   43886           0 :         PyObject *self = pytalloc_new(struct netr_LogonGetCapabilities, type);
   43887           0 :         struct netr_LogonGetCapabilities *_self = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(self);
   43888           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   43889           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   43890           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   43891           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   43892           0 :         _self->out.capabilities = talloc_zero(mem_ctx, union netr_Capabilities);
   43893           0 :         return self;
   43894             : }
   43895             : 
   43896           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   43897             : {
   43898             : 
   43899             : 
   43900           0 :         return PyLong_FromLong(21);
   43901             : }
   43902             : 
   43903           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   43904             : {
   43905           0 :         const struct ndr_interface_call *call = NULL;
   43906           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43907           0 :         PyObject *ret = NULL;
   43908           0 :         struct ndr_push *push = NULL;
   43909           0 :         DATA_BLOB blob;
   43910           0 :         enum ndr_err_code err;
   43911             : 
   43912           0 :         if (ndr_table_netlogon.num_calls < 22) {
   43913           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_pack");
   43914           0 :                 return NULL;
   43915             :         }
   43916           0 :         call = &ndr_table_netlogon.calls[21];
   43917             : 
   43918           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   43919           0 :         if (push == NULL) {
   43920           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43921           0 :                 return NULL;
   43922             :         }
   43923             : 
   43924           0 :         push->flags |= ndr_push_flags;
   43925             : 
   43926           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   43927           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43928           0 :                 TALLOC_FREE(push);
   43929           0 :                 PyErr_SetNdrError(err);
   43930           0 :                 return NULL;
   43931             :         }
   43932           0 :         blob = ndr_push_blob(push);
   43933           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   43934           0 :         TALLOC_FREE(push);
   43935           0 :         return ret;
   43936             : }
   43937             : 
   43938           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43939             : {
   43940           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43941           0 :         PyObject *bigendian_obj = NULL;
   43942           0 :         PyObject *ndr64_obj = NULL;
   43943           0 :         libndr_flags ndr_push_flags = 0;
   43944             : 
   43945           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   43946             :                 discard_const_p(char *, kwnames),
   43947             :                 &bigendian_obj,
   43948             :                 &ndr64_obj)) {
   43949           0 :                 return NULL;
   43950             :         }
   43951             : 
   43952           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43953           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43954             :         }
   43955           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43956           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43957             :         }
   43958             : 
   43959           0 :         return py_netr_LogonGetCapabilities_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   43960             : }
   43961             : 
   43962           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43963             : {
   43964           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43965           0 :         PyObject *bigendian_obj = NULL;
   43966           0 :         PyObject *ndr64_obj = NULL;
   43967           0 :         libndr_flags ndr_push_flags = 0;
   43968             : 
   43969           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   43970             :                 discard_const_p(char *, kwnames),
   43971             :                 &bigendian_obj,
   43972             :                 &ndr64_obj)) {
   43973           0 :                 return NULL;
   43974             :         }
   43975             : 
   43976           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43977           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43978             :         }
   43979           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43980           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43981             :         }
   43982             : 
   43983           0 :         return py_netr_LogonGetCapabilities_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   43984             : }
   43985             : 
   43986           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   43987             : {
   43988           0 :         const struct ndr_interface_call *call = NULL;
   43989           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   43990           0 :         struct ndr_pull *pull = NULL;
   43991           0 :         enum ndr_err_code err;
   43992             : 
   43993           0 :         if (ndr_table_netlogon.num_calls < 22) {
   43994           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_unpack");
   43995           0 :                 return NULL;
   43996             :         }
   43997           0 :         call = &ndr_table_netlogon.calls[21];
   43998             : 
   43999           0 :         pull = ndr_pull_init_blob(blob, object);
   44000           0 :         if (pull == NULL) {
   44001           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44002           0 :                 return NULL;
   44003             :         }
   44004             : 
   44005           0 :         pull->flags |= ndr_pull_flags;
   44006             : 
   44007           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44008           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44009           0 :                 TALLOC_FREE(pull);
   44010           0 :                 PyErr_SetNdrError(err);
   44011           0 :                 return NULL;
   44012             :         }
   44013           0 :         if (!allow_remaining) {
   44014           0 :                 uint32_t highest_ofs;
   44015             : 
   44016           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44017           0 :                         highest_ofs = pull->offset;
   44018             :                 } else {
   44019           0 :                         highest_ofs = pull->relative_highest_offset;
   44020             :                 }
   44021           0 :                 if (highest_ofs < pull->data_size) {
   44022           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44023             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44024             :                                 highest_ofs, pull->data_size);
   44025           0 :                         TALLOC_FREE(pull);
   44026           0 :                         PyErr_SetNdrError(err);
   44027           0 :                         return NULL;
   44028             :                 }
   44029             :         }
   44030             : 
   44031           0 :         TALLOC_FREE(pull);
   44032           0 :         Py_RETURN_NONE;
   44033             : }
   44034             : 
   44035           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44036             : {
   44037           0 :         DATA_BLOB blob;
   44038           0 :         Py_ssize_t blob_length = 0;
   44039           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44040           0 :         PyObject *bigendian_obj = NULL;
   44041           0 :         PyObject *ndr64_obj = NULL;
   44042           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44043           0 :         PyObject *allow_remaining_obj = NULL;
   44044           0 :         bool allow_remaining = false;
   44045             : 
   44046           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44047             :                 discard_const_p(char *, kwnames),
   44048             :                 &blob.data, &blob_length,
   44049             :                 &bigendian_obj,
   44050             :                 &ndr64_obj,
   44051             :                 &allow_remaining_obj)) {
   44052           0 :                 return NULL;
   44053             :         }
   44054           0 :         blob.length = blob_length;
   44055             : 
   44056           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44057           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44058             :         }
   44059           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44060           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44061             :         }
   44062             : 
   44063           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44064           0 :                 allow_remaining = true;
   44065             :         }
   44066             : 
   44067           0 :         return py_netr_LogonGetCapabilities_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44068             : }
   44069             : 
   44070           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44071             : {
   44072           0 :         DATA_BLOB blob;
   44073           0 :         Py_ssize_t blob_length = 0;
   44074           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44075           0 :         PyObject *bigendian_obj = NULL;
   44076           0 :         PyObject *ndr64_obj = NULL;
   44077           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44078           0 :         PyObject *allow_remaining_obj = NULL;
   44079           0 :         bool allow_remaining = false;
   44080             : 
   44081           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44082             :                 discard_const_p(char *, kwnames),
   44083             :                 &blob.data, &blob_length,
   44084             :                 &bigendian_obj,
   44085             :                 &ndr64_obj,
   44086             :                 &allow_remaining_obj)) {
   44087           0 :                 return NULL;
   44088             :         }
   44089           0 :         blob.length = blob_length;
   44090             : 
   44091           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44092           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44093             :         }
   44094           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44095           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44096             :         }
   44097             : 
   44098           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44099           0 :                 allow_remaining = true;
   44100             :         }
   44101             : 
   44102           0 :         return py_netr_LogonGetCapabilities_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44103             : }
   44104             : 
   44105           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   44106             : {
   44107           0 :         const struct ndr_interface_call *call = NULL;
   44108           0 :         struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
   44109           0 :         PyObject *ret;
   44110           0 :         char *retstr;
   44111             : 
   44112           0 :         if (ndr_table_netlogon.num_calls < 22) {
   44113           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_print");
   44114           0 :                 return NULL;
   44115             :         }
   44116           0 :         call = &ndr_table_netlogon.calls[21];
   44117             : 
   44118           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44119           0 :         ret = PyUnicode_FromString(retstr);
   44120           0 :         TALLOC_FREE(retstr);
   44121             : 
   44122           0 :         return ret;
   44123             : }
   44124             : 
   44125           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44126             : {
   44127           0 :         return py_netr_LogonGetCapabilities_ndr_print(py_obj, "netr_LogonGetCapabilities_in", NDR_IN);
   44128             : }
   44129             : 
   44130           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44131             : {
   44132           0 :         return py_netr_LogonGetCapabilities_ndr_print(py_obj, "netr_LogonGetCapabilities_out", NDR_OUT);
   44133             : }
   44134             : 
   44135             : static PyMethodDef py_netr_LogonGetCapabilities_methods[] = {
   44136             :         { "opnum", (PyCFunction)py_netr_LogonGetCapabilities_ndr_opnum, METH_NOARGS|METH_CLASS,
   44137             :                 "netlogon.netr_LogonGetCapabilities.opnum() -> 21 (0x15) " },
   44138             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44139             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44140             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44141             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44142             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44143             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44144             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44145             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44146             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonGetCapabilities_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44147             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonGetCapabilities_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44148             :         { NULL, NULL, 0, NULL }
   44149             : };
   44150             : 
   44151             : 
   44152             : static PyTypeObject netr_LogonGetCapabilities_Type = {
   44153             :         PyVarObject_HEAD_INIT(NULL, 0)
   44154             :         .tp_name = "netlogon.netr_LogonGetCapabilities",
   44155             :         .tp_getset = py_netr_LogonGetCapabilities_getsetters,
   44156             :         .tp_methods = py_netr_LogonGetCapabilities_methods,
   44157             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44158             :         .tp_new = py_netr_LogonGetCapabilities_new,
   44159             : };
   44160             : 
   44161           0 : static bool pack_py_netr_LogonGetCapabilities_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetCapabilities *r)
   44162             : {
   44163           0 :         PyObject *py_server_name;
   44164           0 :         PyObject *py_computer_name;
   44165           0 :         PyObject *py_credential;
   44166           0 :         PyObject *py_return_authenticator;
   44167           0 :         PyObject *py_query_level;
   44168           0 :         const char *kwnames[] = {
   44169             :                 "server_name", "computer_name", "credential", "return_authenticator", "query_level", NULL
   44170             :         };
   44171             : 
   44172           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)) {
   44173           0 :                 return false;
   44174             :         }
   44175             : 
   44176           0 :         if (py_server_name == NULL) {
   44177           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   44178           0 :                 return false;
   44179             :         }
   44180           0 :         r->in.server_name = talloc_ptrtype(r, r->in.server_name);
   44181           0 :         if (r->in.server_name == NULL) {
   44182           0 :                 PyErr_NoMemory();
   44183           0 :                 return false;
   44184             :         }
   44185             :         {
   44186           0 :                 const char *test_str;
   44187           0 :                 const char *talloc_str;
   44188           0 :                 PyObject *unicode = NULL;
   44189           0 :                 if (PyUnicode_Check(py_server_name)) {
   44190           0 :                         unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   44191           0 :                         if (unicode == NULL) {
   44192           0 :                                 return false;
   44193             :                         }
   44194           0 :                         test_str = PyBytes_AS_STRING(unicode);
   44195           0 :                 } else if (PyBytes_Check(py_server_name)) {
   44196           0 :                         test_str = PyBytes_AS_STRING(py_server_name);
   44197             :                 } else {
   44198           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   44199           0 :                         return false;
   44200             :                 }
   44201           0 :                 talloc_str = talloc_strdup(r, test_str);
   44202           0 :                 if (unicode != NULL) {
   44203           0 :                         Py_DECREF(unicode);
   44204             :                 }
   44205           0 :                 if (talloc_str == NULL) {
   44206           0 :                         PyErr_NoMemory();
   44207           0 :                         return false;
   44208             :                 }
   44209           0 :                 r->in.server_name = talloc_str;
   44210             :         }
   44211           0 :         if (py_computer_name == NULL) {
   44212           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   44213           0 :                 return false;
   44214             :         }
   44215           0 :         if (py_computer_name == Py_None) {
   44216           0 :                 r->in.computer_name = NULL;
   44217             :         } else {
   44218           0 :                 r->in.computer_name = NULL;
   44219             :                 {
   44220           0 :                         const char *test_str;
   44221           0 :                         const char *talloc_str;
   44222           0 :                         PyObject *unicode = NULL;
   44223           0 :                         if (PyUnicode_Check(py_computer_name)) {
   44224           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   44225           0 :                                 if (unicode == NULL) {
   44226           0 :                                         return false;
   44227             :                                 }
   44228           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44229           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   44230           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   44231             :                         } else {
   44232           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   44233           0 :                                 return false;
   44234             :                         }
   44235           0 :                         talloc_str = talloc_strdup(r, test_str);
   44236           0 :                         if (unicode != NULL) {
   44237           0 :                                 Py_DECREF(unicode);
   44238             :                         }
   44239           0 :                         if (talloc_str == NULL) {
   44240           0 :                                 PyErr_NoMemory();
   44241           0 :                                 return false;
   44242             :                         }
   44243           0 :                         r->in.computer_name = talloc_str;
   44244             :                 }
   44245             :         }
   44246           0 :         if (py_credential == NULL) {
   44247           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   44248           0 :                 return false;
   44249             :         }
   44250           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   44251           0 :         if (r->in.credential == NULL) {
   44252           0 :                 PyErr_NoMemory();
   44253           0 :                 return false;
   44254             :         }
   44255           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   44256           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   44257           0 :                 PyErr_NoMemory();
   44258           0 :                 return false;
   44259             :         }
   44260           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   44261           0 :         if (py_return_authenticator == NULL) {
   44262           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   44263           0 :                 return false;
   44264             :         }
   44265           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   44266           0 :         if (r->in.return_authenticator == NULL) {
   44267           0 :                 PyErr_NoMemory();
   44268           0 :                 return false;
   44269             :         }
   44270           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   44271           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   44272           0 :                 PyErr_NoMemory();
   44273           0 :                 return false;
   44274             :         }
   44275           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   44276           0 :         if (py_query_level == NULL) {
   44277           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.query_level");
   44278           0 :                 return false;
   44279             :         }
   44280             :         {
   44281           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.query_level));
   44282           0 :                 if (PyLong_Check(py_query_level)) {
   44283           0 :                         unsigned long long test_var;
   44284           0 :                         test_var = PyLong_AsUnsignedLongLong(py_query_level);
   44285           0 :                         if (PyErr_Occurred() != NULL) {
   44286           0 :                                 return false;
   44287             :                         }
   44288           0 :                         if (test_var > uint_max) {
   44289           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44290             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44291           0 :                                 return false;
   44292             :                         }
   44293           0 :                         r->in.query_level = test_var;
   44294             :                 } else {
   44295           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44296             :                           PyLong_Type.tp_name);
   44297           0 :                         return false;
   44298             :                 }
   44299             :         }
   44300           0 :         return true;
   44301             : }
   44302             : 
   44303           0 : static PyObject *unpack_py_netr_LogonGetCapabilities_args_out(struct netr_LogonGetCapabilities *r)
   44304             : {
   44305           0 :         PyObject *result;
   44306           0 :         PyObject *py_return_authenticator;
   44307           0 :         PyObject *py_capabilities;
   44308           0 :         result = PyTuple_New(2);
   44309           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   44310           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   44311           0 :         py_capabilities = pyrpc_import_union(&netr_Capabilities_Type, r->out.capabilities, r->in.query_level, r->out.capabilities, "union netr_Capabilities");
   44312           0 :         if (py_capabilities == NULL) {
   44313           0 :                 return NULL;
   44314             :         }
   44315           0 :         PyTuple_SetItem(result, 1, py_capabilities);
   44316           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   44317           0 :                 PyErr_SetNTSTATUS(r->out.result);
   44318           0 :                 return NULL;
   44319             :         }
   44320             : 
   44321           0 :         return result;
   44322             : }
   44323             : 
   44324             : 
   44325           0 : static PyObject *py_netr_LogonGetTrustRid_in_get_server_name(PyObject *obj, void *closure)
   44326             : {
   44327           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(obj);
   44328           0 :         PyObject *py_server_name;
   44329           0 :         if (object->in.server_name == NULL) {
   44330           0 :                 Py_RETURN_NONE;
   44331             :         }
   44332           0 :         if (object->in.server_name == NULL) {
   44333           0 :                 py_server_name = Py_None;
   44334           0 :                 Py_INCREF(py_server_name);
   44335             :         } else {
   44336           0 :                 if (object->in.server_name == NULL) {
   44337           0 :                         py_server_name = Py_None;
   44338           0 :                         Py_INCREF(py_server_name);
   44339             :                 } else {
   44340           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   44341             :                 }
   44342             :         }
   44343           0 :         return py_server_name;
   44344             : }
   44345             : 
   44346           0 : static int py_netr_LogonGetTrustRid_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   44347             : {
   44348           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
   44349           0 :         if (value == NULL) {
   44350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   44351           0 :                 return -1;
   44352             :         }
   44353           0 :         if (value == Py_None) {
   44354           0 :                 object->in.server_name = NULL;
   44355             :         } else {
   44356           0 :                 object->in.server_name = NULL;
   44357             :                 {
   44358           0 :                         const char *test_str;
   44359           0 :                         const char *talloc_str;
   44360           0 :                         PyObject *unicode = NULL;
   44361           0 :                         if (PyUnicode_Check(value)) {
   44362           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44363           0 :                                 if (unicode == NULL) {
   44364           0 :                                         return -1;
   44365             :                                 }
   44366           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44367           0 :                         } else if (PyBytes_Check(value)) {
   44368           0 :                                 test_str = PyBytes_AS_STRING(value);
   44369             :                         } else {
   44370           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44371           0 :                                 return -1;
   44372             :                         }
   44373           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44374           0 :                         if (unicode != NULL) {
   44375           0 :                                 Py_DECREF(unicode);
   44376             :                         }
   44377           0 :                         if (talloc_str == NULL) {
   44378           0 :                                 PyErr_NoMemory();
   44379           0 :                                 return -1;
   44380             :                         }
   44381           0 :                         object->in.server_name = talloc_str;
   44382             :                 }
   44383             :         }
   44384           0 :         return 0;
   44385             : }
   44386             : 
   44387           0 : static PyObject *py_netr_LogonGetTrustRid_in_get_domain_name(PyObject *obj, void *closure)
   44388             : {
   44389           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(obj);
   44390           0 :         PyObject *py_domain_name;
   44391           0 :         if (object->in.domain_name == NULL) {
   44392           0 :                 Py_RETURN_NONE;
   44393             :         }
   44394           0 :         if (object->in.domain_name == NULL) {
   44395           0 :                 py_domain_name = Py_None;
   44396           0 :                 Py_INCREF(py_domain_name);
   44397             :         } else {
   44398           0 :                 if (object->in.domain_name == NULL) {
   44399           0 :                         py_domain_name = Py_None;
   44400           0 :                         Py_INCREF(py_domain_name);
   44401             :                 } else {
   44402           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   44403             :                 }
   44404             :         }
   44405           0 :         return py_domain_name;
   44406             : }
   44407             : 
   44408           0 : static int py_netr_LogonGetTrustRid_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   44409             : {
   44410           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
   44411           0 :         if (value == NULL) {
   44412           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_name");
   44413           0 :                 return -1;
   44414             :         }
   44415           0 :         if (value == Py_None) {
   44416           0 :                 object->in.domain_name = NULL;
   44417             :         } else {
   44418           0 :                 object->in.domain_name = NULL;
   44419             :                 {
   44420           0 :                         const char *test_str;
   44421           0 :                         const char *talloc_str;
   44422           0 :                         PyObject *unicode = NULL;
   44423           0 :                         if (PyUnicode_Check(value)) {
   44424           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44425           0 :                                 if (unicode == NULL) {
   44426           0 :                                         return -1;
   44427             :                                 }
   44428           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44429           0 :                         } else if (PyBytes_Check(value)) {
   44430           0 :                                 test_str = PyBytes_AS_STRING(value);
   44431             :                         } else {
   44432           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44433           0 :                                 return -1;
   44434             :                         }
   44435           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44436           0 :                         if (unicode != NULL) {
   44437           0 :                                 Py_DECREF(unicode);
   44438             :                         }
   44439           0 :                         if (talloc_str == NULL) {
   44440           0 :                                 PyErr_NoMemory();
   44441           0 :                                 return -1;
   44442             :                         }
   44443           0 :                         object->in.domain_name = talloc_str;
   44444             :                 }
   44445             :         }
   44446           0 :         return 0;
   44447             : }
   44448             : 
   44449           0 : static PyObject *py_netr_LogonGetTrustRid_out_get_rid(PyObject *obj, void *closure)
   44450             : {
   44451           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(obj);
   44452           0 :         PyObject *py_rid;
   44453           0 :         if (object->out.rid == NULL) {
   44454           0 :                 Py_RETURN_NONE;
   44455             :         }
   44456           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.rid));
   44457           0 :         return py_rid;
   44458             : }
   44459             : 
   44460           0 : static int py_netr_LogonGetTrustRid_out_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   44461             : {
   44462           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
   44463           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rid));
   44464           0 :         if (value == NULL) {
   44465           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.rid");
   44466           0 :                 return -1;
   44467             :         }
   44468           0 :         object->out.rid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rid);
   44469           0 :         if (object->out.rid == NULL) {
   44470           0 :                 PyErr_NoMemory();
   44471           0 :                 return -1;
   44472             :         }
   44473             :         {
   44474           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.rid));
   44475           0 :                 if (PyLong_Check(value)) {
   44476           0 :                         unsigned long long test_var;
   44477           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44478           0 :                         if (PyErr_Occurred() != NULL) {
   44479           0 :                                 return -1;
   44480             :                         }
   44481           0 :                         if (test_var > uint_max) {
   44482           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44483             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44484           0 :                                 return -1;
   44485             :                         }
   44486           0 :                         *object->out.rid = test_var;
   44487             :                 } else {
   44488           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44489             :                           PyLong_Type.tp_name);
   44490           0 :                         return -1;
   44491             :                 }
   44492             :         }
   44493           0 :         return 0;
   44494             : }
   44495             : 
   44496           0 : static PyObject *py_netr_LogonGetTrustRid_get_result(PyObject *obj, void *closure)
   44497             : {
   44498           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(obj);
   44499           0 :         PyObject *py_result;
   44500           0 :         py_result = PyErr_FromWERROR(object->out.result);
   44501           0 :         return py_result;
   44502             : }
   44503             : 
   44504           0 : static int py_netr_LogonGetTrustRid_set_result(PyObject *py_obj, PyObject *value, void *closure)
   44505             : {
   44506           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
   44507           0 :         if (value == NULL) {
   44508           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   44509           0 :                 return -1;
   44510             :         }
   44511           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   44512           0 :         return 0;
   44513             : }
   44514             : 
   44515             : static PyGetSetDef py_netr_LogonGetTrustRid_getsetters[] = {
   44516             :         {
   44517             :                 .name = discard_const_p(char, "in_server_name"),
   44518             :                 .get = py_netr_LogonGetTrustRid_in_get_server_name,
   44519             :                 .set = py_netr_LogonGetTrustRid_in_set_server_name,
   44520             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44521             :         },
   44522             :         {
   44523             :                 .name = discard_const_p(char, "in_domain_name"),
   44524             :                 .get = py_netr_LogonGetTrustRid_in_get_domain_name,
   44525             :                 .set = py_netr_LogonGetTrustRid_in_set_domain_name,
   44526             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44527             :         },
   44528             :         {
   44529             :                 .name = discard_const_p(char, "out_rid"),
   44530             :                 .get = py_netr_LogonGetTrustRid_out_get_rid,
   44531             :                 .set = py_netr_LogonGetTrustRid_out_set_rid,
   44532             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   44533             :         },
   44534             :         {
   44535             :                 .name = discard_const_p(char, "result"),
   44536             :                 .get = py_netr_LogonGetTrustRid_get_result,
   44537             :                 .set = py_netr_LogonGetTrustRid_set_result,
   44538             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   44539             :         },
   44540             :         { .name = NULL }
   44541             : };
   44542             : 
   44543           0 : static PyObject *py_netr_LogonGetTrustRid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44544             : {
   44545           0 :         PyObject *self = pytalloc_new(struct netr_LogonGetTrustRid, type);
   44546           0 :         struct netr_LogonGetTrustRid *_self = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(self);
   44547           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   44548           0 :         _self->out.rid = talloc_zero(mem_ctx, uint32_t);
   44549           0 :         return self;
   44550             : }
   44551             : 
   44552           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   44553             : {
   44554             : 
   44555             : 
   44556           0 :         return PyLong_FromLong(23);
   44557             : }
   44558             : 
   44559           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   44560             : {
   44561           0 :         const struct ndr_interface_call *call = NULL;
   44562           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
   44563           0 :         PyObject *ret = NULL;
   44564           0 :         struct ndr_push *push = NULL;
   44565           0 :         DATA_BLOB blob;
   44566           0 :         enum ndr_err_code err;
   44567             : 
   44568           0 :         if (ndr_table_netlogon.num_calls < 24) {
   44569           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_pack");
   44570           0 :                 return NULL;
   44571             :         }
   44572           0 :         call = &ndr_table_netlogon.calls[23];
   44573             : 
   44574           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   44575           0 :         if (push == NULL) {
   44576           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44577           0 :                 return NULL;
   44578             :         }
   44579             : 
   44580           0 :         push->flags |= ndr_push_flags;
   44581             : 
   44582           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   44583           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44584           0 :                 TALLOC_FREE(push);
   44585           0 :                 PyErr_SetNdrError(err);
   44586           0 :                 return NULL;
   44587             :         }
   44588           0 :         blob = ndr_push_blob(push);
   44589           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   44590           0 :         TALLOC_FREE(push);
   44591           0 :         return ret;
   44592             : }
   44593             : 
   44594           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44595             : {
   44596           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44597           0 :         PyObject *bigendian_obj = NULL;
   44598           0 :         PyObject *ndr64_obj = NULL;
   44599           0 :         libndr_flags ndr_push_flags = 0;
   44600             : 
   44601           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   44602             :                 discard_const_p(char *, kwnames),
   44603             :                 &bigendian_obj,
   44604             :                 &ndr64_obj)) {
   44605           0 :                 return NULL;
   44606             :         }
   44607             : 
   44608           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44609           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44610             :         }
   44611           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44612           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44613             :         }
   44614             : 
   44615           0 :         return py_netr_LogonGetTrustRid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   44616             : }
   44617             : 
   44618           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44619             : {
   44620           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44621           0 :         PyObject *bigendian_obj = NULL;
   44622           0 :         PyObject *ndr64_obj = NULL;
   44623           0 :         libndr_flags ndr_push_flags = 0;
   44624             : 
   44625           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   44626             :                 discard_const_p(char *, kwnames),
   44627             :                 &bigendian_obj,
   44628             :                 &ndr64_obj)) {
   44629           0 :                 return NULL;
   44630             :         }
   44631             : 
   44632           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44633           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44634             :         }
   44635           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44636           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44637             :         }
   44638             : 
   44639           0 :         return py_netr_LogonGetTrustRid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   44640             : }
   44641             : 
   44642           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   44643             : {
   44644           0 :         const struct ndr_interface_call *call = NULL;
   44645           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
   44646           0 :         struct ndr_pull *pull = NULL;
   44647           0 :         enum ndr_err_code err;
   44648             : 
   44649           0 :         if (ndr_table_netlogon.num_calls < 24) {
   44650           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_unpack");
   44651           0 :                 return NULL;
   44652             :         }
   44653           0 :         call = &ndr_table_netlogon.calls[23];
   44654             : 
   44655           0 :         pull = ndr_pull_init_blob(blob, object);
   44656           0 :         if (pull == NULL) {
   44657           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44658           0 :                 return NULL;
   44659             :         }
   44660             : 
   44661           0 :         pull->flags |= ndr_pull_flags;
   44662             : 
   44663           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44664           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44665           0 :                 TALLOC_FREE(pull);
   44666           0 :                 PyErr_SetNdrError(err);
   44667           0 :                 return NULL;
   44668             :         }
   44669           0 :         if (!allow_remaining) {
   44670           0 :                 uint32_t highest_ofs;
   44671             : 
   44672           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44673           0 :                         highest_ofs = pull->offset;
   44674             :                 } else {
   44675           0 :                         highest_ofs = pull->relative_highest_offset;
   44676             :                 }
   44677           0 :                 if (highest_ofs < pull->data_size) {
   44678           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44679             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44680             :                                 highest_ofs, pull->data_size);
   44681           0 :                         TALLOC_FREE(pull);
   44682           0 :                         PyErr_SetNdrError(err);
   44683           0 :                         return NULL;
   44684             :                 }
   44685             :         }
   44686             : 
   44687           0 :         TALLOC_FREE(pull);
   44688           0 :         Py_RETURN_NONE;
   44689             : }
   44690             : 
   44691           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44692             : {
   44693           0 :         DATA_BLOB blob;
   44694           0 :         Py_ssize_t blob_length = 0;
   44695           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44696           0 :         PyObject *bigendian_obj = NULL;
   44697           0 :         PyObject *ndr64_obj = NULL;
   44698           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44699           0 :         PyObject *allow_remaining_obj = NULL;
   44700           0 :         bool allow_remaining = false;
   44701             : 
   44702           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44703             :                 discard_const_p(char *, kwnames),
   44704             :                 &blob.data, &blob_length,
   44705             :                 &bigendian_obj,
   44706             :                 &ndr64_obj,
   44707             :                 &allow_remaining_obj)) {
   44708           0 :                 return NULL;
   44709             :         }
   44710           0 :         blob.length = blob_length;
   44711             : 
   44712           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44713           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44714             :         }
   44715           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44716           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44717             :         }
   44718             : 
   44719           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44720           0 :                 allow_remaining = true;
   44721             :         }
   44722             : 
   44723           0 :         return py_netr_LogonGetTrustRid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44724             : }
   44725             : 
   44726           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44727             : {
   44728           0 :         DATA_BLOB blob;
   44729           0 :         Py_ssize_t blob_length = 0;
   44730           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44731           0 :         PyObject *bigendian_obj = NULL;
   44732           0 :         PyObject *ndr64_obj = NULL;
   44733           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44734           0 :         PyObject *allow_remaining_obj = NULL;
   44735           0 :         bool allow_remaining = false;
   44736             : 
   44737           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44738             :                 discard_const_p(char *, kwnames),
   44739             :                 &blob.data, &blob_length,
   44740             :                 &bigendian_obj,
   44741             :                 &ndr64_obj,
   44742             :                 &allow_remaining_obj)) {
   44743           0 :                 return NULL;
   44744             :         }
   44745           0 :         blob.length = blob_length;
   44746             : 
   44747           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44748           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44749             :         }
   44750           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44751           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44752             :         }
   44753             : 
   44754           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44755           0 :                 allow_remaining = true;
   44756             :         }
   44757             : 
   44758           0 :         return py_netr_LogonGetTrustRid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44759             : }
   44760             : 
   44761           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   44762             : {
   44763           0 :         const struct ndr_interface_call *call = NULL;
   44764           0 :         struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
   44765           0 :         PyObject *ret;
   44766           0 :         char *retstr;
   44767             : 
   44768           0 :         if (ndr_table_netlogon.num_calls < 24) {
   44769           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_print");
   44770           0 :                 return NULL;
   44771             :         }
   44772           0 :         call = &ndr_table_netlogon.calls[23];
   44773             : 
   44774           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44775           0 :         ret = PyUnicode_FromString(retstr);
   44776           0 :         TALLOC_FREE(retstr);
   44777             : 
   44778           0 :         return ret;
   44779             : }
   44780             : 
   44781           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44782             : {
   44783           0 :         return py_netr_LogonGetTrustRid_ndr_print(py_obj, "netr_LogonGetTrustRid_in", NDR_IN);
   44784             : }
   44785             : 
   44786           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44787             : {
   44788           0 :         return py_netr_LogonGetTrustRid_ndr_print(py_obj, "netr_LogonGetTrustRid_out", NDR_OUT);
   44789             : }
   44790             : 
   44791             : static PyMethodDef py_netr_LogonGetTrustRid_methods[] = {
   44792             :         { "opnum", (PyCFunction)py_netr_LogonGetTrustRid_ndr_opnum, METH_NOARGS|METH_CLASS,
   44793             :                 "netlogon.netr_LogonGetTrustRid.opnum() -> 23 (0x17) " },
   44794             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44795             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44796             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44797             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44798             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44799             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44800             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44801             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44802             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonGetTrustRid_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44803             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonGetTrustRid_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44804             :         { NULL, NULL, 0, NULL }
   44805             : };
   44806             : 
   44807             : 
   44808             : static PyTypeObject netr_LogonGetTrustRid_Type = {
   44809             :         PyVarObject_HEAD_INIT(NULL, 0)
   44810             :         .tp_name = "netlogon.netr_LogonGetTrustRid",
   44811             :         .tp_getset = py_netr_LogonGetTrustRid_getsetters,
   44812             :         .tp_methods = py_netr_LogonGetTrustRid_methods,
   44813             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44814             :         .tp_new = py_netr_LogonGetTrustRid_new,
   44815             : };
   44816             : 
   44817           0 : static bool pack_py_netr_LogonGetTrustRid_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetTrustRid *r)
   44818             : {
   44819           0 :         PyObject *py_server_name;
   44820           0 :         PyObject *py_domain_name;
   44821           0 :         const char *kwnames[] = {
   44822             :                 "server_name", "domain_name", NULL
   44823             :         };
   44824             : 
   44825           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_LogonGetTrustRid", discard_const_p(char *, kwnames), &py_server_name, &py_domain_name)) {
   44826           0 :                 return false;
   44827             :         }
   44828             : 
   44829           0 :         if (py_server_name == NULL) {
   44830           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   44831           0 :                 return false;
   44832             :         }
   44833           0 :         if (py_server_name == Py_None) {
   44834           0 :                 r->in.server_name = NULL;
   44835             :         } else {
   44836           0 :                 r->in.server_name = NULL;
   44837             :                 {
   44838           0 :                         const char *test_str;
   44839           0 :                         const char *talloc_str;
   44840           0 :                         PyObject *unicode = NULL;
   44841           0 :                         if (PyUnicode_Check(py_server_name)) {
   44842           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   44843           0 :                                 if (unicode == NULL) {
   44844           0 :                                         return false;
   44845             :                                 }
   44846           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44847           0 :                         } else if (PyBytes_Check(py_server_name)) {
   44848           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   44849             :                         } else {
   44850           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   44851           0 :                                 return false;
   44852             :                         }
   44853           0 :                         talloc_str = talloc_strdup(r, test_str);
   44854           0 :                         if (unicode != NULL) {
   44855           0 :                                 Py_DECREF(unicode);
   44856             :                         }
   44857           0 :                         if (talloc_str == NULL) {
   44858           0 :                                 PyErr_NoMemory();
   44859           0 :                                 return false;
   44860             :                         }
   44861           0 :                         r->in.server_name = talloc_str;
   44862             :                 }
   44863             :         }
   44864           0 :         if (py_domain_name == NULL) {
   44865           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_name");
   44866           0 :                 return false;
   44867             :         }
   44868           0 :         if (py_domain_name == Py_None) {
   44869           0 :                 r->in.domain_name = NULL;
   44870             :         } else {
   44871           0 :                 r->in.domain_name = NULL;
   44872             :                 {
   44873           0 :                         const char *test_str;
   44874           0 :                         const char *talloc_str;
   44875           0 :                         PyObject *unicode = NULL;
   44876           0 :                         if (PyUnicode_Check(py_domain_name)) {
   44877           0 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   44878           0 :                                 if (unicode == NULL) {
   44879           0 :                                         return false;
   44880             :                                 }
   44881           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44882           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   44883           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   44884             :                         } else {
   44885           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   44886           0 :                                 return false;
   44887             :                         }
   44888           0 :                         talloc_str = talloc_strdup(r, test_str);
   44889           0 :                         if (unicode != NULL) {
   44890           0 :                                 Py_DECREF(unicode);
   44891             :                         }
   44892           0 :                         if (talloc_str == NULL) {
   44893           0 :                                 PyErr_NoMemory();
   44894           0 :                                 return false;
   44895             :                         }
   44896           0 :                         r->in.domain_name = talloc_str;
   44897             :                 }
   44898             :         }
   44899           0 :         return true;
   44900             : }
   44901             : 
   44902           0 : static PyObject *unpack_py_netr_LogonGetTrustRid_args_out(struct netr_LogonGetTrustRid *r)
   44903             : {
   44904           0 :         PyObject *result;
   44905           0 :         PyObject *py_rid;
   44906           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.rid));
   44907           0 :         result = py_rid;
   44908           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   44909           0 :                 PyErr_SetWERROR(r->out.result);
   44910           0 :                 return NULL;
   44911             :         }
   44912             : 
   44913           0 :         return result;
   44914             : }
   44915             : 
   44916             : 
   44917           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_server_name(PyObject *obj, void *closure)
   44918             : {
   44919           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   44920           0 :         PyObject *py_server_name;
   44921           0 :         if (object->in.server_name == NULL) {
   44922           0 :                 Py_RETURN_NONE;
   44923             :         }
   44924           0 :         if (object->in.server_name == NULL) {
   44925           0 :                 py_server_name = Py_None;
   44926           0 :                 Py_INCREF(py_server_name);
   44927             :         } else {
   44928           0 :                 if (object->in.server_name == NULL) {
   44929           0 :                         py_server_name = Py_None;
   44930           0 :                         Py_INCREF(py_server_name);
   44931             :                 } else {
   44932           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   44933             :                 }
   44934             :         }
   44935           0 :         return py_server_name;
   44936             : }
   44937             : 
   44938           0 : static int py_netr_ServerAuthenticate3_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   44939             : {
   44940           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   44941           0 :         if (value == NULL) {
   44942           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   44943           0 :                 return -1;
   44944             :         }
   44945           0 :         if (value == Py_None) {
   44946           0 :                 object->in.server_name = NULL;
   44947             :         } else {
   44948           0 :                 object->in.server_name = NULL;
   44949             :                 {
   44950           0 :                         const char *test_str;
   44951           0 :                         const char *talloc_str;
   44952           0 :                         PyObject *unicode = NULL;
   44953           0 :                         if (PyUnicode_Check(value)) {
   44954           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44955           0 :                                 if (unicode == NULL) {
   44956           0 :                                         return -1;
   44957             :                                 }
   44958           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44959           0 :                         } else if (PyBytes_Check(value)) {
   44960           0 :                                 test_str = PyBytes_AS_STRING(value);
   44961             :                         } else {
   44962           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44963           0 :                                 return -1;
   44964             :                         }
   44965           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44966           0 :                         if (unicode != NULL) {
   44967           0 :                                 Py_DECREF(unicode);
   44968             :                         }
   44969           0 :                         if (talloc_str == NULL) {
   44970           0 :                                 PyErr_NoMemory();
   44971           0 :                                 return -1;
   44972             :                         }
   44973           0 :                         object->in.server_name = talloc_str;
   44974             :                 }
   44975             :         }
   44976           0 :         return 0;
   44977             : }
   44978             : 
   44979           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_account_name(PyObject *obj, void *closure)
   44980             : {
   44981           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   44982           0 :         PyObject *py_account_name;
   44983           0 :         if (object->in.account_name == NULL) {
   44984           0 :                 Py_RETURN_NONE;
   44985             :         }
   44986           0 :         if (object->in.account_name == NULL) {
   44987           0 :                 py_account_name = Py_None;
   44988           0 :                 Py_INCREF(py_account_name);
   44989             :         } else {
   44990           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   44991             :         }
   44992           0 :         return py_account_name;
   44993             : }
   44994             : 
   44995           0 : static int py_netr_ServerAuthenticate3_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   44996             : {
   44997           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   44998           0 :         if (value == NULL) {
   44999           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   45000           0 :                 return -1;
   45001             :         }
   45002           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   45003           0 :         if (object->in.account_name == NULL) {
   45004           0 :                 PyErr_NoMemory();
   45005           0 :                 return -1;
   45006             :         }
   45007             :         {
   45008           0 :                 const char *test_str;
   45009           0 :                 const char *talloc_str;
   45010           0 :                 PyObject *unicode = NULL;
   45011           0 :                 if (PyUnicode_Check(value)) {
   45012           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45013           0 :                         if (unicode == NULL) {
   45014           0 :                                 return -1;
   45015             :                         }
   45016           0 :                         test_str = PyBytes_AS_STRING(unicode);
   45017           0 :                 } else if (PyBytes_Check(value)) {
   45018           0 :                         test_str = PyBytes_AS_STRING(value);
   45019             :                 } else {
   45020           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45021           0 :                         return -1;
   45022             :                 }
   45023           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45024           0 :                 if (unicode != NULL) {
   45025           0 :                         Py_DECREF(unicode);
   45026             :                 }
   45027           0 :                 if (talloc_str == NULL) {
   45028           0 :                         PyErr_NoMemory();
   45029           0 :                         return -1;
   45030             :                 }
   45031           0 :                 object->in.account_name = talloc_str;
   45032             :         }
   45033           0 :         return 0;
   45034             : }
   45035             : 
   45036           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_secure_channel_type(PyObject *obj, void *closure)
   45037             : {
   45038           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   45039           0 :         PyObject *py_secure_channel_type;
   45040           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
   45041           0 :         return py_secure_channel_type;
   45042             : }
   45043             : 
   45044           0 : static int py_netr_ServerAuthenticate3_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   45045             : {
   45046           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45047           0 :         if (value == NULL) {
   45048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
   45049           0 :                 return -1;
   45050             :         }
   45051             :         {
   45052           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   45053           0 :                 if (PyLong_Check(value)) {
   45054           0 :                         unsigned long long test_var;
   45055           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45056           0 :                         if (PyErr_Occurred() != NULL) {
   45057           0 :                                 return -1;
   45058             :                         }
   45059           0 :                         if (test_var > uint_max) {
   45060           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45061             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45062           0 :                                 return -1;
   45063             :                         }
   45064           0 :                         object->in.secure_channel_type = test_var;
   45065             :                 } else {
   45066           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45067             :                           PyLong_Type.tp_name);
   45068           0 :                         return -1;
   45069             :                 }
   45070             :         }
   45071           0 :         return 0;
   45072             : }
   45073             : 
   45074           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_computer_name(PyObject *obj, void *closure)
   45075             : {
   45076           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   45077           0 :         PyObject *py_computer_name;
   45078           0 :         if (object->in.computer_name == NULL) {
   45079           0 :                 Py_RETURN_NONE;
   45080             :         }
   45081           0 :         if (object->in.computer_name == NULL) {
   45082           0 :                 py_computer_name = Py_None;
   45083           0 :                 Py_INCREF(py_computer_name);
   45084             :         } else {
   45085           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   45086             :         }
   45087           0 :         return py_computer_name;
   45088             : }
   45089             : 
   45090           0 : static int py_netr_ServerAuthenticate3_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   45091             : {
   45092           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45093           0 :         if (value == NULL) {
   45094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   45095           0 :                 return -1;
   45096             :         }
   45097           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   45098           0 :         if (object->in.computer_name == NULL) {
   45099           0 :                 PyErr_NoMemory();
   45100           0 :                 return -1;
   45101             :         }
   45102             :         {
   45103           0 :                 const char *test_str;
   45104           0 :                 const char *talloc_str;
   45105           0 :                 PyObject *unicode = NULL;
   45106           0 :                 if (PyUnicode_Check(value)) {
   45107           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45108           0 :                         if (unicode == NULL) {
   45109           0 :                                 return -1;
   45110             :                         }
   45111           0 :                         test_str = PyBytes_AS_STRING(unicode);
   45112           0 :                 } else if (PyBytes_Check(value)) {
   45113           0 :                         test_str = PyBytes_AS_STRING(value);
   45114             :                 } else {
   45115           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45116           0 :                         return -1;
   45117             :                 }
   45118           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45119           0 :                 if (unicode != NULL) {
   45120           0 :                         Py_DECREF(unicode);
   45121             :                 }
   45122           0 :                 if (talloc_str == NULL) {
   45123           0 :                         PyErr_NoMemory();
   45124           0 :                         return -1;
   45125             :                 }
   45126           0 :                 object->in.computer_name = talloc_str;
   45127             :         }
   45128           0 :         return 0;
   45129             : }
   45130             : 
   45131           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_credentials(PyObject *obj, void *closure)
   45132             : {
   45133           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   45134           0 :         PyObject *py_credentials;
   45135           0 :         if (object->in.credentials == NULL) {
   45136           0 :                 Py_RETURN_NONE;
   45137             :         }
   45138           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   45139           0 :         return py_credentials;
   45140             : }
   45141             : 
   45142           0 : static int py_netr_ServerAuthenticate3_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   45143             : {
   45144           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45145           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   45146           0 :         if (value == NULL) {
   45147           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credentials");
   45148           0 :                 return -1;
   45149             :         }
   45150           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   45151           0 :         if (object->in.credentials == NULL) {
   45152           0 :                 PyErr_NoMemory();
   45153           0 :                 return -1;
   45154             :         }
   45155           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   45156           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   45157           0 :                 PyErr_NoMemory();
   45158           0 :                 return -1;
   45159             :         }
   45160           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   45161           0 :         return 0;
   45162             : }
   45163             : 
   45164           0 : static PyObject *py_netr_ServerAuthenticate3_out_get_return_credentials(PyObject *obj, void *closure)
   45165             : {
   45166           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   45167           0 :         PyObject *py_return_credentials;
   45168           0 :         if (object->out.return_credentials == NULL) {
   45169           0 :                 Py_RETURN_NONE;
   45170             :         }
   45171           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   45172           0 :         return py_return_credentials;
   45173             : }
   45174             : 
   45175           0 : static int py_netr_ServerAuthenticate3_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   45176             : {
   45177           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45178           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   45179           0 :         if (value == NULL) {
   45180           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_credentials");
   45181           0 :                 return -1;
   45182             :         }
   45183           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   45184           0 :         if (object->out.return_credentials == NULL) {
   45185           0 :                 PyErr_NoMemory();
   45186           0 :                 return -1;
   45187             :         }
   45188           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   45189           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   45190           0 :                 PyErr_NoMemory();
   45191           0 :                 return -1;
   45192             :         }
   45193           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   45194           0 :         return 0;
   45195             : }
   45196             : 
   45197           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_negotiate_flags(PyObject *obj, void *closure)
   45198             : {
   45199           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   45200           0 :         PyObject *py_negotiate_flags;
   45201           0 :         if (object->in.negotiate_flags == NULL) {
   45202           0 :                 Py_RETURN_NONE;
   45203             :         }
   45204           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.negotiate_flags));
   45205           0 :         return py_negotiate_flags;
   45206             : }
   45207             : 
   45208           0 : static int py_netr_ServerAuthenticate3_in_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   45209             : {
   45210           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45211           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.negotiate_flags));
   45212           0 :         if (value == NULL) {
   45213           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.negotiate_flags");
   45214           0 :                 return -1;
   45215             :         }
   45216           0 :         object->in.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.negotiate_flags);
   45217           0 :         if (object->in.negotiate_flags == NULL) {
   45218           0 :                 PyErr_NoMemory();
   45219           0 :                 return -1;
   45220             :         }
   45221             :         {
   45222           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.negotiate_flags));
   45223           0 :                 if (PyLong_Check(value)) {
   45224           0 :                         unsigned long long test_var;
   45225           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45226           0 :                         if (PyErr_Occurred() != NULL) {
   45227           0 :                                 return -1;
   45228             :                         }
   45229           0 :                         if (test_var > uint_max) {
   45230           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45231             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45232           0 :                                 return -1;
   45233             :                         }
   45234           0 :                         *object->in.negotiate_flags = test_var;
   45235             :                 } else {
   45236           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45237             :                           PyLong_Type.tp_name);
   45238           0 :                         return -1;
   45239             :                 }
   45240             :         }
   45241           0 :         return 0;
   45242             : }
   45243             : 
   45244           0 : static PyObject *py_netr_ServerAuthenticate3_out_get_negotiate_flags(PyObject *obj, void *closure)
   45245             : {
   45246           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   45247           0 :         PyObject *py_negotiate_flags;
   45248           0 :         if (object->out.negotiate_flags == NULL) {
   45249           0 :                 Py_RETURN_NONE;
   45250             :         }
   45251           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.negotiate_flags));
   45252           0 :         return py_negotiate_flags;
   45253             : }
   45254             : 
   45255           0 : static int py_netr_ServerAuthenticate3_out_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   45256             : {
   45257           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45258           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.negotiate_flags));
   45259           0 :         if (value == NULL) {
   45260           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.negotiate_flags");
   45261           0 :                 return -1;
   45262             :         }
   45263           0 :         object->out.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.negotiate_flags);
   45264           0 :         if (object->out.negotiate_flags == NULL) {
   45265           0 :                 PyErr_NoMemory();
   45266           0 :                 return -1;
   45267             :         }
   45268             :         {
   45269           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.negotiate_flags));
   45270           0 :                 if (PyLong_Check(value)) {
   45271           0 :                         unsigned long long test_var;
   45272           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45273           0 :                         if (PyErr_Occurred() != NULL) {
   45274           0 :                                 return -1;
   45275             :                         }
   45276           0 :                         if (test_var > uint_max) {
   45277           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45278             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45279           0 :                                 return -1;
   45280             :                         }
   45281           0 :                         *object->out.negotiate_flags = test_var;
   45282             :                 } else {
   45283           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45284             :                           PyLong_Type.tp_name);
   45285           0 :                         return -1;
   45286             :                 }
   45287             :         }
   45288           0 :         return 0;
   45289             : }
   45290             : 
   45291           0 : static PyObject *py_netr_ServerAuthenticate3_out_get_rid(PyObject *obj, void *closure)
   45292             : {
   45293           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   45294           0 :         PyObject *py_rid;
   45295           0 :         if (object->out.rid == NULL) {
   45296           0 :                 Py_RETURN_NONE;
   45297             :         }
   45298           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.rid));
   45299           0 :         return py_rid;
   45300             : }
   45301             : 
   45302           0 : static int py_netr_ServerAuthenticate3_out_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   45303             : {
   45304           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45305           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rid));
   45306           0 :         if (value == NULL) {
   45307           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.rid");
   45308           0 :                 return -1;
   45309             :         }
   45310           0 :         object->out.rid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rid);
   45311           0 :         if (object->out.rid == NULL) {
   45312           0 :                 PyErr_NoMemory();
   45313           0 :                 return -1;
   45314             :         }
   45315             :         {
   45316           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.rid));
   45317           0 :                 if (PyLong_Check(value)) {
   45318           0 :                         unsigned long long test_var;
   45319           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45320           0 :                         if (PyErr_Occurred() != NULL) {
   45321           0 :                                 return -1;
   45322             :                         }
   45323           0 :                         if (test_var > uint_max) {
   45324           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45325             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45326           0 :                                 return -1;
   45327             :                         }
   45328           0 :                         *object->out.rid = test_var;
   45329             :                 } else {
   45330           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45331             :                           PyLong_Type.tp_name);
   45332           0 :                         return -1;
   45333             :                 }
   45334             :         }
   45335           0 :         return 0;
   45336             : }
   45337             : 
   45338           0 : static PyObject *py_netr_ServerAuthenticate3_get_result(PyObject *obj, void *closure)
   45339             : {
   45340           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
   45341           0 :         PyObject *py_result;
   45342           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   45343           0 :         return py_result;
   45344             : }
   45345             : 
   45346           0 : static int py_netr_ServerAuthenticate3_set_result(PyObject *py_obj, PyObject *value, void *closure)
   45347             : {
   45348           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45349           0 :         if (value == NULL) {
   45350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   45351           0 :                 return -1;
   45352             :         }
   45353           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   45354           0 :         return 0;
   45355             : }
   45356             : 
   45357             : static PyGetSetDef py_netr_ServerAuthenticate3_getsetters[] = {
   45358             :         {
   45359             :                 .name = discard_const_p(char, "in_server_name"),
   45360             :                 .get = py_netr_ServerAuthenticate3_in_get_server_name,
   45361             :                 .set = py_netr_ServerAuthenticate3_in_set_server_name,
   45362             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45363             :         },
   45364             :         {
   45365             :                 .name = discard_const_p(char, "in_account_name"),
   45366             :                 .get = py_netr_ServerAuthenticate3_in_get_account_name,
   45367             :                 .set = py_netr_ServerAuthenticate3_in_set_account_name,
   45368             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45369             :         },
   45370             :         {
   45371             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   45372             :                 .get = py_netr_ServerAuthenticate3_in_get_secure_channel_type,
   45373             :                 .set = py_netr_ServerAuthenticate3_in_set_secure_channel_type,
   45374             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   45375             :         },
   45376             :         {
   45377             :                 .name = discard_const_p(char, "in_computer_name"),
   45378             :                 .get = py_netr_ServerAuthenticate3_in_get_computer_name,
   45379             :                 .set = py_netr_ServerAuthenticate3_in_set_computer_name,
   45380             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45381             :         },
   45382             :         {
   45383             :                 .name = discard_const_p(char, "in_credentials"),
   45384             :                 .get = py_netr_ServerAuthenticate3_in_get_credentials,
   45385             :                 .set = py_netr_ServerAuthenticate3_in_set_credentials,
   45386             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   45387             :         },
   45388             :         {
   45389             :                 .name = discard_const_p(char, "out_return_credentials"),
   45390             :                 .get = py_netr_ServerAuthenticate3_out_get_return_credentials,
   45391             :                 .set = py_netr_ServerAuthenticate3_out_set_return_credentials,
   45392             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   45393             :         },
   45394             :         {
   45395             :                 .name = discard_const_p(char, "in_negotiate_flags"),
   45396             :                 .get = py_netr_ServerAuthenticate3_in_get_negotiate_flags,
   45397             :                 .set = py_netr_ServerAuthenticate3_in_set_negotiate_flags,
   45398             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   45399             :         },
   45400             :         {
   45401             :                 .name = discard_const_p(char, "out_negotiate_flags"),
   45402             :                 .get = py_netr_ServerAuthenticate3_out_get_negotiate_flags,
   45403             :                 .set = py_netr_ServerAuthenticate3_out_set_negotiate_flags,
   45404             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   45405             :         },
   45406             :         {
   45407             :                 .name = discard_const_p(char, "out_rid"),
   45408             :                 .get = py_netr_ServerAuthenticate3_out_get_rid,
   45409             :                 .set = py_netr_ServerAuthenticate3_out_set_rid,
   45410             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45411             :         },
   45412             :         {
   45413             :                 .name = discard_const_p(char, "result"),
   45414             :                 .get = py_netr_ServerAuthenticate3_get_result,
   45415             :                 .set = py_netr_ServerAuthenticate3_set_result,
   45416             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   45417             :         },
   45418             :         { .name = NULL }
   45419             : };
   45420             : 
   45421           0 : static PyObject *py_netr_ServerAuthenticate3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   45422             : {
   45423           0 :         PyObject *self = pytalloc_new(struct netr_ServerAuthenticate3, type);
   45424           0 :         struct netr_ServerAuthenticate3 *_self = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(self);
   45425           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   45426           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   45427           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   45428           0 :         _self->in.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   45429           0 :         _self->out.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   45430           0 :         _self->out.rid = talloc_zero(mem_ctx, uint32_t);
   45431           0 :         return self;
   45432             : }
   45433             : 
   45434           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   45435             : {
   45436             : 
   45437             : 
   45438           0 :         return PyLong_FromLong(26);
   45439             : }
   45440             : 
   45441           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   45442             : {
   45443           0 :         const struct ndr_interface_call *call = NULL;
   45444           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45445           0 :         PyObject *ret = NULL;
   45446           0 :         struct ndr_push *push = NULL;
   45447           0 :         DATA_BLOB blob;
   45448           0 :         enum ndr_err_code err;
   45449             : 
   45450           0 :         if (ndr_table_netlogon.num_calls < 27) {
   45451           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_pack");
   45452           0 :                 return NULL;
   45453             :         }
   45454           0 :         call = &ndr_table_netlogon.calls[26];
   45455             : 
   45456           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   45457           0 :         if (push == NULL) {
   45458           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45459           0 :                 return NULL;
   45460             :         }
   45461             : 
   45462           0 :         push->flags |= ndr_push_flags;
   45463             : 
   45464           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   45465           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45466           0 :                 TALLOC_FREE(push);
   45467           0 :                 PyErr_SetNdrError(err);
   45468           0 :                 return NULL;
   45469             :         }
   45470           0 :         blob = ndr_push_blob(push);
   45471           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   45472           0 :         TALLOC_FREE(push);
   45473           0 :         return ret;
   45474             : }
   45475             : 
   45476           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45477             : {
   45478           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45479           0 :         PyObject *bigendian_obj = NULL;
   45480           0 :         PyObject *ndr64_obj = NULL;
   45481           0 :         libndr_flags ndr_push_flags = 0;
   45482             : 
   45483           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   45484             :                 discard_const_p(char *, kwnames),
   45485             :                 &bigendian_obj,
   45486             :                 &ndr64_obj)) {
   45487           0 :                 return NULL;
   45488             :         }
   45489             : 
   45490           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45491           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45492             :         }
   45493           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45494           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45495             :         }
   45496             : 
   45497           0 :         return py_netr_ServerAuthenticate3_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   45498             : }
   45499             : 
   45500           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45501             : {
   45502           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45503           0 :         PyObject *bigendian_obj = NULL;
   45504           0 :         PyObject *ndr64_obj = NULL;
   45505           0 :         libndr_flags ndr_push_flags = 0;
   45506             : 
   45507           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   45508             :                 discard_const_p(char *, kwnames),
   45509             :                 &bigendian_obj,
   45510             :                 &ndr64_obj)) {
   45511           0 :                 return NULL;
   45512             :         }
   45513             : 
   45514           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45515           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45516             :         }
   45517           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45518           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45519             :         }
   45520             : 
   45521           0 :         return py_netr_ServerAuthenticate3_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   45522             : }
   45523             : 
   45524           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   45525             : {
   45526           0 :         const struct ndr_interface_call *call = NULL;
   45527           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45528           0 :         struct ndr_pull *pull = NULL;
   45529           0 :         enum ndr_err_code err;
   45530             : 
   45531           0 :         if (ndr_table_netlogon.num_calls < 27) {
   45532           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_unpack");
   45533           0 :                 return NULL;
   45534             :         }
   45535           0 :         call = &ndr_table_netlogon.calls[26];
   45536             : 
   45537           0 :         pull = ndr_pull_init_blob(blob, object);
   45538           0 :         if (pull == NULL) {
   45539           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45540           0 :                 return NULL;
   45541             :         }
   45542             : 
   45543           0 :         pull->flags |= ndr_pull_flags;
   45544             : 
   45545           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   45546           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45547           0 :                 TALLOC_FREE(pull);
   45548           0 :                 PyErr_SetNdrError(err);
   45549           0 :                 return NULL;
   45550             :         }
   45551           0 :         if (!allow_remaining) {
   45552           0 :                 uint32_t highest_ofs;
   45553             : 
   45554           0 :                 if (pull->offset > pull->relative_highest_offset) {
   45555           0 :                         highest_ofs = pull->offset;
   45556             :                 } else {
   45557           0 :                         highest_ofs = pull->relative_highest_offset;
   45558             :                 }
   45559           0 :                 if (highest_ofs < pull->data_size) {
   45560           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   45561             :                                 "not all bytes consumed ofs[%u] size[%u]",
   45562             :                                 highest_ofs, pull->data_size);
   45563           0 :                         TALLOC_FREE(pull);
   45564           0 :                         PyErr_SetNdrError(err);
   45565           0 :                         return NULL;
   45566             :                 }
   45567             :         }
   45568             : 
   45569           0 :         TALLOC_FREE(pull);
   45570           0 :         Py_RETURN_NONE;
   45571             : }
   45572             : 
   45573           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45574             : {
   45575           0 :         DATA_BLOB blob;
   45576           0 :         Py_ssize_t blob_length = 0;
   45577           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45578           0 :         PyObject *bigendian_obj = NULL;
   45579           0 :         PyObject *ndr64_obj = NULL;
   45580           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45581           0 :         PyObject *allow_remaining_obj = NULL;
   45582           0 :         bool allow_remaining = false;
   45583             : 
   45584           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   45585             :                 discard_const_p(char *, kwnames),
   45586             :                 &blob.data, &blob_length,
   45587             :                 &bigendian_obj,
   45588             :                 &ndr64_obj,
   45589             :                 &allow_remaining_obj)) {
   45590           0 :                 return NULL;
   45591             :         }
   45592           0 :         blob.length = blob_length;
   45593             : 
   45594           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45595           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45596             :         }
   45597           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45598           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45599             :         }
   45600             : 
   45601           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45602           0 :                 allow_remaining = true;
   45603             :         }
   45604             : 
   45605           0 :         return py_netr_ServerAuthenticate3_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   45606             : }
   45607             : 
   45608           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45609             : {
   45610           0 :         DATA_BLOB blob;
   45611           0 :         Py_ssize_t blob_length = 0;
   45612           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45613           0 :         PyObject *bigendian_obj = NULL;
   45614           0 :         PyObject *ndr64_obj = NULL;
   45615           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45616           0 :         PyObject *allow_remaining_obj = NULL;
   45617           0 :         bool allow_remaining = false;
   45618             : 
   45619           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   45620             :                 discard_const_p(char *, kwnames),
   45621             :                 &blob.data, &blob_length,
   45622             :                 &bigendian_obj,
   45623             :                 &ndr64_obj,
   45624             :                 &allow_remaining_obj)) {
   45625           0 :                 return NULL;
   45626             :         }
   45627           0 :         blob.length = blob_length;
   45628             : 
   45629           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45630           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45631             :         }
   45632           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45633           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45634             :         }
   45635             : 
   45636           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45637           0 :                 allow_remaining = true;
   45638             :         }
   45639             : 
   45640           0 :         return py_netr_ServerAuthenticate3_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   45641             : }
   45642             : 
   45643           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   45644             : {
   45645           0 :         const struct ndr_interface_call *call = NULL;
   45646           0 :         struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
   45647           0 :         PyObject *ret;
   45648           0 :         char *retstr;
   45649             : 
   45650           0 :         if (ndr_table_netlogon.num_calls < 27) {
   45651           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_print");
   45652           0 :                 return NULL;
   45653             :         }
   45654           0 :         call = &ndr_table_netlogon.calls[26];
   45655             : 
   45656           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   45657           0 :         ret = PyUnicode_FromString(retstr);
   45658           0 :         TALLOC_FREE(retstr);
   45659             : 
   45660           0 :         return ret;
   45661             : }
   45662             : 
   45663           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45664             : {
   45665           0 :         return py_netr_ServerAuthenticate3_ndr_print(py_obj, "netr_ServerAuthenticate3_in", NDR_IN);
   45666             : }
   45667             : 
   45668           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45669             : {
   45670           0 :         return py_netr_ServerAuthenticate3_ndr_print(py_obj, "netr_ServerAuthenticate3_out", NDR_OUT);
   45671             : }
   45672             : 
   45673             : static PyMethodDef py_netr_ServerAuthenticate3_methods[] = {
   45674             :         { "opnum", (PyCFunction)py_netr_ServerAuthenticate3_ndr_opnum, METH_NOARGS|METH_CLASS,
   45675             :                 "netlogon.netr_ServerAuthenticate3.opnum() -> 26 (0x1a) " },
   45676             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   45677             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   45678             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   45679             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   45680             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   45681             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   45682             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   45683             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   45684             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerAuthenticate3_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   45685             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerAuthenticate3_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   45686             :         { NULL, NULL, 0, NULL }
   45687             : };
   45688             : 
   45689             : 
   45690             : static PyTypeObject netr_ServerAuthenticate3_Type = {
   45691             :         PyVarObject_HEAD_INIT(NULL, 0)
   45692             :         .tp_name = "netlogon.netr_ServerAuthenticate3",
   45693             :         .tp_getset = py_netr_ServerAuthenticate3_getsetters,
   45694             :         .tp_methods = py_netr_ServerAuthenticate3_methods,
   45695             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   45696             :         .tp_new = py_netr_ServerAuthenticate3_new,
   45697             : };
   45698             : 
   45699           4 : static bool pack_py_netr_ServerAuthenticate3_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate3 *r)
   45700             : {
   45701           0 :         PyObject *py_server_name;
   45702           0 :         PyObject *py_account_name;
   45703           0 :         PyObject *py_secure_channel_type;
   45704           0 :         PyObject *py_computer_name;
   45705           0 :         PyObject *py_credentials;
   45706           0 :         PyObject *py_negotiate_flags;
   45707           4 :         const char *kwnames[] = {
   45708             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credentials", "negotiate_flags", NULL
   45709             :         };
   45710             : 
   45711           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)) {
   45712           0 :                 return false;
   45713             :         }
   45714             : 
   45715           4 :         if (py_server_name == NULL) {
   45716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   45717           0 :                 return false;
   45718             :         }
   45719           4 :         if (py_server_name == Py_None) {
   45720           0 :                 r->in.server_name = NULL;
   45721             :         } else {
   45722           4 :                 r->in.server_name = NULL;
   45723             :                 {
   45724           0 :                         const char *test_str;
   45725           0 :                         const char *talloc_str;
   45726           4 :                         PyObject *unicode = NULL;
   45727           4 :                         if (PyUnicode_Check(py_server_name)) {
   45728           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   45729           4 :                                 if (unicode == NULL) {
   45730           0 :                                         return false;
   45731             :                                 }
   45732           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   45733           0 :                         } else if (PyBytes_Check(py_server_name)) {
   45734           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   45735             :                         } else {
   45736           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   45737           0 :                                 return false;
   45738             :                         }
   45739           4 :                         talloc_str = talloc_strdup(r, test_str);
   45740           4 :                         if (unicode != NULL) {
   45741           4 :                                 Py_DECREF(unicode);
   45742             :                         }
   45743           4 :                         if (talloc_str == NULL) {
   45744           0 :                                 PyErr_NoMemory();
   45745           0 :                                 return false;
   45746             :                         }
   45747           4 :                         r->in.server_name = talloc_str;
   45748             :                 }
   45749             :         }
   45750           4 :         if (py_account_name == NULL) {
   45751           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   45752           0 :                 return false;
   45753             :         }
   45754           4 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   45755           4 :         if (r->in.account_name == NULL) {
   45756           0 :                 PyErr_NoMemory();
   45757           0 :                 return false;
   45758             :         }
   45759             :         {
   45760           0 :                 const char *test_str;
   45761           0 :                 const char *talloc_str;
   45762           4 :                 PyObject *unicode = NULL;
   45763           4 :                 if (PyUnicode_Check(py_account_name)) {
   45764           4 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   45765           4 :                         if (unicode == NULL) {
   45766           0 :                                 return false;
   45767             :                         }
   45768           4 :                         test_str = PyBytes_AS_STRING(unicode);
   45769           0 :                 } else if (PyBytes_Check(py_account_name)) {
   45770           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   45771             :                 } else {
   45772           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   45773           0 :                         return false;
   45774             :                 }
   45775           4 :                 talloc_str = talloc_strdup(r, test_str);
   45776           4 :                 if (unicode != NULL) {
   45777           4 :                         Py_DECREF(unicode);
   45778             :                 }
   45779           4 :                 if (talloc_str == NULL) {
   45780           0 :                         PyErr_NoMemory();
   45781           0 :                         return false;
   45782             :                 }
   45783           4 :                 r->in.account_name = talloc_str;
   45784             :         }
   45785           4 :         if (py_secure_channel_type == NULL) {
   45786           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
   45787           0 :                 return false;
   45788             :         }
   45789             :         {
   45790           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   45791           4 :                 if (PyLong_Check(py_secure_channel_type)) {
   45792           0 :                         unsigned long long test_var;
   45793           4 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   45794           4 :                         if (PyErr_Occurred() != NULL) {
   45795           0 :                                 return false;
   45796             :                         }
   45797           4 :                         if (test_var > uint_max) {
   45798           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45799             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45800           0 :                                 return false;
   45801             :                         }
   45802           4 :                         r->in.secure_channel_type = test_var;
   45803             :                 } else {
   45804           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45805             :                           PyLong_Type.tp_name);
   45806           0 :                         return false;
   45807             :                 }
   45808             :         }
   45809           4 :         if (py_computer_name == NULL) {
   45810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   45811           0 :                 return false;
   45812             :         }
   45813           4 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   45814           4 :         if (r->in.computer_name == NULL) {
   45815           0 :                 PyErr_NoMemory();
   45816           0 :                 return false;
   45817             :         }
   45818             :         {
   45819           0 :                 const char *test_str;
   45820           0 :                 const char *talloc_str;
   45821           4 :                 PyObject *unicode = NULL;
   45822           4 :                 if (PyUnicode_Check(py_computer_name)) {
   45823           4 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   45824           4 :                         if (unicode == NULL) {
   45825           0 :                                 return false;
   45826             :                         }
   45827           4 :                         test_str = PyBytes_AS_STRING(unicode);
   45828           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   45829           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   45830             :                 } else {
   45831           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   45832           0 :                         return false;
   45833             :                 }
   45834           4 :                 talloc_str = talloc_strdup(r, test_str);
   45835           4 :                 if (unicode != NULL) {
   45836           4 :                         Py_DECREF(unicode);
   45837             :                 }
   45838           4 :                 if (talloc_str == NULL) {
   45839           0 :                         PyErr_NoMemory();
   45840           0 :                         return false;
   45841             :                 }
   45842           4 :                 r->in.computer_name = talloc_str;
   45843             :         }
   45844           4 :         if (py_credentials == NULL) {
   45845           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credentials");
   45846           0 :                 return false;
   45847             :         }
   45848           4 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   45849           4 :         if (r->in.credentials == NULL) {
   45850           0 :                 PyErr_NoMemory();
   45851           0 :                 return false;
   45852             :         }
   45853           4 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   45854           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   45855           0 :                 PyErr_NoMemory();
   45856           0 :                 return false;
   45857             :         }
   45858           4 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   45859           4 :         if (py_negotiate_flags == NULL) {
   45860           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.negotiate_flags");
   45861           0 :                 return false;
   45862             :         }
   45863           4 :         r->in.negotiate_flags = talloc_ptrtype(r, r->in.negotiate_flags);
   45864           4 :         if (r->in.negotiate_flags == NULL) {
   45865           0 :                 PyErr_NoMemory();
   45866           0 :                 return false;
   45867             :         }
   45868             :         {
   45869           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.negotiate_flags));
   45870           4 :                 if (PyLong_Check(py_negotiate_flags)) {
   45871           0 :                         unsigned long long test_var;
   45872           4 :                         test_var = PyLong_AsUnsignedLongLong(py_negotiate_flags);
   45873           4 :                         if (PyErr_Occurred() != NULL) {
   45874           0 :                                 return false;
   45875             :                         }
   45876           4 :                         if (test_var > uint_max) {
   45877           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45878             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45879           0 :                                 return false;
   45880             :                         }
   45881           4 :                         *r->in.negotiate_flags = test_var;
   45882             :                 } else {
   45883           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45884             :                           PyLong_Type.tp_name);
   45885           0 :                         return false;
   45886             :                 }
   45887             :         }
   45888           4 :         return true;
   45889             : }
   45890             : 
   45891           4 : static PyObject *unpack_py_netr_ServerAuthenticate3_args_out(struct netr_ServerAuthenticate3 *r)
   45892             : {
   45893           0 :         PyObject *result;
   45894           0 :         PyObject *py_return_credentials;
   45895           0 :         PyObject *py_negotiate_flags;
   45896           0 :         PyObject *py_rid;
   45897           4 :         result = PyTuple_New(3);
   45898           4 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   45899           4 :         PyTuple_SetItem(result, 0, py_return_credentials);
   45900           4 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.negotiate_flags));
   45901           4 :         PyTuple_SetItem(result, 1, py_negotiate_flags);
   45902           4 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.rid));
   45903           4 :         PyTuple_SetItem(result, 2, py_rid);
   45904           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   45905           4 :                 PyErr_SetNTSTATUS(r->out.result);
   45906           4 :                 return NULL;
   45907             :         }
   45908             : 
   45909           0 :         return result;
   45910             : }
   45911             : 
   45912             : 
   45913           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_server_unc(PyObject *obj, void *closure)
   45914             : {
   45915           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
   45916           0 :         PyObject *py_server_unc;
   45917           0 :         if (object->in.server_unc == NULL) {
   45918           0 :                 Py_RETURN_NONE;
   45919             :         }
   45920           0 :         if (object->in.server_unc == NULL) {
   45921           0 :                 py_server_unc = Py_None;
   45922           0 :                 Py_INCREF(py_server_unc);
   45923             :         } else {
   45924           0 :                 if (object->in.server_unc == NULL) {
   45925           0 :                         py_server_unc = Py_None;
   45926           0 :                         Py_INCREF(py_server_unc);
   45927             :                 } else {
   45928           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   45929             :                 }
   45930             :         }
   45931           0 :         return py_server_unc;
   45932             : }
   45933             : 
   45934           0 : static int py_netr_DsRGetDCNameEx_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   45935             : {
   45936           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   45937           0 :         if (value == NULL) {
   45938           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   45939           0 :                 return -1;
   45940             :         }
   45941           0 :         if (value == Py_None) {
   45942           0 :                 object->in.server_unc = NULL;
   45943             :         } else {
   45944           0 :                 object->in.server_unc = NULL;
   45945             :                 {
   45946           0 :                         const char *test_str;
   45947           0 :                         const char *talloc_str;
   45948           0 :                         PyObject *unicode = NULL;
   45949           0 :                         if (PyUnicode_Check(value)) {
   45950           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45951           0 :                                 if (unicode == NULL) {
   45952           0 :                                         return -1;
   45953             :                                 }
   45954           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45955           0 :                         } else if (PyBytes_Check(value)) {
   45956           0 :                                 test_str = PyBytes_AS_STRING(value);
   45957             :                         } else {
   45958           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45959           0 :                                 return -1;
   45960             :                         }
   45961           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45962           0 :                         if (unicode != NULL) {
   45963           0 :                                 Py_DECREF(unicode);
   45964             :                         }
   45965           0 :                         if (talloc_str == NULL) {
   45966           0 :                                 PyErr_NoMemory();
   45967           0 :                                 return -1;
   45968             :                         }
   45969           0 :                         object->in.server_unc = talloc_str;
   45970             :                 }
   45971             :         }
   45972           0 :         return 0;
   45973             : }
   45974             : 
   45975           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_domain_name(PyObject *obj, void *closure)
   45976             : {
   45977           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
   45978           0 :         PyObject *py_domain_name;
   45979           0 :         if (object->in.domain_name == NULL) {
   45980           0 :                 Py_RETURN_NONE;
   45981             :         }
   45982           0 :         if (object->in.domain_name == NULL) {
   45983           0 :                 py_domain_name = Py_None;
   45984           0 :                 Py_INCREF(py_domain_name);
   45985             :         } else {
   45986           0 :                 if (object->in.domain_name == NULL) {
   45987           0 :                         py_domain_name = Py_None;
   45988           0 :                         Py_INCREF(py_domain_name);
   45989             :                 } else {
   45990           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   45991             :                 }
   45992             :         }
   45993           0 :         return py_domain_name;
   45994             : }
   45995             : 
   45996           0 : static int py_netr_DsRGetDCNameEx_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   45997             : {
   45998           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   45999           0 :         if (value == NULL) {
   46000           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_name");
   46001           0 :                 return -1;
   46002             :         }
   46003           0 :         if (value == Py_None) {
   46004           0 :                 object->in.domain_name = NULL;
   46005             :         } else {
   46006           0 :                 object->in.domain_name = NULL;
   46007             :                 {
   46008           0 :                         const char *test_str;
   46009           0 :                         const char *talloc_str;
   46010           0 :                         PyObject *unicode = NULL;
   46011           0 :                         if (PyUnicode_Check(value)) {
   46012           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46013           0 :                                 if (unicode == NULL) {
   46014           0 :                                         return -1;
   46015             :                                 }
   46016           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46017           0 :                         } else if (PyBytes_Check(value)) {
   46018           0 :                                 test_str = PyBytes_AS_STRING(value);
   46019             :                         } else {
   46020           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46021           0 :                                 return -1;
   46022             :                         }
   46023           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46024           0 :                         if (unicode != NULL) {
   46025           0 :                                 Py_DECREF(unicode);
   46026             :                         }
   46027           0 :                         if (talloc_str == NULL) {
   46028           0 :                                 PyErr_NoMemory();
   46029           0 :                                 return -1;
   46030             :                         }
   46031           0 :                         object->in.domain_name = talloc_str;
   46032             :                 }
   46033             :         }
   46034           0 :         return 0;
   46035             : }
   46036             : 
   46037           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_domain_guid(PyObject *obj, void *closure)
   46038             : {
   46039           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
   46040           0 :         PyObject *py_domain_guid;
   46041           0 :         if (object->in.domain_guid == NULL) {
   46042           0 :                 Py_RETURN_NONE;
   46043             :         }
   46044           0 :         if (object->in.domain_guid == NULL) {
   46045           0 :                 py_domain_guid = Py_None;
   46046           0 :                 Py_INCREF(py_domain_guid);
   46047             :         } else {
   46048           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   46049             :         }
   46050           0 :         return py_domain_guid;
   46051             : }
   46052             : 
   46053           0 : static int py_netr_DsRGetDCNameEx_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   46054             : {
   46055           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   46056           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   46057           0 :         if (value == NULL) {
   46058           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_guid");
   46059           0 :                 return -1;
   46060             :         }
   46061           0 :         if (value == Py_None) {
   46062           0 :                 object->in.domain_guid = NULL;
   46063             :         } else {
   46064           0 :                 object->in.domain_guid = NULL;
   46065           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   46066           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   46067           0 :                         PyErr_NoMemory();
   46068           0 :                         return -1;
   46069             :                 }
   46070           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   46071             :         }
   46072           0 :         return 0;
   46073             : }
   46074             : 
   46075           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_site_name(PyObject *obj, void *closure)
   46076             : {
   46077           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
   46078           0 :         PyObject *py_site_name;
   46079           0 :         if (object->in.site_name == NULL) {
   46080           0 :                 Py_RETURN_NONE;
   46081             :         }
   46082           0 :         if (object->in.site_name == NULL) {
   46083           0 :                 py_site_name = Py_None;
   46084           0 :                 Py_INCREF(py_site_name);
   46085             :         } else {
   46086           0 :                 if (object->in.site_name == NULL) {
   46087           0 :                         py_site_name = Py_None;
   46088           0 :                         Py_INCREF(py_site_name);
   46089             :                 } else {
   46090           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   46091             :                 }
   46092             :         }
   46093           0 :         return py_site_name;
   46094             : }
   46095             : 
   46096           0 : static int py_netr_DsRGetDCNameEx_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   46097             : {
   46098           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   46099           0 :         if (value == NULL) {
   46100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.site_name");
   46101           0 :                 return -1;
   46102             :         }
   46103           0 :         if (value == Py_None) {
   46104           0 :                 object->in.site_name = NULL;
   46105             :         } else {
   46106           0 :                 object->in.site_name = NULL;
   46107             :                 {
   46108           0 :                         const char *test_str;
   46109           0 :                         const char *talloc_str;
   46110           0 :                         PyObject *unicode = NULL;
   46111           0 :                         if (PyUnicode_Check(value)) {
   46112           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46113           0 :                                 if (unicode == NULL) {
   46114           0 :                                         return -1;
   46115             :                                 }
   46116           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46117           0 :                         } else if (PyBytes_Check(value)) {
   46118           0 :                                 test_str = PyBytes_AS_STRING(value);
   46119             :                         } else {
   46120           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46121           0 :                                 return -1;
   46122             :                         }
   46123           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46124           0 :                         if (unicode != NULL) {
   46125           0 :                                 Py_DECREF(unicode);
   46126             :                         }
   46127           0 :                         if (talloc_str == NULL) {
   46128           0 :                                 PyErr_NoMemory();
   46129           0 :                                 return -1;
   46130             :                         }
   46131           0 :                         object->in.site_name = talloc_str;
   46132             :                 }
   46133             :         }
   46134           0 :         return 0;
   46135             : }
   46136             : 
   46137           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_flags(PyObject *obj, void *closure)
   46138             : {
   46139           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
   46140           0 :         PyObject *py_flags;
   46141           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
   46142           0 :         return py_flags;
   46143             : }
   46144             : 
   46145           0 : static int py_netr_DsRGetDCNameEx_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   46146             : {
   46147           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   46148           0 :         if (value == NULL) {
   46149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
   46150           0 :                 return -1;
   46151             :         }
   46152             :         {
   46153           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   46154           0 :                 if (PyLong_Check(value)) {
   46155           0 :                         unsigned long long test_var;
   46156           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   46157           0 :                         if (PyErr_Occurred() != NULL) {
   46158           0 :                                 return -1;
   46159             :                         }
   46160           0 :                         if (test_var > uint_max) {
   46161           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46162             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46163           0 :                                 return -1;
   46164             :                         }
   46165           0 :                         object->in.flags = test_var;
   46166             :                 } else {
   46167           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46168             :                           PyLong_Type.tp_name);
   46169           0 :                         return -1;
   46170             :                 }
   46171             :         }
   46172           0 :         return 0;
   46173             : }
   46174             : 
   46175           0 : static PyObject *py_netr_DsRGetDCNameEx_out_get_info(PyObject *obj, void *closure)
   46176             : {
   46177           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
   46178           0 :         PyObject *py_info;
   46179           0 :         if (object->out.info == NULL) {
   46180           0 :                 Py_RETURN_NONE;
   46181             :         }
   46182           0 :         if (*object->out.info == NULL) {
   46183           0 :                 py_info = Py_None;
   46184           0 :                 Py_INCREF(py_info);
   46185             :         } else {
   46186           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
   46187             :         }
   46188           0 :         return py_info;
   46189             : }
   46190             : 
   46191           0 : static int py_netr_DsRGetDCNameEx_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   46192             : {
   46193           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   46194           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   46195           0 :         if (value == NULL) {
   46196           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   46197           0 :                 return -1;
   46198             :         }
   46199           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   46200           0 :         if (object->out.info == NULL) {
   46201           0 :                 PyErr_NoMemory();
   46202           0 :                 return -1;
   46203             :         }
   46204           0 :         if (value == Py_None) {
   46205           0 :                 *object->out.info = NULL;
   46206             :         } else {
   46207           0 :                 *object->out.info = NULL;
   46208           0 :                 PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
   46209           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   46210           0 :                         PyErr_NoMemory();
   46211           0 :                         return -1;
   46212             :                 }
   46213           0 :                 *object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   46214             :         }
   46215           0 :         return 0;
   46216             : }
   46217             : 
   46218           0 : static PyObject *py_netr_DsRGetDCNameEx_get_result(PyObject *obj, void *closure)
   46219             : {
   46220           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
   46221           0 :         PyObject *py_result;
   46222           0 :         py_result = PyErr_FromWERROR(object->out.result);
   46223           0 :         return py_result;
   46224             : }
   46225             : 
   46226           0 : static int py_netr_DsRGetDCNameEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   46227             : {
   46228           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   46229           0 :         if (value == NULL) {
   46230           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   46231           0 :                 return -1;
   46232             :         }
   46233           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   46234           0 :         return 0;
   46235             : }
   46236             : 
   46237             : static PyGetSetDef py_netr_DsRGetDCNameEx_getsetters[] = {
   46238             :         {
   46239             :                 .name = discard_const_p(char, "in_server_unc"),
   46240             :                 .get = py_netr_DsRGetDCNameEx_in_get_server_unc,
   46241             :                 .set = py_netr_DsRGetDCNameEx_in_set_server_unc,
   46242             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46243             :         },
   46244             :         {
   46245             :                 .name = discard_const_p(char, "in_domain_name"),
   46246             :                 .get = py_netr_DsRGetDCNameEx_in_get_domain_name,
   46247             :                 .set = py_netr_DsRGetDCNameEx_in_set_domain_name,
   46248             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46249             :         },
   46250             :         {
   46251             :                 .name = discard_const_p(char, "in_domain_guid"),
   46252             :                 .get = py_netr_DsRGetDCNameEx_in_get_domain_guid,
   46253             :                 .set = py_netr_DsRGetDCNameEx_in_set_domain_guid,
   46254             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   46255             :         },
   46256             :         {
   46257             :                 .name = discard_const_p(char, "in_site_name"),
   46258             :                 .get = py_netr_DsRGetDCNameEx_in_get_site_name,
   46259             :                 .set = py_netr_DsRGetDCNameEx_in_set_site_name,
   46260             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46261             :         },
   46262             :         {
   46263             :                 .name = discard_const_p(char, "in_flags"),
   46264             :                 .get = py_netr_DsRGetDCNameEx_in_get_flags,
   46265             :                 .set = py_netr_DsRGetDCNameEx_in_set_flags,
   46266             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
   46267             :         },
   46268             :         {
   46269             :                 .name = discard_const_p(char, "out_info"),
   46270             :                 .get = py_netr_DsRGetDCNameEx_out_get_info,
   46271             :                 .set = py_netr_DsRGetDCNameEx_out_set_info,
   46272             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   46273             :         },
   46274             :         {
   46275             :                 .name = discard_const_p(char, "result"),
   46276             :                 .get = py_netr_DsRGetDCNameEx_get_result,
   46277             :                 .set = py_netr_DsRGetDCNameEx_set_result,
   46278             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   46279             :         },
   46280             :         { .name = NULL }
   46281             : };
   46282             : 
   46283           0 : static PyObject *py_netr_DsRGetDCNameEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   46284             : {
   46285           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetDCNameEx, type);
   46286           0 :         struct netr_DsRGetDCNameEx *_self = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(self);
   46287           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   46288             :         /* a pointer to a NULL pointer */
   46289           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   46290           0 :         return self;
   46291             : }
   46292             : 
   46293           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   46294             : {
   46295             : 
   46296             : 
   46297           0 :         return PyLong_FromLong(27);
   46298             : }
   46299             : 
   46300           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   46301             : {
   46302           0 :         const struct ndr_interface_call *call = NULL;
   46303           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   46304           0 :         PyObject *ret = NULL;
   46305           0 :         struct ndr_push *push = NULL;
   46306           0 :         DATA_BLOB blob;
   46307           0 :         enum ndr_err_code err;
   46308             : 
   46309           0 :         if (ndr_table_netlogon.num_calls < 28) {
   46310           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_pack");
   46311           0 :                 return NULL;
   46312             :         }
   46313           0 :         call = &ndr_table_netlogon.calls[27];
   46314             : 
   46315           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   46316           0 :         if (push == NULL) {
   46317           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46318           0 :                 return NULL;
   46319             :         }
   46320             : 
   46321           0 :         push->flags |= ndr_push_flags;
   46322             : 
   46323           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   46324           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46325           0 :                 TALLOC_FREE(push);
   46326           0 :                 PyErr_SetNdrError(err);
   46327           0 :                 return NULL;
   46328             :         }
   46329           0 :         blob = ndr_push_blob(push);
   46330           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   46331           0 :         TALLOC_FREE(push);
   46332           0 :         return ret;
   46333             : }
   46334             : 
   46335           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46336             : {
   46337           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46338           0 :         PyObject *bigendian_obj = NULL;
   46339           0 :         PyObject *ndr64_obj = NULL;
   46340           0 :         libndr_flags ndr_push_flags = 0;
   46341             : 
   46342           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   46343             :                 discard_const_p(char *, kwnames),
   46344             :                 &bigendian_obj,
   46345             :                 &ndr64_obj)) {
   46346           0 :                 return NULL;
   46347             :         }
   46348             : 
   46349           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46350           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46351             :         }
   46352           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46353           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46354             :         }
   46355             : 
   46356           0 :         return py_netr_DsRGetDCNameEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   46357             : }
   46358             : 
   46359           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46360             : {
   46361           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46362           0 :         PyObject *bigendian_obj = NULL;
   46363           0 :         PyObject *ndr64_obj = NULL;
   46364           0 :         libndr_flags ndr_push_flags = 0;
   46365             : 
   46366           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   46367             :                 discard_const_p(char *, kwnames),
   46368             :                 &bigendian_obj,
   46369             :                 &ndr64_obj)) {
   46370           0 :                 return NULL;
   46371             :         }
   46372             : 
   46373           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46374           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46375             :         }
   46376           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46377           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46378             :         }
   46379             : 
   46380           0 :         return py_netr_DsRGetDCNameEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   46381             : }
   46382             : 
   46383           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   46384             : {
   46385           0 :         const struct ndr_interface_call *call = NULL;
   46386           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   46387           0 :         struct ndr_pull *pull = NULL;
   46388           0 :         enum ndr_err_code err;
   46389             : 
   46390           0 :         if (ndr_table_netlogon.num_calls < 28) {
   46391           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_unpack");
   46392           0 :                 return NULL;
   46393             :         }
   46394           0 :         call = &ndr_table_netlogon.calls[27];
   46395             : 
   46396           0 :         pull = ndr_pull_init_blob(blob, object);
   46397           0 :         if (pull == NULL) {
   46398           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46399           0 :                 return NULL;
   46400             :         }
   46401             : 
   46402           0 :         pull->flags |= ndr_pull_flags;
   46403             : 
   46404           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   46405           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46406           0 :                 TALLOC_FREE(pull);
   46407           0 :                 PyErr_SetNdrError(err);
   46408           0 :                 return NULL;
   46409             :         }
   46410           0 :         if (!allow_remaining) {
   46411           0 :                 uint32_t highest_ofs;
   46412             : 
   46413           0 :                 if (pull->offset > pull->relative_highest_offset) {
   46414           0 :                         highest_ofs = pull->offset;
   46415             :                 } else {
   46416           0 :                         highest_ofs = pull->relative_highest_offset;
   46417             :                 }
   46418           0 :                 if (highest_ofs < pull->data_size) {
   46419           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   46420             :                                 "not all bytes consumed ofs[%u] size[%u]",
   46421             :                                 highest_ofs, pull->data_size);
   46422           0 :                         TALLOC_FREE(pull);
   46423           0 :                         PyErr_SetNdrError(err);
   46424           0 :                         return NULL;
   46425             :                 }
   46426             :         }
   46427             : 
   46428           0 :         TALLOC_FREE(pull);
   46429           0 :         Py_RETURN_NONE;
   46430             : }
   46431             : 
   46432           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46433             : {
   46434           0 :         DATA_BLOB blob;
   46435           0 :         Py_ssize_t blob_length = 0;
   46436           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46437           0 :         PyObject *bigendian_obj = NULL;
   46438           0 :         PyObject *ndr64_obj = NULL;
   46439           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46440           0 :         PyObject *allow_remaining_obj = NULL;
   46441           0 :         bool allow_remaining = false;
   46442             : 
   46443           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   46444             :                 discard_const_p(char *, kwnames),
   46445             :                 &blob.data, &blob_length,
   46446             :                 &bigendian_obj,
   46447             :                 &ndr64_obj,
   46448             :                 &allow_remaining_obj)) {
   46449           0 :                 return NULL;
   46450             :         }
   46451           0 :         blob.length = blob_length;
   46452             : 
   46453           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46454           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46455             :         }
   46456           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46457           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46458             :         }
   46459             : 
   46460           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46461           0 :                 allow_remaining = true;
   46462             :         }
   46463             : 
   46464           0 :         return py_netr_DsRGetDCNameEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   46465             : }
   46466             : 
   46467           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46468             : {
   46469           0 :         DATA_BLOB blob;
   46470           0 :         Py_ssize_t blob_length = 0;
   46471           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46472           0 :         PyObject *bigendian_obj = NULL;
   46473           0 :         PyObject *ndr64_obj = NULL;
   46474           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46475           0 :         PyObject *allow_remaining_obj = NULL;
   46476           0 :         bool allow_remaining = false;
   46477             : 
   46478           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   46479             :                 discard_const_p(char *, kwnames),
   46480             :                 &blob.data, &blob_length,
   46481             :                 &bigendian_obj,
   46482             :                 &ndr64_obj,
   46483             :                 &allow_remaining_obj)) {
   46484           0 :                 return NULL;
   46485             :         }
   46486           0 :         blob.length = blob_length;
   46487             : 
   46488           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46489           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46490             :         }
   46491           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46492           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46493             :         }
   46494             : 
   46495           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46496           0 :                 allow_remaining = true;
   46497             :         }
   46498             : 
   46499           0 :         return py_netr_DsRGetDCNameEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   46500             : }
   46501             : 
   46502           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   46503             : {
   46504           0 :         const struct ndr_interface_call *call = NULL;
   46505           0 :         struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
   46506           0 :         PyObject *ret;
   46507           0 :         char *retstr;
   46508             : 
   46509           0 :         if (ndr_table_netlogon.num_calls < 28) {
   46510           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_print");
   46511           0 :                 return NULL;
   46512             :         }
   46513           0 :         call = &ndr_table_netlogon.calls[27];
   46514             : 
   46515           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   46516           0 :         ret = PyUnicode_FromString(retstr);
   46517           0 :         TALLOC_FREE(retstr);
   46518             : 
   46519           0 :         return ret;
   46520             : }
   46521             : 
   46522           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46523             : {
   46524           0 :         return py_netr_DsRGetDCNameEx_ndr_print(py_obj, "netr_DsRGetDCNameEx_in", NDR_IN);
   46525             : }
   46526             : 
   46527           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46528             : {
   46529           0 :         return py_netr_DsRGetDCNameEx_ndr_print(py_obj, "netr_DsRGetDCNameEx_out", NDR_OUT);
   46530             : }
   46531             : 
   46532             : static PyMethodDef py_netr_DsRGetDCNameEx_methods[] = {
   46533             :         { "opnum", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   46534             :                 "netlogon.netr_DsRGetDCNameEx.opnum() -> 27 (0x1b) " },
   46535             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   46536             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   46537             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   46538             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   46539             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   46540             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   46541             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   46542             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   46543             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   46544             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   46545             :         { NULL, NULL, 0, NULL }
   46546             : };
   46547             : 
   46548             : 
   46549             : static PyTypeObject netr_DsRGetDCNameEx_Type = {
   46550             :         PyVarObject_HEAD_INIT(NULL, 0)
   46551             :         .tp_name = "netlogon.netr_DsRGetDCNameEx",
   46552             :         .tp_getset = py_netr_DsRGetDCNameEx_getsetters,
   46553             :         .tp_methods = py_netr_DsRGetDCNameEx_methods,
   46554             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   46555             :         .tp_new = py_netr_DsRGetDCNameEx_new,
   46556             : };
   46557             : 
   46558          48 : static bool pack_py_netr_DsRGetDCNameEx_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCNameEx *r)
   46559             : {
   46560           0 :         PyObject *py_server_unc;
   46561           0 :         PyObject *py_domain_name;
   46562           0 :         PyObject *py_domain_guid;
   46563           0 :         PyObject *py_site_name;
   46564           0 :         PyObject *py_flags;
   46565          48 :         const char *kwnames[] = {
   46566             :                 "server_unc", "domain_name", "domain_guid", "site_name", "flags", NULL
   46567             :         };
   46568             : 
   46569          48 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_DsRGetDCNameEx", discard_const_p(char *, kwnames), &py_server_unc, &py_domain_name, &py_domain_guid, &py_site_name, &py_flags)) {
   46570           0 :                 return false;
   46571             :         }
   46572             : 
   46573          48 :         if (py_server_unc == NULL) {
   46574           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   46575           0 :                 return false;
   46576             :         }
   46577          48 :         if (py_server_unc == Py_None) {
   46578           0 :                 r->in.server_unc = NULL;
   46579             :         } else {
   46580          48 :                 r->in.server_unc = NULL;
   46581             :                 {
   46582           0 :                         const char *test_str;
   46583           0 :                         const char *talloc_str;
   46584          48 :                         PyObject *unicode = NULL;
   46585          48 :                         if (PyUnicode_Check(py_server_unc)) {
   46586          48 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   46587          48 :                                 if (unicode == NULL) {
   46588           0 :                                         return false;
   46589             :                                 }
   46590          48 :                                 test_str = PyBytes_AS_STRING(unicode);
   46591           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   46592           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   46593             :                         } else {
   46594           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   46595           0 :                                 return false;
   46596             :                         }
   46597          48 :                         talloc_str = talloc_strdup(r, test_str);
   46598          48 :                         if (unicode != NULL) {
   46599          24 :                                 Py_DECREF(unicode);
   46600             :                         }
   46601          48 :                         if (talloc_str == NULL) {
   46602           0 :                                 PyErr_NoMemory();
   46603           0 :                                 return false;
   46604             :                         }
   46605          48 :                         r->in.server_unc = talloc_str;
   46606             :                 }
   46607             :         }
   46608          48 :         if (py_domain_name == NULL) {
   46609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_name");
   46610           0 :                 return false;
   46611             :         }
   46612          48 :         if (py_domain_name == Py_None) {
   46613           0 :                 r->in.domain_name = NULL;
   46614             :         } else {
   46615          48 :                 r->in.domain_name = NULL;
   46616             :                 {
   46617           0 :                         const char *test_str;
   46618           0 :                         const char *talloc_str;
   46619          48 :                         PyObject *unicode = NULL;
   46620          48 :                         if (PyUnicode_Check(py_domain_name)) {
   46621          48 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   46622          48 :                                 if (unicode == NULL) {
   46623           0 :                                         return false;
   46624             :                                 }
   46625          48 :                                 test_str = PyBytes_AS_STRING(unicode);
   46626           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   46627           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   46628             :                         } else {
   46629           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   46630           0 :                                 return false;
   46631             :                         }
   46632          48 :                         talloc_str = talloc_strdup(r, test_str);
   46633          48 :                         if (unicode != NULL) {
   46634          24 :                                 Py_DECREF(unicode);
   46635             :                         }
   46636          48 :                         if (talloc_str == NULL) {
   46637           0 :                                 PyErr_NoMemory();
   46638           0 :                                 return false;
   46639             :                         }
   46640          48 :                         r->in.domain_name = talloc_str;
   46641             :                 }
   46642             :         }
   46643          48 :         if (py_domain_guid == NULL) {
   46644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_guid");
   46645           0 :                 return false;
   46646             :         }
   46647          48 :         if (py_domain_guid == Py_None) {
   46648          44 :                 r->in.domain_guid = NULL;
   46649             :         } else {
   46650           4 :                 r->in.domain_guid = NULL;
   46651           4 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   46652           4 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   46653           0 :                         PyErr_NoMemory();
   46654           0 :                         return false;
   46655             :                 }
   46656           4 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   46657             :         }
   46658          48 :         if (py_site_name == NULL) {
   46659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.site_name");
   46660           0 :                 return false;
   46661             :         }
   46662          48 :         if (py_site_name == Py_None) {
   46663          32 :                 r->in.site_name = NULL;
   46664             :         } else {
   46665          16 :                 r->in.site_name = NULL;
   46666             :                 {
   46667           0 :                         const char *test_str;
   46668           0 :                         const char *talloc_str;
   46669          16 :                         PyObject *unicode = NULL;
   46670          16 :                         if (PyUnicode_Check(py_site_name)) {
   46671          16 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   46672          16 :                                 if (unicode == NULL) {
   46673           0 :                                         return false;
   46674             :                                 }
   46675          16 :                                 test_str = PyBytes_AS_STRING(unicode);
   46676           0 :                         } else if (PyBytes_Check(py_site_name)) {
   46677           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   46678             :                         } else {
   46679           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   46680           0 :                                 return false;
   46681             :                         }
   46682          16 :                         talloc_str = talloc_strdup(r, test_str);
   46683          16 :                         if (unicode != NULL) {
   46684           8 :                                 Py_DECREF(unicode);
   46685             :                         }
   46686          16 :                         if (talloc_str == NULL) {
   46687           0 :                                 PyErr_NoMemory();
   46688           0 :                                 return false;
   46689             :                         }
   46690          16 :                         r->in.site_name = talloc_str;
   46691             :                 }
   46692             :         }
   46693          48 :         if (py_flags == NULL) {
   46694           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
   46695           0 :                 return false;
   46696             :         }
   46697             :         {
   46698          48 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   46699          48 :                 if (PyLong_Check(py_flags)) {
   46700           0 :                         unsigned long long test_var;
   46701          48 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   46702          48 :                         if (PyErr_Occurred() != NULL) {
   46703           0 :                                 return false;
   46704             :                         }
   46705          48 :                         if (test_var > uint_max) {
   46706           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46707             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46708           0 :                                 return false;
   46709             :                         }
   46710          48 :                         r->in.flags = test_var;
   46711             :                 } else {
   46712           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46713             :                           PyLong_Type.tp_name);
   46714           0 :                         return false;
   46715             :                 }
   46716             :         }
   46717          48 :         return true;
   46718             : }
   46719             : 
   46720          48 : static PyObject *unpack_py_netr_DsRGetDCNameEx_args_out(struct netr_DsRGetDCNameEx *r)
   46721             : {
   46722           0 :         PyObject *result;
   46723           0 :         PyObject *py_info;
   46724          48 :         if (*r->out.info == NULL) {
   46725          12 :                 py_info = Py_None;
   46726           6 :                 Py_INCREF(py_info);
   46727             :         } else {
   46728          36 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
   46729             :         }
   46730          48 :         result = py_info;
   46731          48 :         if (!W_ERROR_IS_OK(r->out.result)) {
   46732          16 :                 PyErr_SetWERROR(r->out.result);
   46733          16 :                 return NULL;
   46734             :         }
   46735             : 
   46736          32 :         return result;
   46737             : }
   46738             : 
   46739             : 
   46740           0 : static PyObject *py_netr_DsRGetSiteName_in_get_computer_name(PyObject *obj, void *closure)
   46741             : {
   46742           0 :         struct netr_DsRGetSiteName *object = pytalloc_get_ptr(obj);
   46743           0 :         PyObject *py_computer_name;
   46744           0 :         if (object->in.computer_name == NULL) {
   46745           0 :                 Py_RETURN_NONE;
   46746             :         }
   46747           0 :         if (object->in.computer_name == NULL) {
   46748           0 :                 py_computer_name = Py_None;
   46749           0 :                 Py_INCREF(py_computer_name);
   46750             :         } else {
   46751           0 :                 if (object->in.computer_name == NULL) {
   46752           0 :                         py_computer_name = Py_None;
   46753           0 :                         Py_INCREF(py_computer_name);
   46754             :                 } else {
   46755           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   46756             :                 }
   46757             :         }
   46758           0 :         return py_computer_name;
   46759             : }
   46760             : 
   46761           0 : static int py_netr_DsRGetSiteName_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   46762             : {
   46763           0 :         struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
   46764           0 :         if (value == NULL) {
   46765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   46766           0 :                 return -1;
   46767             :         }
   46768           0 :         if (value == Py_None) {
   46769           0 :                 object->in.computer_name = NULL;
   46770             :         } else {
   46771           0 :                 object->in.computer_name = NULL;
   46772             :                 {
   46773           0 :                         const char *test_str;
   46774           0 :                         const char *talloc_str;
   46775           0 :                         PyObject *unicode = NULL;
   46776           0 :                         if (PyUnicode_Check(value)) {
   46777           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46778           0 :                                 if (unicode == NULL) {
   46779           0 :                                         return -1;
   46780             :                                 }
   46781           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46782           0 :                         } else if (PyBytes_Check(value)) {
   46783           0 :                                 test_str = PyBytes_AS_STRING(value);
   46784             :                         } else {
   46785           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46786           0 :                                 return -1;
   46787             :                         }
   46788           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46789           0 :                         if (unicode != NULL) {
   46790           0 :                                 Py_DECREF(unicode);
   46791             :                         }
   46792           0 :                         if (talloc_str == NULL) {
   46793           0 :                                 PyErr_NoMemory();
   46794           0 :                                 return -1;
   46795             :                         }
   46796           0 :                         object->in.computer_name = talloc_str;
   46797             :                 }
   46798             :         }
   46799           0 :         return 0;
   46800             : }
   46801             : 
   46802           0 : static PyObject *py_netr_DsRGetSiteName_out_get_site(PyObject *obj, void *closure)
   46803             : {
   46804           0 :         struct netr_DsRGetSiteName *object = pytalloc_get_ptr(obj);
   46805           0 :         PyObject *py_site;
   46806           0 :         if (object->out.site == NULL) {
   46807           0 :                 Py_RETURN_NONE;
   46808             :         }
   46809           0 :         if (*object->out.site == NULL) {
   46810           0 :                 py_site = Py_None;
   46811           0 :                 Py_INCREF(py_site);
   46812             :         } else {
   46813           0 :                 if (*object->out.site == NULL) {
   46814           0 :                         py_site = Py_None;
   46815           0 :                         Py_INCREF(py_site);
   46816             :                 } else {
   46817           0 :                         py_site = PyUnicode_Decode(*object->out.site, strlen(*object->out.site), "utf-8", "ignore");
   46818             :                 }
   46819             :         }
   46820           0 :         return py_site;
   46821             : }
   46822             : 
   46823           0 : static int py_netr_DsRGetSiteName_out_set_site(PyObject *py_obj, PyObject *value, void *closure)
   46824             : {
   46825           0 :         struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
   46826           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.site));
   46827           0 :         if (value == NULL) {
   46828           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.site");
   46829           0 :                 return -1;
   46830             :         }
   46831           0 :         object->out.site = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.site);
   46832           0 :         if (object->out.site == NULL) {
   46833           0 :                 PyErr_NoMemory();
   46834           0 :                 return -1;
   46835             :         }
   46836           0 :         if (value == Py_None) {
   46837           0 :                 *object->out.site = NULL;
   46838             :         } else {
   46839           0 :                 *object->out.site = NULL;
   46840             :                 {
   46841           0 :                         const char *test_str;
   46842           0 :                         const char *talloc_str;
   46843           0 :                         PyObject *unicode = NULL;
   46844           0 :                         if (PyUnicode_Check(value)) {
   46845           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46846           0 :                                 if (unicode == NULL) {
   46847           0 :                                         return -1;
   46848             :                                 }
   46849           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46850           0 :                         } else if (PyBytes_Check(value)) {
   46851           0 :                                 test_str = PyBytes_AS_STRING(value);
   46852             :                         } else {
   46853           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46854           0 :                                 return -1;
   46855             :                         }
   46856           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46857           0 :                         if (unicode != NULL) {
   46858           0 :                                 Py_DECREF(unicode);
   46859             :                         }
   46860           0 :                         if (talloc_str == NULL) {
   46861           0 :                                 PyErr_NoMemory();
   46862           0 :                                 return -1;
   46863             :                         }
   46864           0 :                         *object->out.site = talloc_str;
   46865             :                 }
   46866             :         }
   46867           0 :         return 0;
   46868             : }
   46869             : 
   46870           0 : static PyObject *py_netr_DsRGetSiteName_get_result(PyObject *obj, void *closure)
   46871             : {
   46872           0 :         struct netr_DsRGetSiteName *object = pytalloc_get_ptr(obj);
   46873           0 :         PyObject *py_result;
   46874           0 :         py_result = PyErr_FromWERROR(object->out.result);
   46875           0 :         return py_result;
   46876             : }
   46877             : 
   46878           0 : static int py_netr_DsRGetSiteName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   46879             : {
   46880           0 :         struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
   46881           0 :         if (value == NULL) {
   46882           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   46883           0 :                 return -1;
   46884             :         }
   46885           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   46886           0 :         return 0;
   46887             : }
   46888             : 
   46889             : static PyGetSetDef py_netr_DsRGetSiteName_getsetters[] = {
   46890             :         {
   46891             :                 .name = discard_const_p(char, "in_computer_name"),
   46892             :                 .get = py_netr_DsRGetSiteName_in_get_computer_name,
   46893             :                 .set = py_netr_DsRGetSiteName_in_set_computer_name,
   46894             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46895             :         },
   46896             :         {
   46897             :                 .name = discard_const_p(char, "out_site"),
   46898             :                 .get = py_netr_DsRGetSiteName_out_get_site,
   46899             :                 .set = py_netr_DsRGetSiteName_out_set_site,
   46900             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46901             :         },
   46902             :         {
   46903             :                 .name = discard_const_p(char, "result"),
   46904             :                 .get = py_netr_DsRGetSiteName_get_result,
   46905             :                 .set = py_netr_DsRGetSiteName_set_result,
   46906             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   46907             :         },
   46908             :         { .name = NULL }
   46909             : };
   46910             : 
   46911           0 : static PyObject *py_netr_DsRGetSiteName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   46912             : {
   46913           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetSiteName, type);
   46914           0 :         return self;
   46915             : }
   46916             : 
   46917           0 : static PyObject *py_netr_DsRGetSiteName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   46918             : {
   46919             : 
   46920             : 
   46921           0 :         return PyLong_FromLong(28);
   46922             : }
   46923             : 
   46924           0 : static PyObject *py_netr_DsRGetSiteName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   46925             : {
   46926           0 :         const struct ndr_interface_call *call = NULL;
   46927           0 :         struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
   46928           0 :         PyObject *ret = NULL;
   46929           0 :         struct ndr_push *push = NULL;
   46930           0 :         DATA_BLOB blob;
   46931           0 :         enum ndr_err_code err;
   46932             : 
   46933           0 :         if (ndr_table_netlogon.num_calls < 29) {
   46934           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_pack");
   46935           0 :                 return NULL;
   46936             :         }
   46937           0 :         call = &ndr_table_netlogon.calls[28];
   46938             : 
   46939           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   46940           0 :         if (push == NULL) {
   46941           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46942           0 :                 return NULL;
   46943             :         }
   46944             : 
   46945           0 :         push->flags |= ndr_push_flags;
   46946             : 
   46947           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   46948           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46949           0 :                 TALLOC_FREE(push);
   46950           0 :                 PyErr_SetNdrError(err);
   46951           0 :                 return NULL;
   46952             :         }
   46953           0 :         blob = ndr_push_blob(push);
   46954           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   46955           0 :         TALLOC_FREE(push);
   46956           0 :         return ret;
   46957             : }
   46958             : 
   46959           0 : static PyObject *py_netr_DsRGetSiteName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46960             : {
   46961           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46962           0 :         PyObject *bigendian_obj = NULL;
   46963           0 :         PyObject *ndr64_obj = NULL;
   46964           0 :         libndr_flags ndr_push_flags = 0;
   46965             : 
   46966           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   46967             :                 discard_const_p(char *, kwnames),
   46968             :                 &bigendian_obj,
   46969             :                 &ndr64_obj)) {
   46970           0 :                 return NULL;
   46971             :         }
   46972             : 
   46973           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46974           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46975             :         }
   46976           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46977           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46978             :         }
   46979             : 
   46980           0 :         return py_netr_DsRGetSiteName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   46981             : }
   46982             : 
   46983           0 : static PyObject *py_netr_DsRGetSiteName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46984             : {
   46985           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46986           0 :         PyObject *bigendian_obj = NULL;
   46987           0 :         PyObject *ndr64_obj = NULL;
   46988           0 :         libndr_flags ndr_push_flags = 0;
   46989             : 
   46990           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   46991             :                 discard_const_p(char *, kwnames),
   46992             :                 &bigendian_obj,
   46993             :                 &ndr64_obj)) {
   46994           0 :                 return NULL;
   46995             :         }
   46996             : 
   46997           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46998           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46999             :         }
   47000           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47001           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47002             :         }
   47003             : 
   47004           0 :         return py_netr_DsRGetSiteName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   47005             : }
   47006             : 
   47007           0 : static PyObject *py_netr_DsRGetSiteName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   47008             : {
   47009           0 :         const struct ndr_interface_call *call = NULL;
   47010           0 :         struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
   47011           0 :         struct ndr_pull *pull = NULL;
   47012           0 :         enum ndr_err_code err;
   47013             : 
   47014           0 :         if (ndr_table_netlogon.num_calls < 29) {
   47015           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_unpack");
   47016           0 :                 return NULL;
   47017             :         }
   47018           0 :         call = &ndr_table_netlogon.calls[28];
   47019             : 
   47020           0 :         pull = ndr_pull_init_blob(blob, object);
   47021           0 :         if (pull == NULL) {
   47022           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47023           0 :                 return NULL;
   47024             :         }
   47025             : 
   47026           0 :         pull->flags |= ndr_pull_flags;
   47027             : 
   47028           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   47029           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47030           0 :                 TALLOC_FREE(pull);
   47031           0 :                 PyErr_SetNdrError(err);
   47032           0 :                 return NULL;
   47033             :         }
   47034           0 :         if (!allow_remaining) {
   47035           0 :                 uint32_t highest_ofs;
   47036             : 
   47037           0 :                 if (pull->offset > pull->relative_highest_offset) {
   47038           0 :                         highest_ofs = pull->offset;
   47039             :                 } else {
   47040           0 :                         highest_ofs = pull->relative_highest_offset;
   47041             :                 }
   47042           0 :                 if (highest_ofs < pull->data_size) {
   47043           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   47044             :                                 "not all bytes consumed ofs[%u] size[%u]",
   47045             :                                 highest_ofs, pull->data_size);
   47046           0 :                         TALLOC_FREE(pull);
   47047           0 :                         PyErr_SetNdrError(err);
   47048           0 :                         return NULL;
   47049             :                 }
   47050             :         }
   47051             : 
   47052           0 :         TALLOC_FREE(pull);
   47053           0 :         Py_RETURN_NONE;
   47054             : }
   47055             : 
   47056           0 : static PyObject *py_netr_DsRGetSiteName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47057             : {
   47058           0 :         DATA_BLOB blob;
   47059           0 :         Py_ssize_t blob_length = 0;
   47060           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47061           0 :         PyObject *bigendian_obj = NULL;
   47062           0 :         PyObject *ndr64_obj = NULL;
   47063           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47064           0 :         PyObject *allow_remaining_obj = NULL;
   47065           0 :         bool allow_remaining = false;
   47066             : 
   47067           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   47068             :                 discard_const_p(char *, kwnames),
   47069             :                 &blob.data, &blob_length,
   47070             :                 &bigendian_obj,
   47071             :                 &ndr64_obj,
   47072             :                 &allow_remaining_obj)) {
   47073           0 :                 return NULL;
   47074             :         }
   47075           0 :         blob.length = blob_length;
   47076             : 
   47077           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47078           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47079             :         }
   47080           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47081           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47082             :         }
   47083             : 
   47084           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47085           0 :                 allow_remaining = true;
   47086             :         }
   47087             : 
   47088           0 :         return py_netr_DsRGetSiteName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   47089             : }
   47090             : 
   47091           0 : static PyObject *py_netr_DsRGetSiteName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47092             : {
   47093           0 :         DATA_BLOB blob;
   47094           0 :         Py_ssize_t blob_length = 0;
   47095           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47096           0 :         PyObject *bigendian_obj = NULL;
   47097           0 :         PyObject *ndr64_obj = NULL;
   47098           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47099           0 :         PyObject *allow_remaining_obj = NULL;
   47100           0 :         bool allow_remaining = false;
   47101             : 
   47102           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   47103             :                 discard_const_p(char *, kwnames),
   47104             :                 &blob.data, &blob_length,
   47105             :                 &bigendian_obj,
   47106             :                 &ndr64_obj,
   47107             :                 &allow_remaining_obj)) {
   47108           0 :                 return NULL;
   47109             :         }
   47110           0 :         blob.length = blob_length;
   47111             : 
   47112           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47113           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47114             :         }
   47115           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47116           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47117             :         }
   47118             : 
   47119           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47120           0 :                 allow_remaining = true;
   47121             :         }
   47122             : 
   47123           0 :         return py_netr_DsRGetSiteName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   47124             : }
   47125             : 
   47126           0 : static PyObject *py_netr_DsRGetSiteName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   47127             : {
   47128           0 :         const struct ndr_interface_call *call = NULL;
   47129           0 :         struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
   47130           0 :         PyObject *ret;
   47131           0 :         char *retstr;
   47132             : 
   47133           0 :         if (ndr_table_netlogon.num_calls < 29) {
   47134           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_print");
   47135           0 :                 return NULL;
   47136             :         }
   47137           0 :         call = &ndr_table_netlogon.calls[28];
   47138             : 
   47139           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   47140           0 :         ret = PyUnicode_FromString(retstr);
   47141           0 :         TALLOC_FREE(retstr);
   47142             : 
   47143           0 :         return ret;
   47144             : }
   47145             : 
   47146           0 : static PyObject *py_netr_DsRGetSiteName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47147             : {
   47148           0 :         return py_netr_DsRGetSiteName_ndr_print(py_obj, "netr_DsRGetSiteName_in", NDR_IN);
   47149             : }
   47150             : 
   47151           0 : static PyObject *py_netr_DsRGetSiteName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47152             : {
   47153           0 :         return py_netr_DsRGetSiteName_ndr_print(py_obj, "netr_DsRGetSiteName_out", NDR_OUT);
   47154             : }
   47155             : 
   47156             : static PyMethodDef py_netr_DsRGetSiteName_methods[] = {
   47157             :         { "opnum", (PyCFunction)py_netr_DsRGetSiteName_ndr_opnum, METH_NOARGS|METH_CLASS,
   47158             :                 "netlogon.netr_DsRGetSiteName.opnum() -> 28 (0x1c) " },
   47159             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   47160             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   47161             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   47162             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   47163             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   47164             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   47165             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   47166             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   47167             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetSiteName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   47168             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetSiteName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   47169             :         { NULL, NULL, 0, NULL }
   47170             : };
   47171             : 
   47172             : 
   47173             : static PyTypeObject netr_DsRGetSiteName_Type = {
   47174             :         PyVarObject_HEAD_INIT(NULL, 0)
   47175             :         .tp_name = "netlogon.netr_DsRGetSiteName",
   47176             :         .tp_getset = py_netr_DsRGetSiteName_getsetters,
   47177             :         .tp_methods = py_netr_DsRGetSiteName_methods,
   47178             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   47179             :         .tp_new = py_netr_DsRGetSiteName_new,
   47180             : };
   47181             : 
   47182           0 : static bool pack_py_netr_DsRGetSiteName_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetSiteName *r)
   47183             : {
   47184           0 :         PyObject *py_computer_name;
   47185           0 :         const char *kwnames[] = {
   47186             :                 "computer_name", NULL
   47187             :         };
   47188             : 
   47189           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_DsRGetSiteName", discard_const_p(char *, kwnames), &py_computer_name)) {
   47190           0 :                 return false;
   47191             :         }
   47192             : 
   47193           0 :         if (py_computer_name == NULL) {
   47194           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   47195           0 :                 return false;
   47196             :         }
   47197           0 :         if (py_computer_name == Py_None) {
   47198           0 :                 r->in.computer_name = NULL;
   47199             :         } else {
   47200           0 :                 r->in.computer_name = NULL;
   47201             :                 {
   47202           0 :                         const char *test_str;
   47203           0 :                         const char *talloc_str;
   47204           0 :                         PyObject *unicode = NULL;
   47205           0 :                         if (PyUnicode_Check(py_computer_name)) {
   47206           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   47207           0 :                                 if (unicode == NULL) {
   47208           0 :                                         return false;
   47209             :                                 }
   47210           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47211           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   47212           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   47213             :                         } else {
   47214           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   47215           0 :                                 return false;
   47216             :                         }
   47217           0 :                         talloc_str = talloc_strdup(r, test_str);
   47218           0 :                         if (unicode != NULL) {
   47219           0 :                                 Py_DECREF(unicode);
   47220             :                         }
   47221           0 :                         if (talloc_str == NULL) {
   47222           0 :                                 PyErr_NoMemory();
   47223           0 :                                 return false;
   47224             :                         }
   47225           0 :                         r->in.computer_name = talloc_str;
   47226             :                 }
   47227             :         }
   47228           0 :         return true;
   47229             : }
   47230             : 
   47231           0 : static PyObject *unpack_py_netr_DsRGetSiteName_args_out(struct netr_DsRGetSiteName *r)
   47232             : {
   47233           0 :         PyObject *result;
   47234           0 :         PyObject *py_site;
   47235           0 :         if (*r->out.site == NULL) {
   47236           0 :                 py_site = Py_None;
   47237           0 :                 Py_INCREF(py_site);
   47238             :         } else {
   47239           0 :                 if (*r->out.site == NULL) {
   47240           0 :                         py_site = Py_None;
   47241           0 :                         Py_INCREF(py_site);
   47242             :                 } else {
   47243           0 :                         py_site = PyUnicode_Decode(*r->out.site, strlen(*r->out.site), "utf-8", "ignore");
   47244             :                 }
   47245             :         }
   47246           0 :         result = py_site;
   47247           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   47248           0 :                 PyErr_SetWERROR(r->out.result);
   47249           0 :                 return NULL;
   47250             :         }
   47251             : 
   47252           0 :         return result;
   47253             : }
   47254             : 
   47255             : 
   47256           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_server_name(PyObject *obj, void *closure)
   47257             : {
   47258           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
   47259           0 :         PyObject *py_server_name;
   47260           0 :         if (object->in.server_name == NULL) {
   47261           0 :                 Py_RETURN_NONE;
   47262             :         }
   47263           0 :         if (object->in.server_name == NULL) {
   47264           0 :                 py_server_name = Py_None;
   47265           0 :                 Py_INCREF(py_server_name);
   47266             :         } else {
   47267           0 :                 py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   47268             :         }
   47269           0 :         return py_server_name;
   47270             : }
   47271             : 
   47272           0 : static int py_netr_LogonGetDomainInfo_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   47273             : {
   47274           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47275           0 :         if (value == NULL) {
   47276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   47277           0 :                 return -1;
   47278             :         }
   47279           0 :         object->in.server_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server_name);
   47280           0 :         if (object->in.server_name == NULL) {
   47281           0 :                 PyErr_NoMemory();
   47282           0 :                 return -1;
   47283             :         }
   47284             :         {
   47285           0 :                 const char *test_str;
   47286           0 :                 const char *talloc_str;
   47287           0 :                 PyObject *unicode = NULL;
   47288           0 :                 if (PyUnicode_Check(value)) {
   47289           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47290           0 :                         if (unicode == NULL) {
   47291           0 :                                 return -1;
   47292             :                         }
   47293           0 :                         test_str = PyBytes_AS_STRING(unicode);
   47294           0 :                 } else if (PyBytes_Check(value)) {
   47295           0 :                         test_str = PyBytes_AS_STRING(value);
   47296             :                 } else {
   47297           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47298           0 :                         return -1;
   47299             :                 }
   47300           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47301           0 :                 if (unicode != NULL) {
   47302           0 :                         Py_DECREF(unicode);
   47303             :                 }
   47304           0 :                 if (talloc_str == NULL) {
   47305           0 :                         PyErr_NoMemory();
   47306           0 :                         return -1;
   47307             :                 }
   47308           0 :                 object->in.server_name = talloc_str;
   47309             :         }
   47310           0 :         return 0;
   47311             : }
   47312             : 
   47313           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_computer_name(PyObject *obj, void *closure)
   47314             : {
   47315           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
   47316           0 :         PyObject *py_computer_name;
   47317           0 :         if (object->in.computer_name == NULL) {
   47318           0 :                 Py_RETURN_NONE;
   47319             :         }
   47320           0 :         if (object->in.computer_name == NULL) {
   47321           0 :                 py_computer_name = Py_None;
   47322           0 :                 Py_INCREF(py_computer_name);
   47323             :         } else {
   47324           0 :                 if (object->in.computer_name == NULL) {
   47325           0 :                         py_computer_name = Py_None;
   47326           0 :                         Py_INCREF(py_computer_name);
   47327             :                 } else {
   47328           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   47329             :                 }
   47330             :         }
   47331           0 :         return py_computer_name;
   47332             : }
   47333             : 
   47334           0 : static int py_netr_LogonGetDomainInfo_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   47335             : {
   47336           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47337           0 :         if (value == NULL) {
   47338           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   47339           0 :                 return -1;
   47340             :         }
   47341           0 :         if (value == Py_None) {
   47342           0 :                 object->in.computer_name = NULL;
   47343             :         } else {
   47344           0 :                 object->in.computer_name = NULL;
   47345             :                 {
   47346           0 :                         const char *test_str;
   47347           0 :                         const char *talloc_str;
   47348           0 :                         PyObject *unicode = NULL;
   47349           0 :                         if (PyUnicode_Check(value)) {
   47350           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47351           0 :                                 if (unicode == NULL) {
   47352           0 :                                         return -1;
   47353             :                                 }
   47354           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47355           0 :                         } else if (PyBytes_Check(value)) {
   47356           0 :                                 test_str = PyBytes_AS_STRING(value);
   47357             :                         } else {
   47358           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47359           0 :                                 return -1;
   47360             :                         }
   47361           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47362           0 :                         if (unicode != NULL) {
   47363           0 :                                 Py_DECREF(unicode);
   47364             :                         }
   47365           0 :                         if (talloc_str == NULL) {
   47366           0 :                                 PyErr_NoMemory();
   47367           0 :                                 return -1;
   47368             :                         }
   47369           0 :                         object->in.computer_name = talloc_str;
   47370             :                 }
   47371             :         }
   47372           0 :         return 0;
   47373             : }
   47374             : 
   47375           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_credential(PyObject *obj, void *closure)
   47376             : {
   47377           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
   47378           0 :         PyObject *py_credential;
   47379           0 :         if (object->in.credential == NULL) {
   47380           0 :                 Py_RETURN_NONE;
   47381             :         }
   47382           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   47383           0 :         return py_credential;
   47384             : }
   47385             : 
   47386           0 : static int py_netr_LogonGetDomainInfo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   47387             : {
   47388           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47389           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   47390           0 :         if (value == NULL) {
   47391           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   47392           0 :                 return -1;
   47393             :         }
   47394           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   47395           0 :         if (object->in.credential == NULL) {
   47396           0 :                 PyErr_NoMemory();
   47397           0 :                 return -1;
   47398             :         }
   47399           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   47400           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47401           0 :                 PyErr_NoMemory();
   47402           0 :                 return -1;
   47403             :         }
   47404           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   47405           0 :         return 0;
   47406             : }
   47407             : 
   47408           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_return_authenticator(PyObject *obj, void *closure)
   47409             : {
   47410           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
   47411           0 :         PyObject *py_return_authenticator;
   47412           0 :         if (object->in.return_authenticator == NULL) {
   47413           0 :                 Py_RETURN_NONE;
   47414             :         }
   47415           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   47416           0 :         return py_return_authenticator;
   47417             : }
   47418             : 
   47419           0 : static int py_netr_LogonGetDomainInfo_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   47420             : {
   47421           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47422           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   47423           0 :         if (value == NULL) {
   47424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   47425           0 :                 return -1;
   47426             :         }
   47427           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   47428           0 :         if (object->in.return_authenticator == NULL) {
   47429           0 :                 PyErr_NoMemory();
   47430           0 :                 return -1;
   47431             :         }
   47432           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   47433           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47434           0 :                 PyErr_NoMemory();
   47435           0 :                 return -1;
   47436             :         }
   47437           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   47438           0 :         return 0;
   47439             : }
   47440             : 
   47441           0 : static PyObject *py_netr_LogonGetDomainInfo_out_get_return_authenticator(PyObject *obj, void *closure)
   47442             : {
   47443           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
   47444           0 :         PyObject *py_return_authenticator;
   47445           0 :         if (object->out.return_authenticator == NULL) {
   47446           0 :                 Py_RETURN_NONE;
   47447             :         }
   47448           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   47449           0 :         return py_return_authenticator;
   47450             : }
   47451             : 
   47452           0 : static int py_netr_LogonGetDomainInfo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   47453             : {
   47454           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47455           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   47456           0 :         if (value == NULL) {
   47457           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   47458           0 :                 return -1;
   47459             :         }
   47460           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   47461           0 :         if (object->out.return_authenticator == NULL) {
   47462           0 :                 PyErr_NoMemory();
   47463           0 :                 return -1;
   47464             :         }
   47465           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   47466           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47467           0 :                 PyErr_NoMemory();
   47468           0 :                 return -1;
   47469             :         }
   47470           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   47471           0 :         return 0;
   47472             : }
   47473             : 
   47474           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_level(PyObject *obj, void *closure)
   47475             : {
   47476           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
   47477           0 :         PyObject *py_level;
   47478           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   47479           0 :         return py_level;
   47480             : }
   47481             : 
   47482           0 : static int py_netr_LogonGetDomainInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   47483             : {
   47484           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47485           0 :         if (value == NULL) {
   47486           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   47487           0 :                 return -1;
   47488             :         }
   47489             :         {
   47490           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   47491           0 :                 if (PyLong_Check(value)) {
   47492           0 :                         unsigned long long test_var;
   47493           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   47494           0 :                         if (PyErr_Occurred() != NULL) {
   47495           0 :                                 return -1;
   47496             :                         }
   47497           0 :                         if (test_var > uint_max) {
   47498           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47499             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47500           0 :                                 return -1;
   47501             :                         }
   47502           0 :                         object->in.level = test_var;
   47503             :                 } else {
   47504           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47505             :                           PyLong_Type.tp_name);
   47506           0 :                         return -1;
   47507             :                 }
   47508             :         }
   47509           0 :         return 0;
   47510             : }
   47511             : 
   47512           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_query(PyObject *obj, void *closure)
   47513             : {
   47514           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
   47515           0 :         PyObject *py_query;
   47516           0 :         if (object->in.query == NULL) {
   47517           0 :                 Py_RETURN_NONE;
   47518             :         }
   47519           0 :         py_query = pyrpc_import_union(&netr_WorkstationInfo_Type, object->in.query, object->in.level, object->in.query, "union netr_WorkstationInfo");
   47520           0 :         if (py_query == NULL) {
   47521           0 :                 return NULL;
   47522             :         }
   47523           0 :         return py_query;
   47524             : }
   47525             : 
   47526           0 : static int py_netr_LogonGetDomainInfo_in_set_query(PyObject *py_obj, PyObject *value, void *closure)
   47527             : {
   47528           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47529           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.query));
   47530           0 :         if (value == NULL) {
   47531           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.query");
   47532           0 :                 return -1;
   47533             :         }
   47534           0 :         object->in.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.query);
   47535           0 :         if (object->in.query == NULL) {
   47536           0 :                 PyErr_NoMemory();
   47537           0 :                 return -1;
   47538             :         }
   47539             :         {
   47540           0 :                 union netr_WorkstationInfo *query_switch_1;
   47541           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");
   47542           0 :                 if (query_switch_1 == NULL) {
   47543           0 :                         return -1;
   47544             :                 }
   47545           0 :                 object->in.query = query_switch_1;
   47546             :         }
   47547           0 :         return 0;
   47548             : }
   47549             : 
   47550           0 : static PyObject *py_netr_LogonGetDomainInfo_out_get_info(PyObject *obj, void *closure)
   47551             : {
   47552           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
   47553           0 :         PyObject *py_info;
   47554           0 :         if (object->out.info == NULL) {
   47555           0 :                 Py_RETURN_NONE;
   47556             :         }
   47557           0 :         py_info = pyrpc_import_union(&netr_DomainInfo_Type, object->out.info, object->in.level, object->out.info, "union netr_DomainInfo");
   47558           0 :         if (py_info == NULL) {
   47559           0 :                 return NULL;
   47560             :         }
   47561           0 :         return py_info;
   47562             : }
   47563             : 
   47564           0 : static int py_netr_LogonGetDomainInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   47565             : {
   47566           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47567           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   47568           0 :         if (value == NULL) {
   47569           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   47570           0 :                 return -1;
   47571             :         }
   47572           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   47573           0 :         if (object->out.info == NULL) {
   47574           0 :                 PyErr_NoMemory();
   47575           0 :                 return -1;
   47576             :         }
   47577             :         {
   47578           0 :                 union netr_DomainInfo *info_switch_1;
   47579           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");
   47580           0 :                 if (info_switch_1 == NULL) {
   47581           0 :                         return -1;
   47582             :                 }
   47583           0 :                 object->out.info = info_switch_1;
   47584             :         }
   47585           0 :         return 0;
   47586             : }
   47587             : 
   47588           0 : static PyObject *py_netr_LogonGetDomainInfo_get_result(PyObject *obj, void *closure)
   47589             : {
   47590           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
   47591           0 :         PyObject *py_result;
   47592           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   47593           0 :         return py_result;
   47594             : }
   47595             : 
   47596           0 : static int py_netr_LogonGetDomainInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   47597             : {
   47598           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47599           0 :         if (value == NULL) {
   47600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   47601           0 :                 return -1;
   47602             :         }
   47603           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   47604           0 :         return 0;
   47605             : }
   47606             : 
   47607             : static PyGetSetDef py_netr_LogonGetDomainInfo_getsetters[] = {
   47608             :         {
   47609             :                 .name = discard_const_p(char, "in_server_name"),
   47610             :                 .get = py_netr_LogonGetDomainInfo_in_get_server_name,
   47611             :                 .set = py_netr_LogonGetDomainInfo_in_set_server_name,
   47612             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47613             :         },
   47614             :         {
   47615             :                 .name = discard_const_p(char, "in_computer_name"),
   47616             :                 .get = py_netr_LogonGetDomainInfo_in_get_computer_name,
   47617             :                 .set = py_netr_LogonGetDomainInfo_in_set_computer_name,
   47618             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47619             :         },
   47620             :         {
   47621             :                 .name = discard_const_p(char, "in_credential"),
   47622             :                 .get = py_netr_LogonGetDomainInfo_in_get_credential,
   47623             :                 .set = py_netr_LogonGetDomainInfo_in_set_credential,
   47624             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   47625             :         },
   47626             :         {
   47627             :                 .name = discard_const_p(char, "in_return_authenticator"),
   47628             :                 .get = py_netr_LogonGetDomainInfo_in_get_return_authenticator,
   47629             :                 .set = py_netr_LogonGetDomainInfo_in_set_return_authenticator,
   47630             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   47631             :         },
   47632             :         {
   47633             :                 .name = discard_const_p(char, "out_return_authenticator"),
   47634             :                 .get = py_netr_LogonGetDomainInfo_out_get_return_authenticator,
   47635             :                 .set = py_netr_LogonGetDomainInfo_out_set_return_authenticator,
   47636             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   47637             :         },
   47638             :         {
   47639             :                 .name = discard_const_p(char, "in_level"),
   47640             :                 .get = py_netr_LogonGetDomainInfo_in_get_level,
   47641             :                 .set = py_netr_LogonGetDomainInfo_in_set_level,
   47642             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   47643             :         },
   47644             :         {
   47645             :                 .name = discard_const_p(char, "in_query"),
   47646             :                 .get = py_netr_LogonGetDomainInfo_in_get_query,
   47647             :                 .set = py_netr_LogonGetDomainInfo_in_set_query,
   47648             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationInfo")
   47649             :         },
   47650             :         {
   47651             :                 .name = discard_const_p(char, "out_info"),
   47652             :                 .get = py_netr_LogonGetDomainInfo_out_get_info,
   47653             :                 .set = py_netr_LogonGetDomainInfo_out_set_info,
   47654             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainInfo")
   47655             :         },
   47656             :         {
   47657             :                 .name = discard_const_p(char, "result"),
   47658             :                 .get = py_netr_LogonGetDomainInfo_get_result,
   47659             :                 .set = py_netr_LogonGetDomainInfo_set_result,
   47660             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   47661             :         },
   47662             :         { .name = NULL }
   47663             : };
   47664             : 
   47665           0 : static PyObject *py_netr_LogonGetDomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   47666             : {
   47667           0 :         PyObject *self = pytalloc_new(struct netr_LogonGetDomainInfo, type);
   47668           0 :         struct netr_LogonGetDomainInfo *_self = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(self);
   47669           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   47670           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   47671           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   47672           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   47673           0 :         _self->in.query = talloc_zero(mem_ctx, union netr_WorkstationInfo);
   47674           0 :         _self->out.info = talloc_zero(mem_ctx, union netr_DomainInfo);
   47675           0 :         return self;
   47676             : }
   47677             : 
   47678           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   47679             : {
   47680             : 
   47681             : 
   47682           0 :         return PyLong_FromLong(29);
   47683             : }
   47684             : 
   47685           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   47686             : {
   47687           0 :         const struct ndr_interface_call *call = NULL;
   47688           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47689           0 :         PyObject *ret = NULL;
   47690           0 :         struct ndr_push *push = NULL;
   47691           0 :         DATA_BLOB blob;
   47692           0 :         enum ndr_err_code err;
   47693             : 
   47694           0 :         if (ndr_table_netlogon.num_calls < 30) {
   47695           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_pack");
   47696           0 :                 return NULL;
   47697             :         }
   47698           0 :         call = &ndr_table_netlogon.calls[29];
   47699             : 
   47700           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   47701           0 :         if (push == NULL) {
   47702           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47703           0 :                 return NULL;
   47704             :         }
   47705             : 
   47706           0 :         push->flags |= ndr_push_flags;
   47707             : 
   47708           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   47709           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47710           0 :                 TALLOC_FREE(push);
   47711           0 :                 PyErr_SetNdrError(err);
   47712           0 :                 return NULL;
   47713             :         }
   47714           0 :         blob = ndr_push_blob(push);
   47715           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   47716           0 :         TALLOC_FREE(push);
   47717           0 :         return ret;
   47718             : }
   47719             : 
   47720           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47721             : {
   47722           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47723           0 :         PyObject *bigendian_obj = NULL;
   47724           0 :         PyObject *ndr64_obj = NULL;
   47725           0 :         libndr_flags ndr_push_flags = 0;
   47726             : 
   47727           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   47728             :                 discard_const_p(char *, kwnames),
   47729             :                 &bigendian_obj,
   47730             :                 &ndr64_obj)) {
   47731           0 :                 return NULL;
   47732             :         }
   47733             : 
   47734           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47735           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47736             :         }
   47737           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47738           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47739             :         }
   47740             : 
   47741           0 :         return py_netr_LogonGetDomainInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   47742             : }
   47743             : 
   47744           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47745             : {
   47746           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47747           0 :         PyObject *bigendian_obj = NULL;
   47748           0 :         PyObject *ndr64_obj = NULL;
   47749           0 :         libndr_flags ndr_push_flags = 0;
   47750             : 
   47751           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   47752             :                 discard_const_p(char *, kwnames),
   47753             :                 &bigendian_obj,
   47754             :                 &ndr64_obj)) {
   47755           0 :                 return NULL;
   47756             :         }
   47757             : 
   47758           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47759           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47760             :         }
   47761           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47762           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47763             :         }
   47764             : 
   47765           0 :         return py_netr_LogonGetDomainInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   47766             : }
   47767             : 
   47768           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   47769             : {
   47770           0 :         const struct ndr_interface_call *call = NULL;
   47771           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47772           0 :         struct ndr_pull *pull = NULL;
   47773           0 :         enum ndr_err_code err;
   47774             : 
   47775           0 :         if (ndr_table_netlogon.num_calls < 30) {
   47776           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_unpack");
   47777           0 :                 return NULL;
   47778             :         }
   47779           0 :         call = &ndr_table_netlogon.calls[29];
   47780             : 
   47781           0 :         pull = ndr_pull_init_blob(blob, object);
   47782           0 :         if (pull == NULL) {
   47783           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47784           0 :                 return NULL;
   47785             :         }
   47786             : 
   47787           0 :         pull->flags |= ndr_pull_flags;
   47788             : 
   47789           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   47790           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47791           0 :                 TALLOC_FREE(pull);
   47792           0 :                 PyErr_SetNdrError(err);
   47793           0 :                 return NULL;
   47794             :         }
   47795           0 :         if (!allow_remaining) {
   47796           0 :                 uint32_t highest_ofs;
   47797             : 
   47798           0 :                 if (pull->offset > pull->relative_highest_offset) {
   47799           0 :                         highest_ofs = pull->offset;
   47800             :                 } else {
   47801           0 :                         highest_ofs = pull->relative_highest_offset;
   47802             :                 }
   47803           0 :                 if (highest_ofs < pull->data_size) {
   47804           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   47805             :                                 "not all bytes consumed ofs[%u] size[%u]",
   47806             :                                 highest_ofs, pull->data_size);
   47807           0 :                         TALLOC_FREE(pull);
   47808           0 :                         PyErr_SetNdrError(err);
   47809           0 :                         return NULL;
   47810             :                 }
   47811             :         }
   47812             : 
   47813           0 :         TALLOC_FREE(pull);
   47814           0 :         Py_RETURN_NONE;
   47815             : }
   47816             : 
   47817           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47818             : {
   47819           0 :         DATA_BLOB blob;
   47820           0 :         Py_ssize_t blob_length = 0;
   47821           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47822           0 :         PyObject *bigendian_obj = NULL;
   47823           0 :         PyObject *ndr64_obj = NULL;
   47824           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47825           0 :         PyObject *allow_remaining_obj = NULL;
   47826           0 :         bool allow_remaining = false;
   47827             : 
   47828           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   47829             :                 discard_const_p(char *, kwnames),
   47830             :                 &blob.data, &blob_length,
   47831             :                 &bigendian_obj,
   47832             :                 &ndr64_obj,
   47833             :                 &allow_remaining_obj)) {
   47834           0 :                 return NULL;
   47835             :         }
   47836           0 :         blob.length = blob_length;
   47837             : 
   47838           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47839           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47840             :         }
   47841           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47842           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47843             :         }
   47844             : 
   47845           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47846           0 :                 allow_remaining = true;
   47847             :         }
   47848             : 
   47849           0 :         return py_netr_LogonGetDomainInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   47850             : }
   47851             : 
   47852           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47853             : {
   47854           0 :         DATA_BLOB blob;
   47855           0 :         Py_ssize_t blob_length = 0;
   47856           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47857           0 :         PyObject *bigendian_obj = NULL;
   47858           0 :         PyObject *ndr64_obj = NULL;
   47859           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47860           0 :         PyObject *allow_remaining_obj = NULL;
   47861           0 :         bool allow_remaining = false;
   47862             : 
   47863           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   47864             :                 discard_const_p(char *, kwnames),
   47865             :                 &blob.data, &blob_length,
   47866             :                 &bigendian_obj,
   47867             :                 &ndr64_obj,
   47868             :                 &allow_remaining_obj)) {
   47869           0 :                 return NULL;
   47870             :         }
   47871           0 :         blob.length = blob_length;
   47872             : 
   47873           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47874           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47875             :         }
   47876           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47877           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47878             :         }
   47879             : 
   47880           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47881           0 :                 allow_remaining = true;
   47882             :         }
   47883             : 
   47884           0 :         return py_netr_LogonGetDomainInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   47885             : }
   47886             : 
   47887           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   47888             : {
   47889           0 :         const struct ndr_interface_call *call = NULL;
   47890           0 :         struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
   47891           0 :         PyObject *ret;
   47892           0 :         char *retstr;
   47893             : 
   47894           0 :         if (ndr_table_netlogon.num_calls < 30) {
   47895           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_print");
   47896           0 :                 return NULL;
   47897             :         }
   47898           0 :         call = &ndr_table_netlogon.calls[29];
   47899             : 
   47900           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   47901           0 :         ret = PyUnicode_FromString(retstr);
   47902           0 :         TALLOC_FREE(retstr);
   47903             : 
   47904           0 :         return ret;
   47905             : }
   47906             : 
   47907           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47908             : {
   47909           0 :         return py_netr_LogonGetDomainInfo_ndr_print(py_obj, "netr_LogonGetDomainInfo_in", NDR_IN);
   47910             : }
   47911             : 
   47912           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47913             : {
   47914           0 :         return py_netr_LogonGetDomainInfo_ndr_print(py_obj, "netr_LogonGetDomainInfo_out", NDR_OUT);
   47915             : }
   47916             : 
   47917             : static PyMethodDef py_netr_LogonGetDomainInfo_methods[] = {
   47918             :         { "opnum", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   47919             :                 "netlogon.netr_LogonGetDomainInfo.opnum() -> 29 (0x1d) " },
   47920             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   47921             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   47922             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   47923             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   47924             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   47925             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   47926             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   47927             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   47928             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   47929             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   47930             :         { NULL, NULL, 0, NULL }
   47931             : };
   47932             : 
   47933             : 
   47934             : static PyTypeObject netr_LogonGetDomainInfo_Type = {
   47935             :         PyVarObject_HEAD_INIT(NULL, 0)
   47936             :         .tp_name = "netlogon.netr_LogonGetDomainInfo",
   47937             :         .tp_getset = py_netr_LogonGetDomainInfo_getsetters,
   47938             :         .tp_methods = py_netr_LogonGetDomainInfo_methods,
   47939             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   47940             :         .tp_new = py_netr_LogonGetDomainInfo_new,
   47941             : };
   47942             : 
   47943          31 : static bool pack_py_netr_LogonGetDomainInfo_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetDomainInfo *r)
   47944             : {
   47945           0 :         PyObject *py_server_name;
   47946           0 :         PyObject *py_computer_name;
   47947           0 :         PyObject *py_credential;
   47948           0 :         PyObject *py_return_authenticator;
   47949           0 :         PyObject *py_level;
   47950           0 :         PyObject *py_query;
   47951          31 :         const char *kwnames[] = {
   47952             :                 "server_name", "computer_name", "credential", "return_authenticator", "level", "query", NULL
   47953             :         };
   47954             : 
   47955          31 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_LogonGetDomainInfo", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_level, &py_query)) {
   47956           0 :                 return false;
   47957             :         }
   47958             : 
   47959          31 :         if (py_server_name == NULL) {
   47960           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   47961           0 :                 return false;
   47962             :         }
   47963          31 :         r->in.server_name = talloc_ptrtype(r, r->in.server_name);
   47964          31 :         if (r->in.server_name == NULL) {
   47965           0 :                 PyErr_NoMemory();
   47966           0 :                 return false;
   47967             :         }
   47968             :         {
   47969           0 :                 const char *test_str;
   47970           0 :                 const char *talloc_str;
   47971          31 :                 PyObject *unicode = NULL;
   47972          31 :                 if (PyUnicode_Check(py_server_name)) {
   47973          31 :                         unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   47974          31 :                         if (unicode == NULL) {
   47975           0 :                                 return false;
   47976             :                         }
   47977          31 :                         test_str = PyBytes_AS_STRING(unicode);
   47978           0 :                 } else if (PyBytes_Check(py_server_name)) {
   47979           0 :                         test_str = PyBytes_AS_STRING(py_server_name);
   47980             :                 } else {
   47981           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   47982           0 :                         return false;
   47983             :                 }
   47984          31 :                 talloc_str = talloc_strdup(r, test_str);
   47985          31 :                 if (unicode != NULL) {
   47986          31 :                         Py_DECREF(unicode);
   47987             :                 }
   47988          31 :                 if (talloc_str == NULL) {
   47989           0 :                         PyErr_NoMemory();
   47990           0 :                         return false;
   47991             :                 }
   47992          31 :                 r->in.server_name = talloc_str;
   47993             :         }
   47994          31 :         if (py_computer_name == NULL) {
   47995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   47996           0 :                 return false;
   47997             :         }
   47998          31 :         if (py_computer_name == Py_None) {
   47999           0 :                 r->in.computer_name = NULL;
   48000             :         } else {
   48001          31 :                 r->in.computer_name = NULL;
   48002             :                 {
   48003           0 :                         const char *test_str;
   48004           0 :                         const char *talloc_str;
   48005          31 :                         PyObject *unicode = NULL;
   48006          31 :                         if (PyUnicode_Check(py_computer_name)) {
   48007          31 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   48008          31 :                                 if (unicode == NULL) {
   48009           0 :                                         return false;
   48010             :                                 }
   48011          31 :                                 test_str = PyBytes_AS_STRING(unicode);
   48012           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   48013           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   48014             :                         } else {
   48015           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   48016           0 :                                 return false;
   48017             :                         }
   48018          31 :                         talloc_str = talloc_strdup(r, test_str);
   48019          31 :                         if (unicode != NULL) {
   48020          31 :                                 Py_DECREF(unicode);
   48021             :                         }
   48022          31 :                         if (talloc_str == NULL) {
   48023           0 :                                 PyErr_NoMemory();
   48024           0 :                                 return false;
   48025             :                         }
   48026          31 :                         r->in.computer_name = talloc_str;
   48027             :                 }
   48028             :         }
   48029          31 :         if (py_credential == NULL) {
   48030           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   48031           0 :                 return false;
   48032             :         }
   48033          31 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   48034          31 :         if (r->in.credential == NULL) {
   48035           0 :                 PyErr_NoMemory();
   48036           0 :                 return false;
   48037             :         }
   48038          31 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   48039          31 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   48040           0 :                 PyErr_NoMemory();
   48041           0 :                 return false;
   48042             :         }
   48043          31 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   48044          31 :         if (py_return_authenticator == NULL) {
   48045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   48046           0 :                 return false;
   48047             :         }
   48048          31 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   48049          31 :         if (r->in.return_authenticator == NULL) {
   48050           0 :                 PyErr_NoMemory();
   48051           0 :                 return false;
   48052             :         }
   48053          31 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   48054          31 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   48055           0 :                 PyErr_NoMemory();
   48056           0 :                 return false;
   48057             :         }
   48058          31 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   48059          31 :         if (py_level == NULL) {
   48060           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   48061           0 :                 return false;
   48062             :         }
   48063             :         {
   48064          31 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   48065          31 :                 if (PyLong_Check(py_level)) {
   48066           0 :                         unsigned long long test_var;
   48067          31 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   48068          31 :                         if (PyErr_Occurred() != NULL) {
   48069           0 :                                 return false;
   48070             :                         }
   48071          31 :                         if (test_var > uint_max) {
   48072           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48073             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48074           0 :                                 return false;
   48075             :                         }
   48076          31 :                         r->in.level = test_var;
   48077             :                 } else {
   48078           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48079             :                           PyLong_Type.tp_name);
   48080           0 :                         return false;
   48081             :                 }
   48082             :         }
   48083          31 :         if (py_query == NULL) {
   48084           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.query");
   48085           0 :                 return false;
   48086             :         }
   48087          31 :         r->in.query = talloc_ptrtype(r, r->in.query);
   48088          31 :         if (r->in.query == NULL) {
   48089           0 :                 PyErr_NoMemory();
   48090           0 :                 return false;
   48091             :         }
   48092             :         {
   48093           0 :                 union netr_WorkstationInfo *query_switch_1;
   48094          31 :                 query_switch_1 = (union netr_WorkstationInfo *)pyrpc_export_union(&netr_WorkstationInfo_Type, r, r->in.level, py_query, "union netr_WorkstationInfo");
   48095          31 :                 if (query_switch_1 == NULL) {
   48096           0 :                         return false;
   48097             :                 }
   48098          31 :                 r->in.query = query_switch_1;
   48099             :         }
   48100          31 :         return true;
   48101             : }
   48102             : 
   48103          31 : static PyObject *unpack_py_netr_LogonGetDomainInfo_args_out(struct netr_LogonGetDomainInfo *r)
   48104             : {
   48105           0 :         PyObject *result;
   48106           0 :         PyObject *py_return_authenticator;
   48107           0 :         PyObject *py_info;
   48108          31 :         result = PyTuple_New(2);
   48109          31 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   48110          31 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   48111          31 :         py_info = pyrpc_import_union(&netr_DomainInfo_Type, r->out.info, r->in.level, r->out.info, "union netr_DomainInfo");
   48112          31 :         if (py_info == NULL) {
   48113           0 :                 return NULL;
   48114             :         }
   48115          31 :         PyTuple_SetItem(result, 1, py_info);
   48116          31 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   48117           0 :                 PyErr_SetNTSTATUS(r->out.result);
   48118           0 :                 return NULL;
   48119             :         }
   48120             : 
   48121          31 :         return result;
   48122             : }
   48123             : 
   48124             : 
   48125           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_server_name(PyObject *obj, void *closure)
   48126             : {
   48127           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
   48128           0 :         PyObject *py_server_name;
   48129           0 :         if (object->in.server_name == NULL) {
   48130           0 :                 Py_RETURN_NONE;
   48131             :         }
   48132           0 :         if (object->in.server_name == NULL) {
   48133           0 :                 py_server_name = Py_None;
   48134           0 :                 Py_INCREF(py_server_name);
   48135             :         } else {
   48136           0 :                 if (object->in.server_name == NULL) {
   48137           0 :                         py_server_name = Py_None;
   48138           0 :                         Py_INCREF(py_server_name);
   48139             :                 } else {
   48140           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   48141             :                 }
   48142             :         }
   48143           0 :         return py_server_name;
   48144             : }
   48145             : 
   48146           0 : static int py_netr_ServerPasswordSet2_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   48147             : {
   48148           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48149           0 :         if (value == NULL) {
   48150           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   48151           0 :                 return -1;
   48152             :         }
   48153           0 :         if (value == Py_None) {
   48154           0 :                 object->in.server_name = NULL;
   48155             :         } else {
   48156           0 :                 object->in.server_name = NULL;
   48157             :                 {
   48158           0 :                         const char *test_str;
   48159           0 :                         const char *talloc_str;
   48160           0 :                         PyObject *unicode = NULL;
   48161           0 :                         if (PyUnicode_Check(value)) {
   48162           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48163           0 :                                 if (unicode == NULL) {
   48164           0 :                                         return -1;
   48165             :                                 }
   48166           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   48167           0 :                         } else if (PyBytes_Check(value)) {
   48168           0 :                                 test_str = PyBytes_AS_STRING(value);
   48169             :                         } else {
   48170           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48171           0 :                                 return -1;
   48172             :                         }
   48173           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48174           0 :                         if (unicode != NULL) {
   48175           0 :                                 Py_DECREF(unicode);
   48176             :                         }
   48177           0 :                         if (talloc_str == NULL) {
   48178           0 :                                 PyErr_NoMemory();
   48179           0 :                                 return -1;
   48180             :                         }
   48181           0 :                         object->in.server_name = talloc_str;
   48182             :                 }
   48183             :         }
   48184           0 :         return 0;
   48185             : }
   48186             : 
   48187           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_account_name(PyObject *obj, void *closure)
   48188             : {
   48189           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
   48190           0 :         PyObject *py_account_name;
   48191           0 :         if (object->in.account_name == NULL) {
   48192           0 :                 Py_RETURN_NONE;
   48193             :         }
   48194           0 :         if (object->in.account_name == NULL) {
   48195           0 :                 py_account_name = Py_None;
   48196           0 :                 Py_INCREF(py_account_name);
   48197             :         } else {
   48198           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   48199             :         }
   48200           0 :         return py_account_name;
   48201             : }
   48202             : 
   48203           0 : static int py_netr_ServerPasswordSet2_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   48204             : {
   48205           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48206           0 :         if (value == NULL) {
   48207           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   48208           0 :                 return -1;
   48209             :         }
   48210           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   48211           0 :         if (object->in.account_name == NULL) {
   48212           0 :                 PyErr_NoMemory();
   48213           0 :                 return -1;
   48214             :         }
   48215             :         {
   48216           0 :                 const char *test_str;
   48217           0 :                 const char *talloc_str;
   48218           0 :                 PyObject *unicode = NULL;
   48219           0 :                 if (PyUnicode_Check(value)) {
   48220           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48221           0 :                         if (unicode == NULL) {
   48222           0 :                                 return -1;
   48223             :                         }
   48224           0 :                         test_str = PyBytes_AS_STRING(unicode);
   48225           0 :                 } else if (PyBytes_Check(value)) {
   48226           0 :                         test_str = PyBytes_AS_STRING(value);
   48227             :                 } else {
   48228           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48229           0 :                         return -1;
   48230             :                 }
   48231           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48232           0 :                 if (unicode != NULL) {
   48233           0 :                         Py_DECREF(unicode);
   48234             :                 }
   48235           0 :                 if (talloc_str == NULL) {
   48236           0 :                         PyErr_NoMemory();
   48237           0 :                         return -1;
   48238             :                 }
   48239           0 :                 object->in.account_name = talloc_str;
   48240             :         }
   48241           0 :         return 0;
   48242             : }
   48243             : 
   48244           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_secure_channel_type(PyObject *obj, void *closure)
   48245             : {
   48246           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
   48247           0 :         PyObject *py_secure_channel_type;
   48248           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
   48249           0 :         return py_secure_channel_type;
   48250             : }
   48251             : 
   48252           0 : static int py_netr_ServerPasswordSet2_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   48253             : {
   48254           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48255           0 :         if (value == NULL) {
   48256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
   48257           0 :                 return -1;
   48258             :         }
   48259             :         {
   48260           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   48261           0 :                 if (PyLong_Check(value)) {
   48262           0 :                         unsigned long long test_var;
   48263           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   48264           0 :                         if (PyErr_Occurred() != NULL) {
   48265           0 :                                 return -1;
   48266             :                         }
   48267           0 :                         if (test_var > uint_max) {
   48268           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48269             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48270           0 :                                 return -1;
   48271             :                         }
   48272           0 :                         object->in.secure_channel_type = test_var;
   48273             :                 } else {
   48274           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48275             :                           PyLong_Type.tp_name);
   48276           0 :                         return -1;
   48277             :                 }
   48278             :         }
   48279           0 :         return 0;
   48280             : }
   48281             : 
   48282           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_computer_name(PyObject *obj, void *closure)
   48283             : {
   48284           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
   48285           0 :         PyObject *py_computer_name;
   48286           0 :         if (object->in.computer_name == NULL) {
   48287           0 :                 Py_RETURN_NONE;
   48288             :         }
   48289           0 :         if (object->in.computer_name == NULL) {
   48290           0 :                 py_computer_name = Py_None;
   48291           0 :                 Py_INCREF(py_computer_name);
   48292             :         } else {
   48293           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   48294             :         }
   48295           0 :         return py_computer_name;
   48296             : }
   48297             : 
   48298           0 : static int py_netr_ServerPasswordSet2_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   48299             : {
   48300           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48301           0 :         if (value == NULL) {
   48302           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   48303           0 :                 return -1;
   48304             :         }
   48305           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   48306           0 :         if (object->in.computer_name == NULL) {
   48307           0 :                 PyErr_NoMemory();
   48308           0 :                 return -1;
   48309             :         }
   48310             :         {
   48311           0 :                 const char *test_str;
   48312           0 :                 const char *talloc_str;
   48313           0 :                 PyObject *unicode = NULL;
   48314           0 :                 if (PyUnicode_Check(value)) {
   48315           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48316           0 :                         if (unicode == NULL) {
   48317           0 :                                 return -1;
   48318             :                         }
   48319           0 :                         test_str = PyBytes_AS_STRING(unicode);
   48320           0 :                 } else if (PyBytes_Check(value)) {
   48321           0 :                         test_str = PyBytes_AS_STRING(value);
   48322             :                 } else {
   48323           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48324           0 :                         return -1;
   48325             :                 }
   48326           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48327           0 :                 if (unicode != NULL) {
   48328           0 :                         Py_DECREF(unicode);
   48329             :                 }
   48330           0 :                 if (talloc_str == NULL) {
   48331           0 :                         PyErr_NoMemory();
   48332           0 :                         return -1;
   48333             :                 }
   48334           0 :                 object->in.computer_name = talloc_str;
   48335             :         }
   48336           0 :         return 0;
   48337             : }
   48338             : 
   48339           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_credential(PyObject *obj, void *closure)
   48340             : {
   48341           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
   48342           0 :         PyObject *py_credential;
   48343           0 :         if (object->in.credential == NULL) {
   48344           0 :                 Py_RETURN_NONE;
   48345             :         }
   48346           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   48347           0 :         return py_credential;
   48348             : }
   48349             : 
   48350           0 : static int py_netr_ServerPasswordSet2_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   48351             : {
   48352           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48353           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   48354           0 :         if (value == NULL) {
   48355           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   48356           0 :                 return -1;
   48357             :         }
   48358           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   48359           0 :         if (object->in.credential == NULL) {
   48360           0 :                 PyErr_NoMemory();
   48361           0 :                 return -1;
   48362             :         }
   48363           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   48364           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48365           0 :                 PyErr_NoMemory();
   48366           0 :                 return -1;
   48367             :         }
   48368           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   48369           0 :         return 0;
   48370             : }
   48371             : 
   48372           0 : static PyObject *py_netr_ServerPasswordSet2_out_get_return_authenticator(PyObject *obj, void *closure)
   48373             : {
   48374           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
   48375           0 :         PyObject *py_return_authenticator;
   48376           0 :         if (object->out.return_authenticator == NULL) {
   48377           0 :                 Py_RETURN_NONE;
   48378             :         }
   48379           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   48380           0 :         return py_return_authenticator;
   48381             : }
   48382             : 
   48383           0 : static int py_netr_ServerPasswordSet2_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   48384             : {
   48385           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48386           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   48387           0 :         if (value == NULL) {
   48388           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   48389           0 :                 return -1;
   48390             :         }
   48391           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   48392           0 :         if (object->out.return_authenticator == NULL) {
   48393           0 :                 PyErr_NoMemory();
   48394           0 :                 return -1;
   48395             :         }
   48396           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   48397           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48398           0 :                 PyErr_NoMemory();
   48399           0 :                 return -1;
   48400             :         }
   48401           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   48402           0 :         return 0;
   48403             : }
   48404             : 
   48405           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_new_password(PyObject *obj, void *closure)
   48406             : {
   48407           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
   48408           0 :         PyObject *py_new_password;
   48409           0 :         if (object->in.new_password == NULL) {
   48410           0 :                 Py_RETURN_NONE;
   48411             :         }
   48412           0 :         py_new_password = pytalloc_reference_ex(&netr_CryptPassword_Type, object->in.new_password, object->in.new_password);
   48413           0 :         return py_new_password;
   48414             : }
   48415             : 
   48416           0 : static int py_netr_ServerPasswordSet2_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
   48417             : {
   48418           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48419           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.new_password));
   48420           0 :         if (value == NULL) {
   48421           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.new_password");
   48422           0 :                 return -1;
   48423             :         }
   48424           0 :         object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
   48425           0 :         if (object->in.new_password == NULL) {
   48426           0 :                 PyErr_NoMemory();
   48427           0 :                 return -1;
   48428             :         }
   48429           0 :         PY_CHECK_TYPE(&netr_CryptPassword_Type, value, return -1;);
   48430           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48431           0 :                 PyErr_NoMemory();
   48432           0 :                 return -1;
   48433             :         }
   48434           0 :         object->in.new_password = (struct netr_CryptPassword *)pytalloc_get_ptr(value);
   48435           0 :         return 0;
   48436             : }
   48437             : 
   48438           0 : static PyObject *py_netr_ServerPasswordSet2_get_result(PyObject *obj, void *closure)
   48439             : {
   48440           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
   48441           0 :         PyObject *py_result;
   48442           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   48443           0 :         return py_result;
   48444             : }
   48445             : 
   48446           0 : static int py_netr_ServerPasswordSet2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   48447             : {
   48448           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48449           0 :         if (value == NULL) {
   48450           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   48451           0 :                 return -1;
   48452             :         }
   48453           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   48454           0 :         return 0;
   48455             : }
   48456             : 
   48457             : static PyGetSetDef py_netr_ServerPasswordSet2_getsetters[] = {
   48458             :         {
   48459             :                 .name = discard_const_p(char, "in_server_name"),
   48460             :                 .get = py_netr_ServerPasswordSet2_in_get_server_name,
   48461             :                 .set = py_netr_ServerPasswordSet2_in_set_server_name,
   48462             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48463             :         },
   48464             :         {
   48465             :                 .name = discard_const_p(char, "in_account_name"),
   48466             :                 .get = py_netr_ServerPasswordSet2_in_get_account_name,
   48467             :                 .set = py_netr_ServerPasswordSet2_in_set_account_name,
   48468             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48469             :         },
   48470             :         {
   48471             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   48472             :                 .get = py_netr_ServerPasswordSet2_in_get_secure_channel_type,
   48473             :                 .set = py_netr_ServerPasswordSet2_in_set_secure_channel_type,
   48474             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   48475             :         },
   48476             :         {
   48477             :                 .name = discard_const_p(char, "in_computer_name"),
   48478             :                 .get = py_netr_ServerPasswordSet2_in_get_computer_name,
   48479             :                 .set = py_netr_ServerPasswordSet2_in_set_computer_name,
   48480             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48481             :         },
   48482             :         {
   48483             :                 .name = discard_const_p(char, "in_credential"),
   48484             :                 .get = py_netr_ServerPasswordSet2_in_get_credential,
   48485             :                 .set = py_netr_ServerPasswordSet2_in_set_credential,
   48486             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   48487             :         },
   48488             :         {
   48489             :                 .name = discard_const_p(char, "out_return_authenticator"),
   48490             :                 .get = py_netr_ServerPasswordSet2_out_get_return_authenticator,
   48491             :                 .set = py_netr_ServerPasswordSet2_out_set_return_authenticator,
   48492             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   48493             :         },
   48494             :         {
   48495             :                 .name = discard_const_p(char, "in_new_password"),
   48496             :                 .get = py_netr_ServerPasswordSet2_in_get_new_password,
   48497             :                 .set = py_netr_ServerPasswordSet2_in_set_new_password,
   48498             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CryptPassword")
   48499             :         },
   48500             :         {
   48501             :                 .name = discard_const_p(char, "result"),
   48502             :                 .get = py_netr_ServerPasswordSet2_get_result,
   48503             :                 .set = py_netr_ServerPasswordSet2_set_result,
   48504             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   48505             :         },
   48506             :         { .name = NULL }
   48507             : };
   48508             : 
   48509           0 : static PyObject *py_netr_ServerPasswordSet2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   48510             : {
   48511           0 :         PyObject *self = pytalloc_new(struct netr_ServerPasswordSet2, type);
   48512           0 :         struct netr_ServerPasswordSet2 *_self = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(self);
   48513           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   48514           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   48515           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   48516           0 :         _self->in.new_password = talloc_zero(mem_ctx, struct netr_CryptPassword);
   48517           0 :         return self;
   48518             : }
   48519             : 
   48520           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   48521             : {
   48522             : 
   48523             : 
   48524           0 :         return PyLong_FromLong(30);
   48525             : }
   48526             : 
   48527           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   48528             : {
   48529           0 :         const struct ndr_interface_call *call = NULL;
   48530           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48531           0 :         PyObject *ret = NULL;
   48532           0 :         struct ndr_push *push = NULL;
   48533           0 :         DATA_BLOB blob;
   48534           0 :         enum ndr_err_code err;
   48535             : 
   48536           0 :         if (ndr_table_netlogon.num_calls < 31) {
   48537           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_pack");
   48538           0 :                 return NULL;
   48539             :         }
   48540           0 :         call = &ndr_table_netlogon.calls[30];
   48541             : 
   48542           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   48543           0 :         if (push == NULL) {
   48544           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48545           0 :                 return NULL;
   48546             :         }
   48547             : 
   48548           0 :         push->flags |= ndr_push_flags;
   48549             : 
   48550           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   48551           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48552           0 :                 TALLOC_FREE(push);
   48553           0 :                 PyErr_SetNdrError(err);
   48554           0 :                 return NULL;
   48555             :         }
   48556           0 :         blob = ndr_push_blob(push);
   48557           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   48558           0 :         TALLOC_FREE(push);
   48559           0 :         return ret;
   48560             : }
   48561             : 
   48562           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48563             : {
   48564           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48565           0 :         PyObject *bigendian_obj = NULL;
   48566           0 :         PyObject *ndr64_obj = NULL;
   48567           0 :         libndr_flags ndr_push_flags = 0;
   48568             : 
   48569           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   48570             :                 discard_const_p(char *, kwnames),
   48571             :                 &bigendian_obj,
   48572             :                 &ndr64_obj)) {
   48573           0 :                 return NULL;
   48574             :         }
   48575             : 
   48576           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48577           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48578             :         }
   48579           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48580           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48581             :         }
   48582             : 
   48583           0 :         return py_netr_ServerPasswordSet2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   48584             : }
   48585             : 
   48586           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48587             : {
   48588           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48589           0 :         PyObject *bigendian_obj = NULL;
   48590           0 :         PyObject *ndr64_obj = NULL;
   48591           0 :         libndr_flags ndr_push_flags = 0;
   48592             : 
   48593           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   48594             :                 discard_const_p(char *, kwnames),
   48595             :                 &bigendian_obj,
   48596             :                 &ndr64_obj)) {
   48597           0 :                 return NULL;
   48598             :         }
   48599             : 
   48600           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48601           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48602             :         }
   48603           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48604           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48605             :         }
   48606             : 
   48607           0 :         return py_netr_ServerPasswordSet2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   48608             : }
   48609             : 
   48610           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   48611             : {
   48612           0 :         const struct ndr_interface_call *call = NULL;
   48613           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48614           0 :         struct ndr_pull *pull = NULL;
   48615           0 :         enum ndr_err_code err;
   48616             : 
   48617           0 :         if (ndr_table_netlogon.num_calls < 31) {
   48618           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_unpack");
   48619           0 :                 return NULL;
   48620             :         }
   48621           0 :         call = &ndr_table_netlogon.calls[30];
   48622             : 
   48623           0 :         pull = ndr_pull_init_blob(blob, object);
   48624           0 :         if (pull == NULL) {
   48625           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48626           0 :                 return NULL;
   48627             :         }
   48628             : 
   48629           0 :         pull->flags |= ndr_pull_flags;
   48630             : 
   48631           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   48632           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48633           0 :                 TALLOC_FREE(pull);
   48634           0 :                 PyErr_SetNdrError(err);
   48635           0 :                 return NULL;
   48636             :         }
   48637           0 :         if (!allow_remaining) {
   48638           0 :                 uint32_t highest_ofs;
   48639             : 
   48640           0 :                 if (pull->offset > pull->relative_highest_offset) {
   48641           0 :                         highest_ofs = pull->offset;
   48642             :                 } else {
   48643           0 :                         highest_ofs = pull->relative_highest_offset;
   48644             :                 }
   48645           0 :                 if (highest_ofs < pull->data_size) {
   48646           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   48647             :                                 "not all bytes consumed ofs[%u] size[%u]",
   48648             :                                 highest_ofs, pull->data_size);
   48649           0 :                         TALLOC_FREE(pull);
   48650           0 :                         PyErr_SetNdrError(err);
   48651           0 :                         return NULL;
   48652             :                 }
   48653             :         }
   48654             : 
   48655           0 :         TALLOC_FREE(pull);
   48656           0 :         Py_RETURN_NONE;
   48657             : }
   48658             : 
   48659           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48660             : {
   48661           0 :         DATA_BLOB blob;
   48662           0 :         Py_ssize_t blob_length = 0;
   48663           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48664           0 :         PyObject *bigendian_obj = NULL;
   48665           0 :         PyObject *ndr64_obj = NULL;
   48666           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48667           0 :         PyObject *allow_remaining_obj = NULL;
   48668           0 :         bool allow_remaining = false;
   48669             : 
   48670           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   48671             :                 discard_const_p(char *, kwnames),
   48672             :                 &blob.data, &blob_length,
   48673             :                 &bigendian_obj,
   48674             :                 &ndr64_obj,
   48675             :                 &allow_remaining_obj)) {
   48676           0 :                 return NULL;
   48677             :         }
   48678           0 :         blob.length = blob_length;
   48679             : 
   48680           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48681           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48682             :         }
   48683           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48684           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48685             :         }
   48686             : 
   48687           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48688           0 :                 allow_remaining = true;
   48689             :         }
   48690             : 
   48691           0 :         return py_netr_ServerPasswordSet2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   48692             : }
   48693             : 
   48694           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48695             : {
   48696           0 :         DATA_BLOB blob;
   48697           0 :         Py_ssize_t blob_length = 0;
   48698           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48699           0 :         PyObject *bigendian_obj = NULL;
   48700           0 :         PyObject *ndr64_obj = NULL;
   48701           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48702           0 :         PyObject *allow_remaining_obj = NULL;
   48703           0 :         bool allow_remaining = false;
   48704             : 
   48705           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   48706             :                 discard_const_p(char *, kwnames),
   48707             :                 &blob.data, &blob_length,
   48708             :                 &bigendian_obj,
   48709             :                 &ndr64_obj,
   48710             :                 &allow_remaining_obj)) {
   48711           0 :                 return NULL;
   48712             :         }
   48713           0 :         blob.length = blob_length;
   48714             : 
   48715           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48716           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48717             :         }
   48718           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48719           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48720             :         }
   48721             : 
   48722           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48723           0 :                 allow_remaining = true;
   48724             :         }
   48725             : 
   48726           0 :         return py_netr_ServerPasswordSet2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   48727             : }
   48728             : 
   48729           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   48730             : {
   48731           0 :         const struct ndr_interface_call *call = NULL;
   48732           0 :         struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
   48733           0 :         PyObject *ret;
   48734           0 :         char *retstr;
   48735             : 
   48736           0 :         if (ndr_table_netlogon.num_calls < 31) {
   48737           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_print");
   48738           0 :                 return NULL;
   48739             :         }
   48740           0 :         call = &ndr_table_netlogon.calls[30];
   48741             : 
   48742           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   48743           0 :         ret = PyUnicode_FromString(retstr);
   48744           0 :         TALLOC_FREE(retstr);
   48745             : 
   48746           0 :         return ret;
   48747             : }
   48748             : 
   48749           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48750             : {
   48751           0 :         return py_netr_ServerPasswordSet2_ndr_print(py_obj, "netr_ServerPasswordSet2_in", NDR_IN);
   48752             : }
   48753             : 
   48754           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48755             : {
   48756           0 :         return py_netr_ServerPasswordSet2_ndr_print(py_obj, "netr_ServerPasswordSet2_out", NDR_OUT);
   48757             : }
   48758             : 
   48759             : static PyMethodDef py_netr_ServerPasswordSet2_methods[] = {
   48760             :         { "opnum", (PyCFunction)py_netr_ServerPasswordSet2_ndr_opnum, METH_NOARGS|METH_CLASS,
   48761             :                 "netlogon.netr_ServerPasswordSet2.opnum() -> 30 (0x1e) " },
   48762             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   48763             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   48764             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   48765             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   48766             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   48767             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   48768             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   48769             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   48770             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerPasswordSet2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   48771             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerPasswordSet2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   48772             :         { NULL, NULL, 0, NULL }
   48773             : };
   48774             : 
   48775             : 
   48776             : static PyTypeObject netr_ServerPasswordSet2_Type = {
   48777             :         PyVarObject_HEAD_INIT(NULL, 0)
   48778             :         .tp_name = "netlogon.netr_ServerPasswordSet2",
   48779             :         .tp_getset = py_netr_ServerPasswordSet2_getsetters,
   48780             :         .tp_methods = py_netr_ServerPasswordSet2_methods,
   48781             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   48782             :         .tp_new = py_netr_ServerPasswordSet2_new,
   48783             : };
   48784             : 
   48785           4 : static bool pack_py_netr_ServerPasswordSet2_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordSet2 *r)
   48786             : {
   48787           0 :         PyObject *py_server_name;
   48788           0 :         PyObject *py_account_name;
   48789           0 :         PyObject *py_secure_channel_type;
   48790           0 :         PyObject *py_computer_name;
   48791           0 :         PyObject *py_credential;
   48792           0 :         PyObject *py_new_password;
   48793           4 :         const char *kwnames[] = {
   48794             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", "new_password", NULL
   48795             :         };
   48796             : 
   48797           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)) {
   48798           0 :                 return false;
   48799             :         }
   48800             : 
   48801           4 :         if (py_server_name == NULL) {
   48802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   48803           0 :                 return false;
   48804             :         }
   48805           4 :         if (py_server_name == Py_None) {
   48806           0 :                 r->in.server_name = NULL;
   48807             :         } else {
   48808           4 :                 r->in.server_name = NULL;
   48809             :                 {
   48810           0 :                         const char *test_str;
   48811           0 :                         const char *talloc_str;
   48812           4 :                         PyObject *unicode = NULL;
   48813           4 :                         if (PyUnicode_Check(py_server_name)) {
   48814           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   48815           4 :                                 if (unicode == NULL) {
   48816           0 :                                         return false;
   48817             :                                 }
   48818           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   48819           0 :                         } else if (PyBytes_Check(py_server_name)) {
   48820           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   48821             :                         } else {
   48822           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   48823           0 :                                 return false;
   48824             :                         }
   48825           4 :                         talloc_str = talloc_strdup(r, test_str);
   48826           4 :                         if (unicode != NULL) {
   48827           4 :                                 Py_DECREF(unicode);
   48828             :                         }
   48829           4 :                         if (talloc_str == NULL) {
   48830           0 :                                 PyErr_NoMemory();
   48831           0 :                                 return false;
   48832             :                         }
   48833           4 :                         r->in.server_name = talloc_str;
   48834             :                 }
   48835             :         }
   48836           4 :         if (py_account_name == NULL) {
   48837           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   48838           0 :                 return false;
   48839             :         }
   48840           4 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   48841           4 :         if (r->in.account_name == NULL) {
   48842           0 :                 PyErr_NoMemory();
   48843           0 :                 return false;
   48844             :         }
   48845             :         {
   48846           0 :                 const char *test_str;
   48847           0 :                 const char *talloc_str;
   48848           4 :                 PyObject *unicode = NULL;
   48849           4 :                 if (PyUnicode_Check(py_account_name)) {
   48850           4 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   48851           4 :                         if (unicode == NULL) {
   48852           0 :                                 return false;
   48853             :                         }
   48854           4 :                         test_str = PyBytes_AS_STRING(unicode);
   48855           0 :                 } else if (PyBytes_Check(py_account_name)) {
   48856           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   48857             :                 } else {
   48858           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   48859           0 :                         return false;
   48860             :                 }
   48861           4 :                 talloc_str = talloc_strdup(r, test_str);
   48862           4 :                 if (unicode != NULL) {
   48863           4 :                         Py_DECREF(unicode);
   48864             :                 }
   48865           4 :                 if (talloc_str == NULL) {
   48866           0 :                         PyErr_NoMemory();
   48867           0 :                         return false;
   48868             :                 }
   48869           4 :                 r->in.account_name = talloc_str;
   48870             :         }
   48871           4 :         if (py_secure_channel_type == NULL) {
   48872           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
   48873           0 :                 return false;
   48874             :         }
   48875             :         {
   48876           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   48877           4 :                 if (PyLong_Check(py_secure_channel_type)) {
   48878           0 :                         unsigned long long test_var;
   48879           4 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   48880           4 :                         if (PyErr_Occurred() != NULL) {
   48881           0 :                                 return false;
   48882             :                         }
   48883           4 :                         if (test_var > uint_max) {
   48884           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48885             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48886           0 :                                 return false;
   48887             :                         }
   48888           4 :                         r->in.secure_channel_type = test_var;
   48889             :                 } else {
   48890           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48891             :                           PyLong_Type.tp_name);
   48892           0 :                         return false;
   48893             :                 }
   48894             :         }
   48895           4 :         if (py_computer_name == NULL) {
   48896           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   48897           0 :                 return false;
   48898             :         }
   48899           4 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   48900           4 :         if (r->in.computer_name == NULL) {
   48901           0 :                 PyErr_NoMemory();
   48902           0 :                 return false;
   48903             :         }
   48904             :         {
   48905           0 :                 const char *test_str;
   48906           0 :                 const char *talloc_str;
   48907           4 :                 PyObject *unicode = NULL;
   48908           4 :                 if (PyUnicode_Check(py_computer_name)) {
   48909           4 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   48910           4 :                         if (unicode == NULL) {
   48911           0 :                                 return false;
   48912             :                         }
   48913           4 :                         test_str = PyBytes_AS_STRING(unicode);
   48914           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   48915           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   48916             :                 } else {
   48917           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   48918           0 :                         return false;
   48919             :                 }
   48920           4 :                 talloc_str = talloc_strdup(r, test_str);
   48921           4 :                 if (unicode != NULL) {
   48922           4 :                         Py_DECREF(unicode);
   48923             :                 }
   48924           4 :                 if (talloc_str == NULL) {
   48925           0 :                         PyErr_NoMemory();
   48926           0 :                         return false;
   48927             :                 }
   48928           4 :                 r->in.computer_name = talloc_str;
   48929             :         }
   48930           4 :         if (py_credential == NULL) {
   48931           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   48932           0 :                 return false;
   48933             :         }
   48934           4 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   48935           4 :         if (r->in.credential == NULL) {
   48936           0 :                 PyErr_NoMemory();
   48937           0 :                 return false;
   48938             :         }
   48939           4 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   48940           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   48941           0 :                 PyErr_NoMemory();
   48942           0 :                 return false;
   48943             :         }
   48944           4 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   48945           4 :         if (py_new_password == NULL) {
   48946           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.new_password");
   48947           0 :                 return false;
   48948             :         }
   48949           4 :         r->in.new_password = talloc_ptrtype(r, r->in.new_password);
   48950           4 :         if (r->in.new_password == NULL) {
   48951           0 :                 PyErr_NoMemory();
   48952           0 :                 return false;
   48953             :         }
   48954           4 :         PY_CHECK_TYPE(&netr_CryptPassword_Type, py_new_password, return false;);
   48955           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_new_password)) == NULL) {
   48956           0 :                 PyErr_NoMemory();
   48957           0 :                 return false;
   48958             :         }
   48959           4 :         r->in.new_password = (struct netr_CryptPassword *)pytalloc_get_ptr(py_new_password);
   48960           4 :         return true;
   48961             : }
   48962             : 
   48963           4 : static PyObject *unpack_py_netr_ServerPasswordSet2_args_out(struct netr_ServerPasswordSet2 *r)
   48964             : {
   48965           0 :         PyObject *result;
   48966           0 :         PyObject *py_return_authenticator;
   48967           4 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   48968           4 :         result = py_return_authenticator;
   48969           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   48970           0 :                 PyErr_SetNTSTATUS(r->out.result);
   48971           0 :                 return NULL;
   48972             :         }
   48973             : 
   48974           4 :         return result;
   48975             : }
   48976             : 
   48977             : 
   48978           0 : static PyObject *py_netr_ServerPasswordGet_in_get_server_name(PyObject *obj, void *closure)
   48979             : {
   48980           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
   48981           0 :         PyObject *py_server_name;
   48982           0 :         if (object->in.server_name == NULL) {
   48983           0 :                 Py_RETURN_NONE;
   48984             :         }
   48985           0 :         if (object->in.server_name == NULL) {
   48986           0 :                 py_server_name = Py_None;
   48987           0 :                 Py_INCREF(py_server_name);
   48988             :         } else {
   48989           0 :                 if (object->in.server_name == NULL) {
   48990           0 :                         py_server_name = Py_None;
   48991           0 :                         Py_INCREF(py_server_name);
   48992             :                 } else {
   48993           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   48994             :                 }
   48995             :         }
   48996           0 :         return py_server_name;
   48997             : }
   48998             : 
   48999           0 : static int py_netr_ServerPasswordGet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   49000             : {
   49001           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49002           0 :         if (value == NULL) {
   49003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   49004           0 :                 return -1;
   49005             :         }
   49006           0 :         if (value == Py_None) {
   49007           0 :                 object->in.server_name = NULL;
   49008             :         } else {
   49009           0 :                 object->in.server_name = NULL;
   49010             :                 {
   49011           0 :                         const char *test_str;
   49012           0 :                         const char *talloc_str;
   49013           0 :                         PyObject *unicode = NULL;
   49014           0 :                         if (PyUnicode_Check(value)) {
   49015           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49016           0 :                                 if (unicode == NULL) {
   49017           0 :                                         return -1;
   49018             :                                 }
   49019           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49020           0 :                         } else if (PyBytes_Check(value)) {
   49021           0 :                                 test_str = PyBytes_AS_STRING(value);
   49022             :                         } else {
   49023           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49024           0 :                                 return -1;
   49025             :                         }
   49026           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49027           0 :                         if (unicode != NULL) {
   49028           0 :                                 Py_DECREF(unicode);
   49029             :                         }
   49030           0 :                         if (talloc_str == NULL) {
   49031           0 :                                 PyErr_NoMemory();
   49032           0 :                                 return -1;
   49033             :                         }
   49034           0 :                         object->in.server_name = talloc_str;
   49035             :                 }
   49036             :         }
   49037           0 :         return 0;
   49038             : }
   49039             : 
   49040           0 : static PyObject *py_netr_ServerPasswordGet_in_get_account_name(PyObject *obj, void *closure)
   49041             : {
   49042           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
   49043           0 :         PyObject *py_account_name;
   49044           0 :         if (object->in.account_name == NULL) {
   49045           0 :                 Py_RETURN_NONE;
   49046             :         }
   49047           0 :         if (object->in.account_name == NULL) {
   49048           0 :                 py_account_name = Py_None;
   49049           0 :                 Py_INCREF(py_account_name);
   49050             :         } else {
   49051           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   49052             :         }
   49053           0 :         return py_account_name;
   49054             : }
   49055             : 
   49056           0 : static int py_netr_ServerPasswordGet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   49057             : {
   49058           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49059           0 :         if (value == NULL) {
   49060           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   49061           0 :                 return -1;
   49062             :         }
   49063           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   49064           0 :         if (object->in.account_name == NULL) {
   49065           0 :                 PyErr_NoMemory();
   49066           0 :                 return -1;
   49067             :         }
   49068             :         {
   49069           0 :                 const char *test_str;
   49070           0 :                 const char *talloc_str;
   49071           0 :                 PyObject *unicode = NULL;
   49072           0 :                 if (PyUnicode_Check(value)) {
   49073           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49074           0 :                         if (unicode == NULL) {
   49075           0 :                                 return -1;
   49076             :                         }
   49077           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49078           0 :                 } else if (PyBytes_Check(value)) {
   49079           0 :                         test_str = PyBytes_AS_STRING(value);
   49080             :                 } else {
   49081           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49082           0 :                         return -1;
   49083             :                 }
   49084           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49085           0 :                 if (unicode != NULL) {
   49086           0 :                         Py_DECREF(unicode);
   49087             :                 }
   49088           0 :                 if (talloc_str == NULL) {
   49089           0 :                         PyErr_NoMemory();
   49090           0 :                         return -1;
   49091             :                 }
   49092           0 :                 object->in.account_name = talloc_str;
   49093             :         }
   49094           0 :         return 0;
   49095             : }
   49096             : 
   49097           0 : static PyObject *py_netr_ServerPasswordGet_in_get_secure_channel_type(PyObject *obj, void *closure)
   49098             : {
   49099           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
   49100           0 :         PyObject *py_secure_channel_type;
   49101           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
   49102           0 :         return py_secure_channel_type;
   49103             : }
   49104             : 
   49105           0 : static int py_netr_ServerPasswordGet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   49106             : {
   49107           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49108           0 :         if (value == NULL) {
   49109           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
   49110           0 :                 return -1;
   49111             :         }
   49112             :         {
   49113           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   49114           0 :                 if (PyLong_Check(value)) {
   49115           0 :                         unsigned long long test_var;
   49116           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   49117           0 :                         if (PyErr_Occurred() != NULL) {
   49118           0 :                                 return -1;
   49119             :                         }
   49120           0 :                         if (test_var > uint_max) {
   49121           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49122             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49123           0 :                                 return -1;
   49124             :                         }
   49125           0 :                         object->in.secure_channel_type = test_var;
   49126             :                 } else {
   49127           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49128             :                           PyLong_Type.tp_name);
   49129           0 :                         return -1;
   49130             :                 }
   49131             :         }
   49132           0 :         return 0;
   49133             : }
   49134             : 
   49135           0 : static PyObject *py_netr_ServerPasswordGet_in_get_computer_name(PyObject *obj, void *closure)
   49136             : {
   49137           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
   49138           0 :         PyObject *py_computer_name;
   49139           0 :         if (object->in.computer_name == NULL) {
   49140           0 :                 Py_RETURN_NONE;
   49141             :         }
   49142           0 :         if (object->in.computer_name == NULL) {
   49143           0 :                 py_computer_name = Py_None;
   49144           0 :                 Py_INCREF(py_computer_name);
   49145             :         } else {
   49146           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   49147             :         }
   49148           0 :         return py_computer_name;
   49149             : }
   49150             : 
   49151           0 : static int py_netr_ServerPasswordGet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   49152             : {
   49153           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49154           0 :         if (value == NULL) {
   49155           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   49156           0 :                 return -1;
   49157             :         }
   49158           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   49159           0 :         if (object->in.computer_name == NULL) {
   49160           0 :                 PyErr_NoMemory();
   49161           0 :                 return -1;
   49162             :         }
   49163             :         {
   49164           0 :                 const char *test_str;
   49165           0 :                 const char *talloc_str;
   49166           0 :                 PyObject *unicode = NULL;
   49167           0 :                 if (PyUnicode_Check(value)) {
   49168           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49169           0 :                         if (unicode == NULL) {
   49170           0 :                                 return -1;
   49171             :                         }
   49172           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49173           0 :                 } else if (PyBytes_Check(value)) {
   49174           0 :                         test_str = PyBytes_AS_STRING(value);
   49175             :                 } else {
   49176           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49177           0 :                         return -1;
   49178             :                 }
   49179           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49180           0 :                 if (unicode != NULL) {
   49181           0 :                         Py_DECREF(unicode);
   49182             :                 }
   49183           0 :                 if (talloc_str == NULL) {
   49184           0 :                         PyErr_NoMemory();
   49185           0 :                         return -1;
   49186             :                 }
   49187           0 :                 object->in.computer_name = talloc_str;
   49188             :         }
   49189           0 :         return 0;
   49190             : }
   49191             : 
   49192           0 : static PyObject *py_netr_ServerPasswordGet_in_get_credential(PyObject *obj, void *closure)
   49193             : {
   49194           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
   49195           0 :         PyObject *py_credential;
   49196           0 :         if (object->in.credential == NULL) {
   49197           0 :                 Py_RETURN_NONE;
   49198             :         }
   49199           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   49200           0 :         return py_credential;
   49201             : }
   49202             : 
   49203           0 : static int py_netr_ServerPasswordGet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   49204             : {
   49205           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49206           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   49207           0 :         if (value == NULL) {
   49208           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   49209           0 :                 return -1;
   49210             :         }
   49211           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   49212           0 :         if (object->in.credential == NULL) {
   49213           0 :                 PyErr_NoMemory();
   49214           0 :                 return -1;
   49215             :         }
   49216           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49217           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49218           0 :                 PyErr_NoMemory();
   49219           0 :                 return -1;
   49220             :         }
   49221           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   49222           0 :         return 0;
   49223             : }
   49224             : 
   49225           0 : static PyObject *py_netr_ServerPasswordGet_out_get_return_authenticator(PyObject *obj, void *closure)
   49226             : {
   49227           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
   49228           0 :         PyObject *py_return_authenticator;
   49229           0 :         if (object->out.return_authenticator == NULL) {
   49230           0 :                 Py_RETURN_NONE;
   49231             :         }
   49232           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   49233           0 :         return py_return_authenticator;
   49234             : }
   49235             : 
   49236           0 : static int py_netr_ServerPasswordGet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   49237             : {
   49238           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49239           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   49240           0 :         if (value == NULL) {
   49241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   49242           0 :                 return -1;
   49243             :         }
   49244           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   49245           0 :         if (object->out.return_authenticator == NULL) {
   49246           0 :                 PyErr_NoMemory();
   49247           0 :                 return -1;
   49248             :         }
   49249           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49250           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49251           0 :                 PyErr_NoMemory();
   49252           0 :                 return -1;
   49253             :         }
   49254           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   49255           0 :         return 0;
   49256             : }
   49257             : 
   49258           0 : static PyObject *py_netr_ServerPasswordGet_out_get_password(PyObject *obj, void *closure)
   49259             : {
   49260           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
   49261           0 :         PyObject *py_password;
   49262           0 :         if (object->out.password == NULL) {
   49263           0 :                 Py_RETURN_NONE;
   49264             :         }
   49265           0 :         py_password = pytalloc_reference_ex(samr_Password_Type, object->out.password, object->out.password);
   49266           0 :         return py_password;
   49267             : }
   49268             : 
   49269           0 : static int py_netr_ServerPasswordGet_out_set_password(PyObject *py_obj, PyObject *value, void *closure)
   49270             : {
   49271           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49272           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.password));
   49273           0 :         if (value == NULL) {
   49274           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.password");
   49275           0 :                 return -1;
   49276             :         }
   49277           0 :         object->out.password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.password);
   49278           0 :         if (object->out.password == NULL) {
   49279           0 :                 PyErr_NoMemory();
   49280           0 :                 return -1;
   49281             :         }
   49282           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   49283           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49284           0 :                 PyErr_NoMemory();
   49285           0 :                 return -1;
   49286             :         }
   49287           0 :         object->out.password = (struct samr_Password *)pytalloc_get_ptr(value);
   49288           0 :         return 0;
   49289             : }
   49290             : 
   49291           0 : static PyObject *py_netr_ServerPasswordGet_get_result(PyObject *obj, void *closure)
   49292             : {
   49293           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
   49294           0 :         PyObject *py_result;
   49295           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   49296           0 :         return py_result;
   49297             : }
   49298             : 
   49299           0 : static int py_netr_ServerPasswordGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   49300             : {
   49301           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49302           0 :         if (value == NULL) {
   49303           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   49304           0 :                 return -1;
   49305             :         }
   49306           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   49307           0 :         return 0;
   49308             : }
   49309             : 
   49310             : static PyGetSetDef py_netr_ServerPasswordGet_getsetters[] = {
   49311             :         {
   49312             :                 .name = discard_const_p(char, "in_server_name"),
   49313             :                 .get = py_netr_ServerPasswordGet_in_get_server_name,
   49314             :                 .set = py_netr_ServerPasswordGet_in_set_server_name,
   49315             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49316             :         },
   49317             :         {
   49318             :                 .name = discard_const_p(char, "in_account_name"),
   49319             :                 .get = py_netr_ServerPasswordGet_in_get_account_name,
   49320             :                 .set = py_netr_ServerPasswordGet_in_set_account_name,
   49321             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49322             :         },
   49323             :         {
   49324             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   49325             :                 .get = py_netr_ServerPasswordGet_in_get_secure_channel_type,
   49326             :                 .set = py_netr_ServerPasswordGet_in_set_secure_channel_type,
   49327             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   49328             :         },
   49329             :         {
   49330             :                 .name = discard_const_p(char, "in_computer_name"),
   49331             :                 .get = py_netr_ServerPasswordGet_in_get_computer_name,
   49332             :                 .set = py_netr_ServerPasswordGet_in_set_computer_name,
   49333             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49334             :         },
   49335             :         {
   49336             :                 .name = discard_const_p(char, "in_credential"),
   49337             :                 .get = py_netr_ServerPasswordGet_in_get_credential,
   49338             :                 .set = py_netr_ServerPasswordGet_in_set_credential,
   49339             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   49340             :         },
   49341             :         {
   49342             :                 .name = discard_const_p(char, "out_return_authenticator"),
   49343             :                 .get = py_netr_ServerPasswordGet_out_get_return_authenticator,
   49344             :                 .set = py_netr_ServerPasswordGet_out_set_return_authenticator,
   49345             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   49346             :         },
   49347             :         {
   49348             :                 .name = discard_const_p(char, "out_password"),
   49349             :                 .get = py_netr_ServerPasswordGet_out_get_password,
   49350             :                 .set = py_netr_ServerPasswordGet_out_set_password,
   49351             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   49352             :         },
   49353             :         {
   49354             :                 .name = discard_const_p(char, "result"),
   49355             :                 .get = py_netr_ServerPasswordGet_get_result,
   49356             :                 .set = py_netr_ServerPasswordGet_set_result,
   49357             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   49358             :         },
   49359             :         { .name = NULL }
   49360             : };
   49361             : 
   49362           0 : static PyObject *py_netr_ServerPasswordGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   49363             : {
   49364           0 :         PyObject *self = pytalloc_new(struct netr_ServerPasswordGet, type);
   49365           0 :         struct netr_ServerPasswordGet *_self = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(self);
   49366           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   49367           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   49368           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   49369           0 :         _self->out.password = talloc_zero(mem_ctx, struct samr_Password);
   49370           0 :         return self;
   49371             : }
   49372             : 
   49373           0 : static PyObject *py_netr_ServerPasswordGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   49374             : {
   49375             : 
   49376             : 
   49377           0 :         return PyLong_FromLong(31);
   49378             : }
   49379             : 
   49380           0 : static PyObject *py_netr_ServerPasswordGet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   49381             : {
   49382           0 :         const struct ndr_interface_call *call = NULL;
   49383           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49384           0 :         PyObject *ret = NULL;
   49385           0 :         struct ndr_push *push = NULL;
   49386           0 :         DATA_BLOB blob;
   49387           0 :         enum ndr_err_code err;
   49388             : 
   49389           0 :         if (ndr_table_netlogon.num_calls < 32) {
   49390           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_pack");
   49391           0 :                 return NULL;
   49392             :         }
   49393           0 :         call = &ndr_table_netlogon.calls[31];
   49394             : 
   49395           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   49396           0 :         if (push == NULL) {
   49397           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49398           0 :                 return NULL;
   49399             :         }
   49400             : 
   49401           0 :         push->flags |= ndr_push_flags;
   49402             : 
   49403           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   49404           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49405           0 :                 TALLOC_FREE(push);
   49406           0 :                 PyErr_SetNdrError(err);
   49407           0 :                 return NULL;
   49408             :         }
   49409           0 :         blob = ndr_push_blob(push);
   49410           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   49411           0 :         TALLOC_FREE(push);
   49412           0 :         return ret;
   49413             : }
   49414             : 
   49415           0 : static PyObject *py_netr_ServerPasswordGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49416             : {
   49417           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49418           0 :         PyObject *bigendian_obj = NULL;
   49419           0 :         PyObject *ndr64_obj = NULL;
   49420           0 :         libndr_flags ndr_push_flags = 0;
   49421             : 
   49422           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   49423             :                 discard_const_p(char *, kwnames),
   49424             :                 &bigendian_obj,
   49425             :                 &ndr64_obj)) {
   49426           0 :                 return NULL;
   49427             :         }
   49428             : 
   49429           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49430           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49431             :         }
   49432           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49433           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49434             :         }
   49435             : 
   49436           0 :         return py_netr_ServerPasswordGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   49437             : }
   49438             : 
   49439           0 : static PyObject *py_netr_ServerPasswordGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49440             : {
   49441           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49442           0 :         PyObject *bigendian_obj = NULL;
   49443           0 :         PyObject *ndr64_obj = NULL;
   49444           0 :         libndr_flags ndr_push_flags = 0;
   49445             : 
   49446           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   49447             :                 discard_const_p(char *, kwnames),
   49448             :                 &bigendian_obj,
   49449             :                 &ndr64_obj)) {
   49450           0 :                 return NULL;
   49451             :         }
   49452             : 
   49453           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49454           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49455             :         }
   49456           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49457           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49458             :         }
   49459             : 
   49460           0 :         return py_netr_ServerPasswordGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   49461             : }
   49462             : 
   49463           0 : static PyObject *py_netr_ServerPasswordGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   49464             : {
   49465           0 :         const struct ndr_interface_call *call = NULL;
   49466           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49467           0 :         struct ndr_pull *pull = NULL;
   49468           0 :         enum ndr_err_code err;
   49469             : 
   49470           0 :         if (ndr_table_netlogon.num_calls < 32) {
   49471           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_unpack");
   49472           0 :                 return NULL;
   49473             :         }
   49474           0 :         call = &ndr_table_netlogon.calls[31];
   49475             : 
   49476           0 :         pull = ndr_pull_init_blob(blob, object);
   49477           0 :         if (pull == NULL) {
   49478           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49479           0 :                 return NULL;
   49480             :         }
   49481             : 
   49482           0 :         pull->flags |= ndr_pull_flags;
   49483             : 
   49484           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   49485           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49486           0 :                 TALLOC_FREE(pull);
   49487           0 :                 PyErr_SetNdrError(err);
   49488           0 :                 return NULL;
   49489             :         }
   49490           0 :         if (!allow_remaining) {
   49491           0 :                 uint32_t highest_ofs;
   49492             : 
   49493           0 :                 if (pull->offset > pull->relative_highest_offset) {
   49494           0 :                         highest_ofs = pull->offset;
   49495             :                 } else {
   49496           0 :                         highest_ofs = pull->relative_highest_offset;
   49497             :                 }
   49498           0 :                 if (highest_ofs < pull->data_size) {
   49499           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   49500             :                                 "not all bytes consumed ofs[%u] size[%u]",
   49501             :                                 highest_ofs, pull->data_size);
   49502           0 :                         TALLOC_FREE(pull);
   49503           0 :                         PyErr_SetNdrError(err);
   49504           0 :                         return NULL;
   49505             :                 }
   49506             :         }
   49507             : 
   49508           0 :         TALLOC_FREE(pull);
   49509           0 :         Py_RETURN_NONE;
   49510             : }
   49511             : 
   49512           0 : static PyObject *py_netr_ServerPasswordGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49513             : {
   49514           0 :         DATA_BLOB blob;
   49515           0 :         Py_ssize_t blob_length = 0;
   49516           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49517           0 :         PyObject *bigendian_obj = NULL;
   49518           0 :         PyObject *ndr64_obj = NULL;
   49519           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49520           0 :         PyObject *allow_remaining_obj = NULL;
   49521           0 :         bool allow_remaining = false;
   49522             : 
   49523           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   49524             :                 discard_const_p(char *, kwnames),
   49525             :                 &blob.data, &blob_length,
   49526             :                 &bigendian_obj,
   49527             :                 &ndr64_obj,
   49528             :                 &allow_remaining_obj)) {
   49529           0 :                 return NULL;
   49530             :         }
   49531           0 :         blob.length = blob_length;
   49532             : 
   49533           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49534           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49535             :         }
   49536           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49537           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49538             :         }
   49539             : 
   49540           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49541           0 :                 allow_remaining = true;
   49542             :         }
   49543             : 
   49544           0 :         return py_netr_ServerPasswordGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   49545             : }
   49546             : 
   49547           0 : static PyObject *py_netr_ServerPasswordGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49548             : {
   49549           0 :         DATA_BLOB blob;
   49550           0 :         Py_ssize_t blob_length = 0;
   49551           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49552           0 :         PyObject *bigendian_obj = NULL;
   49553           0 :         PyObject *ndr64_obj = NULL;
   49554           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49555           0 :         PyObject *allow_remaining_obj = NULL;
   49556           0 :         bool allow_remaining = false;
   49557             : 
   49558           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   49559             :                 discard_const_p(char *, kwnames),
   49560             :                 &blob.data, &blob_length,
   49561             :                 &bigendian_obj,
   49562             :                 &ndr64_obj,
   49563             :                 &allow_remaining_obj)) {
   49564           0 :                 return NULL;
   49565             :         }
   49566           0 :         blob.length = blob_length;
   49567             : 
   49568           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49569           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49570             :         }
   49571           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49572           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49573             :         }
   49574             : 
   49575           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49576           0 :                 allow_remaining = true;
   49577             :         }
   49578             : 
   49579           0 :         return py_netr_ServerPasswordGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   49580             : }
   49581             : 
   49582           0 : static PyObject *py_netr_ServerPasswordGet_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   49583             : {
   49584           0 :         const struct ndr_interface_call *call = NULL;
   49585           0 :         struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
   49586           0 :         PyObject *ret;
   49587           0 :         char *retstr;
   49588             : 
   49589           0 :         if (ndr_table_netlogon.num_calls < 32) {
   49590           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_print");
   49591           0 :                 return NULL;
   49592             :         }
   49593           0 :         call = &ndr_table_netlogon.calls[31];
   49594             : 
   49595           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   49596           0 :         ret = PyUnicode_FromString(retstr);
   49597           0 :         TALLOC_FREE(retstr);
   49598             : 
   49599           0 :         return ret;
   49600             : }
   49601             : 
   49602           0 : static PyObject *py_netr_ServerPasswordGet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49603             : {
   49604           0 :         return py_netr_ServerPasswordGet_ndr_print(py_obj, "netr_ServerPasswordGet_in", NDR_IN);
   49605             : }
   49606             : 
   49607           0 : static PyObject *py_netr_ServerPasswordGet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49608             : {
   49609           0 :         return py_netr_ServerPasswordGet_ndr_print(py_obj, "netr_ServerPasswordGet_out", NDR_OUT);
   49610             : }
   49611             : 
   49612             : static PyMethodDef py_netr_ServerPasswordGet_methods[] = {
   49613             :         { "opnum", (PyCFunction)py_netr_ServerPasswordGet_ndr_opnum, METH_NOARGS|METH_CLASS,
   49614             :                 "netlogon.netr_ServerPasswordGet.opnum() -> 31 (0x1f) " },
   49615             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   49616             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   49617             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   49618             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   49619             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   49620             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   49621             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   49622             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   49623             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerPasswordGet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   49624             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerPasswordGet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   49625             :         { NULL, NULL, 0, NULL }
   49626             : };
   49627             : 
   49628             : 
   49629             : static PyTypeObject netr_ServerPasswordGet_Type = {
   49630             :         PyVarObject_HEAD_INIT(NULL, 0)
   49631             :         .tp_name = "netlogon.netr_ServerPasswordGet",
   49632             :         .tp_getset = py_netr_ServerPasswordGet_getsetters,
   49633             :         .tp_methods = py_netr_ServerPasswordGet_methods,
   49634             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   49635             :         .tp_new = py_netr_ServerPasswordGet_new,
   49636             : };
   49637             : 
   49638           0 : static bool pack_py_netr_ServerPasswordGet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordGet *r)
   49639             : {
   49640           0 :         PyObject *py_server_name;
   49641           0 :         PyObject *py_account_name;
   49642           0 :         PyObject *py_secure_channel_type;
   49643           0 :         PyObject *py_computer_name;
   49644           0 :         PyObject *py_credential;
   49645           0 :         const char *kwnames[] = {
   49646             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
   49647             :         };
   49648             : 
   49649           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)) {
   49650           0 :                 return false;
   49651             :         }
   49652             : 
   49653           0 :         if (py_server_name == NULL) {
   49654           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   49655           0 :                 return false;
   49656             :         }
   49657           0 :         if (py_server_name == Py_None) {
   49658           0 :                 r->in.server_name = NULL;
   49659             :         } else {
   49660           0 :                 r->in.server_name = NULL;
   49661             :                 {
   49662           0 :                         const char *test_str;
   49663           0 :                         const char *talloc_str;
   49664           0 :                         PyObject *unicode = NULL;
   49665           0 :                         if (PyUnicode_Check(py_server_name)) {
   49666           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   49667           0 :                                 if (unicode == NULL) {
   49668           0 :                                         return false;
   49669             :                                 }
   49670           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49671           0 :                         } else if (PyBytes_Check(py_server_name)) {
   49672           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   49673             :                         } else {
   49674           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   49675           0 :                                 return false;
   49676             :                         }
   49677           0 :                         talloc_str = talloc_strdup(r, test_str);
   49678           0 :                         if (unicode != NULL) {
   49679           0 :                                 Py_DECREF(unicode);
   49680             :                         }
   49681           0 :                         if (talloc_str == NULL) {
   49682           0 :                                 PyErr_NoMemory();
   49683           0 :                                 return false;
   49684             :                         }
   49685           0 :                         r->in.server_name = talloc_str;
   49686             :                 }
   49687             :         }
   49688           0 :         if (py_account_name == NULL) {
   49689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   49690           0 :                 return false;
   49691             :         }
   49692           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   49693           0 :         if (r->in.account_name == NULL) {
   49694           0 :                 PyErr_NoMemory();
   49695           0 :                 return false;
   49696             :         }
   49697             :         {
   49698           0 :                 const char *test_str;
   49699           0 :                 const char *talloc_str;
   49700           0 :                 PyObject *unicode = NULL;
   49701           0 :                 if (PyUnicode_Check(py_account_name)) {
   49702           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   49703           0 :                         if (unicode == NULL) {
   49704           0 :                                 return false;
   49705             :                         }
   49706           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49707           0 :                 } else if (PyBytes_Check(py_account_name)) {
   49708           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   49709             :                 } else {
   49710           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   49711           0 :                         return false;
   49712             :                 }
   49713           0 :                 talloc_str = talloc_strdup(r, test_str);
   49714           0 :                 if (unicode != NULL) {
   49715           0 :                         Py_DECREF(unicode);
   49716             :                 }
   49717           0 :                 if (talloc_str == NULL) {
   49718           0 :                         PyErr_NoMemory();
   49719           0 :                         return false;
   49720             :                 }
   49721           0 :                 r->in.account_name = talloc_str;
   49722             :         }
   49723           0 :         if (py_secure_channel_type == NULL) {
   49724           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
   49725           0 :                 return false;
   49726             :         }
   49727             :         {
   49728           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   49729           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   49730           0 :                         unsigned long long test_var;
   49731           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   49732           0 :                         if (PyErr_Occurred() != NULL) {
   49733           0 :                                 return false;
   49734             :                         }
   49735           0 :                         if (test_var > uint_max) {
   49736           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49737             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49738           0 :                                 return false;
   49739             :                         }
   49740           0 :                         r->in.secure_channel_type = test_var;
   49741             :                 } else {
   49742           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49743             :                           PyLong_Type.tp_name);
   49744           0 :                         return false;
   49745             :                 }
   49746             :         }
   49747           0 :         if (py_computer_name == NULL) {
   49748           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   49749           0 :                 return false;
   49750             :         }
   49751           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   49752           0 :         if (r->in.computer_name == NULL) {
   49753           0 :                 PyErr_NoMemory();
   49754           0 :                 return false;
   49755             :         }
   49756             :         {
   49757           0 :                 const char *test_str;
   49758           0 :                 const char *talloc_str;
   49759           0 :                 PyObject *unicode = NULL;
   49760           0 :                 if (PyUnicode_Check(py_computer_name)) {
   49761           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   49762           0 :                         if (unicode == NULL) {
   49763           0 :                                 return false;
   49764             :                         }
   49765           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49766           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   49767           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   49768             :                 } else {
   49769           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   49770           0 :                         return false;
   49771             :                 }
   49772           0 :                 talloc_str = talloc_strdup(r, test_str);
   49773           0 :                 if (unicode != NULL) {
   49774           0 :                         Py_DECREF(unicode);
   49775             :                 }
   49776           0 :                 if (talloc_str == NULL) {
   49777           0 :                         PyErr_NoMemory();
   49778           0 :                         return false;
   49779             :                 }
   49780           0 :                 r->in.computer_name = talloc_str;
   49781             :         }
   49782           0 :         if (py_credential == NULL) {
   49783           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   49784           0 :                 return false;
   49785             :         }
   49786           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   49787           0 :         if (r->in.credential == NULL) {
   49788           0 :                 PyErr_NoMemory();
   49789           0 :                 return false;
   49790             :         }
   49791           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   49792           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   49793           0 :                 PyErr_NoMemory();
   49794           0 :                 return false;
   49795             :         }
   49796           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   49797           0 :         return true;
   49798             : }
   49799             : 
   49800           0 : static PyObject *unpack_py_netr_ServerPasswordGet_args_out(struct netr_ServerPasswordGet *r)
   49801             : {
   49802           0 :         PyObject *result;
   49803           0 :         PyObject *py_return_authenticator;
   49804           0 :         PyObject *py_password;
   49805           0 :         result = PyTuple_New(2);
   49806           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   49807           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   49808           0 :         py_password = pytalloc_reference_ex(samr_Password_Type, r->out.password, r->out.password);
   49809           0 :         PyTuple_SetItem(result, 1, py_password);
   49810           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   49811           0 :                 PyErr_SetNTSTATUS(r->out.result);
   49812           0 :                 return NULL;
   49813             :         }
   49814             : 
   49815           0 :         return result;
   49816             : }
   49817             : 
   49818             : 
   49819           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_server_name(PyObject *obj, void *closure)
   49820             : {
   49821           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
   49822           0 :         PyObject *py_server_name;
   49823           0 :         if (object->in.server_name == NULL) {
   49824           0 :                 Py_RETURN_NONE;
   49825             :         }
   49826           0 :         if (object->in.server_name == NULL) {
   49827           0 :                 py_server_name = Py_None;
   49828           0 :                 Py_INCREF(py_server_name);
   49829             :         } else {
   49830           0 :                 if (object->in.server_name == NULL) {
   49831           0 :                         py_server_name = Py_None;
   49832           0 :                         Py_INCREF(py_server_name);
   49833             :                 } else {
   49834           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   49835             :                 }
   49836             :         }
   49837           0 :         return py_server_name;
   49838             : }
   49839             : 
   49840           0 : static int py_netr_NetrLogonSendToSam_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   49841             : {
   49842           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   49843           0 :         if (value == NULL) {
   49844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   49845           0 :                 return -1;
   49846             :         }
   49847           0 :         if (value == Py_None) {
   49848           0 :                 object->in.server_name = NULL;
   49849             :         } else {
   49850           0 :                 object->in.server_name = NULL;
   49851             :                 {
   49852           0 :                         const char *test_str;
   49853           0 :                         const char *talloc_str;
   49854           0 :                         PyObject *unicode = NULL;
   49855           0 :                         if (PyUnicode_Check(value)) {
   49856           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49857           0 :                                 if (unicode == NULL) {
   49858           0 :                                         return -1;
   49859             :                                 }
   49860           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49861           0 :                         } else if (PyBytes_Check(value)) {
   49862           0 :                                 test_str = PyBytes_AS_STRING(value);
   49863             :                         } else {
   49864           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49865           0 :                                 return -1;
   49866             :                         }
   49867           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49868           0 :                         if (unicode != NULL) {
   49869           0 :                                 Py_DECREF(unicode);
   49870             :                         }
   49871           0 :                         if (talloc_str == NULL) {
   49872           0 :                                 PyErr_NoMemory();
   49873           0 :                                 return -1;
   49874             :                         }
   49875           0 :                         object->in.server_name = talloc_str;
   49876             :                 }
   49877             :         }
   49878           0 :         return 0;
   49879             : }
   49880             : 
   49881           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_computer_name(PyObject *obj, void *closure)
   49882             : {
   49883           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
   49884           0 :         PyObject *py_computer_name;
   49885           0 :         if (object->in.computer_name == NULL) {
   49886           0 :                 Py_RETURN_NONE;
   49887             :         }
   49888           0 :         if (object->in.computer_name == NULL) {
   49889           0 :                 py_computer_name = Py_None;
   49890           0 :                 Py_INCREF(py_computer_name);
   49891             :         } else {
   49892           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   49893             :         }
   49894           0 :         return py_computer_name;
   49895             : }
   49896             : 
   49897           0 : static int py_netr_NetrLogonSendToSam_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   49898             : {
   49899           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   49900           0 :         if (value == NULL) {
   49901           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   49902           0 :                 return -1;
   49903             :         }
   49904           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   49905           0 :         if (object->in.computer_name == NULL) {
   49906           0 :                 PyErr_NoMemory();
   49907           0 :                 return -1;
   49908             :         }
   49909             :         {
   49910           0 :                 const char *test_str;
   49911           0 :                 const char *talloc_str;
   49912           0 :                 PyObject *unicode = NULL;
   49913           0 :                 if (PyUnicode_Check(value)) {
   49914           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49915           0 :                         if (unicode == NULL) {
   49916           0 :                                 return -1;
   49917             :                         }
   49918           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49919           0 :                 } else if (PyBytes_Check(value)) {
   49920           0 :                         test_str = PyBytes_AS_STRING(value);
   49921             :                 } else {
   49922           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49923           0 :                         return -1;
   49924             :                 }
   49925           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49926           0 :                 if (unicode != NULL) {
   49927           0 :                         Py_DECREF(unicode);
   49928             :                 }
   49929           0 :                 if (talloc_str == NULL) {
   49930           0 :                         PyErr_NoMemory();
   49931           0 :                         return -1;
   49932             :                 }
   49933           0 :                 object->in.computer_name = talloc_str;
   49934             :         }
   49935           0 :         return 0;
   49936             : }
   49937             : 
   49938           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_credential(PyObject *obj, void *closure)
   49939             : {
   49940           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
   49941           0 :         PyObject *py_credential;
   49942           0 :         if (object->in.credential == NULL) {
   49943           0 :                 Py_RETURN_NONE;
   49944             :         }
   49945           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   49946           0 :         return py_credential;
   49947             : }
   49948             : 
   49949           0 : static int py_netr_NetrLogonSendToSam_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   49950             : {
   49951           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   49952           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   49953           0 :         if (value == NULL) {
   49954           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   49955           0 :                 return -1;
   49956             :         }
   49957           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   49958           0 :         if (object->in.credential == NULL) {
   49959           0 :                 PyErr_NoMemory();
   49960           0 :                 return -1;
   49961             :         }
   49962           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49963           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49964           0 :                 PyErr_NoMemory();
   49965           0 :                 return -1;
   49966             :         }
   49967           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   49968           0 :         return 0;
   49969             : }
   49970             : 
   49971           0 : static PyObject *py_netr_NetrLogonSendToSam_out_get_return_authenticator(PyObject *obj, void *closure)
   49972             : {
   49973           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
   49974           0 :         PyObject *py_return_authenticator;
   49975           0 :         if (object->out.return_authenticator == NULL) {
   49976           0 :                 Py_RETURN_NONE;
   49977             :         }
   49978           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   49979           0 :         return py_return_authenticator;
   49980             : }
   49981             : 
   49982           0 : static int py_netr_NetrLogonSendToSam_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   49983             : {
   49984           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   49985           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   49986           0 :         if (value == NULL) {
   49987           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   49988           0 :                 return -1;
   49989             :         }
   49990           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   49991           0 :         if (object->out.return_authenticator == NULL) {
   49992           0 :                 PyErr_NoMemory();
   49993           0 :                 return -1;
   49994             :         }
   49995           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49996           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49997           0 :                 PyErr_NoMemory();
   49998           0 :                 return -1;
   49999             :         }
   50000           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   50001           0 :         return 0;
   50002             : }
   50003             : 
   50004           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_opaque_buffer(PyObject *obj, void *closure)
   50005             : {
   50006           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
   50007           0 :         PyObject *py_opaque_buffer;
   50008           0 :         if (object->in.opaque_buffer == NULL) {
   50009           0 :                 Py_RETURN_NONE;
   50010             :         }
   50011           0 :         py_opaque_buffer = PyList_New(object->in.buffer_len);
   50012           0 :         if (py_opaque_buffer == NULL) {
   50013           0 :                 return NULL;
   50014             :         }
   50015             :         {
   50016             :                 int opaque_buffer_cntr_1;
   50017           0 :                 for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < (object->in.buffer_len); opaque_buffer_cntr_1++) {
   50018           0 :                         PyObject *py_opaque_buffer_1;
   50019           0 :                         py_opaque_buffer_1 = PyLong_FromLong((uint16_t)((object->in.opaque_buffer)[opaque_buffer_cntr_1]));
   50020           0 :                         PyList_SetItem(py_opaque_buffer, opaque_buffer_cntr_1, py_opaque_buffer_1);
   50021             :                 }
   50022             :         }
   50023           0 :         return py_opaque_buffer;
   50024             : }
   50025             : 
   50026           0 : static int py_netr_NetrLogonSendToSam_in_set_opaque_buffer(PyObject *py_obj, PyObject *value, void *closure)
   50027             : {
   50028           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   50029           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.opaque_buffer));
   50030           0 :         if (value == NULL) {
   50031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.opaque_buffer");
   50032           0 :                 return -1;
   50033             :         }
   50034           0 :         object->in.opaque_buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.opaque_buffer);
   50035           0 :         if (object->in.opaque_buffer == NULL) {
   50036           0 :                 PyErr_NoMemory();
   50037           0 :                 return -1;
   50038             :         }
   50039           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   50040             :         {
   50041           0 :                 int opaque_buffer_cntr_1;
   50042           0 :                 object->in.opaque_buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.opaque_buffer, PyList_GET_SIZE(value));
   50043           0 :                 if (!object->in.opaque_buffer) { return -1; }
   50044           0 :                 talloc_set_name_const(object->in.opaque_buffer, "ARRAY: object->in.opaque_buffer");
   50045           0 :                 for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < PyList_GET_SIZE(value); opaque_buffer_cntr_1++) {
   50046           0 :                         if (PyList_GET_ITEM(value, opaque_buffer_cntr_1) == NULL) {
   50047           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->in.opaque_buffer)[opaque_buffer_cntr_1]");
   50048           0 :                                 return -1;
   50049             :                         }
   50050             :                         {
   50051           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->in.opaque_buffer)[opaque_buffer_cntr_1]));
   50052           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, opaque_buffer_cntr_1))) {
   50053           0 :                                         unsigned long long test_var;
   50054           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, opaque_buffer_cntr_1));
   50055           0 :                                         if (PyErr_Occurred() != NULL) {
   50056           0 :                                                 return -1;
   50057             :                                         }
   50058           0 :                                         if (test_var > uint_max) {
   50059           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50060             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   50061           0 :                                                 return -1;
   50062             :                                         }
   50063           0 :                                         (object->in.opaque_buffer)[opaque_buffer_cntr_1] = test_var;
   50064             :                                 } else {
   50065           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50066             :                                           PyLong_Type.tp_name);
   50067           0 :                                         return -1;
   50068             :                                 }
   50069             :                         }
   50070             :                 }
   50071             :         }
   50072           0 :         return 0;
   50073             : }
   50074             : 
   50075           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_buffer_len(PyObject *obj, void *closure)
   50076             : {
   50077           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
   50078           0 :         PyObject *py_buffer_len;
   50079           0 :         py_buffer_len = PyLong_FromUnsignedLongLong((uint32_t)(object->in.buffer_len));
   50080           0 :         return py_buffer_len;
   50081             : }
   50082             : 
   50083           0 : static int py_netr_NetrLogonSendToSam_in_set_buffer_len(PyObject *py_obj, PyObject *value, void *closure)
   50084             : {
   50085           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   50086           0 :         if (value == NULL) {
   50087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.buffer_len");
   50088           0 :                 return -1;
   50089             :         }
   50090             :         {
   50091           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffer_len));
   50092           0 :                 if (PyLong_Check(value)) {
   50093           0 :                         unsigned long long test_var;
   50094           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   50095           0 :                         if (PyErr_Occurred() != NULL) {
   50096           0 :                                 return -1;
   50097             :                         }
   50098           0 :                         if (test_var > uint_max) {
   50099           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50100             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50101           0 :                                 return -1;
   50102             :                         }
   50103           0 :                         object->in.buffer_len = test_var;
   50104             :                 } else {
   50105           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50106             :                           PyLong_Type.tp_name);
   50107           0 :                         return -1;
   50108             :                 }
   50109             :         }
   50110           0 :         return 0;
   50111             : }
   50112             : 
   50113           0 : static PyObject *py_netr_NetrLogonSendToSam_get_result(PyObject *obj, void *closure)
   50114             : {
   50115           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
   50116           0 :         PyObject *py_result;
   50117           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   50118           0 :         return py_result;
   50119             : }
   50120             : 
   50121           0 : static int py_netr_NetrLogonSendToSam_set_result(PyObject *py_obj, PyObject *value, void *closure)
   50122             : {
   50123           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   50124           0 :         if (value == NULL) {
   50125           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   50126           0 :                 return -1;
   50127             :         }
   50128           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   50129           0 :         return 0;
   50130             : }
   50131             : 
   50132             : static PyGetSetDef py_netr_NetrLogonSendToSam_getsetters[] = {
   50133             :         {
   50134             :                 .name = discard_const_p(char, "in_server_name"),
   50135             :                 .get = py_netr_NetrLogonSendToSam_in_get_server_name,
   50136             :                 .set = py_netr_NetrLogonSendToSam_in_set_server_name,
   50137             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50138             :         },
   50139             :         {
   50140             :                 .name = discard_const_p(char, "in_computer_name"),
   50141             :                 .get = py_netr_NetrLogonSendToSam_in_get_computer_name,
   50142             :                 .set = py_netr_NetrLogonSendToSam_in_set_computer_name,
   50143             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50144             :         },
   50145             :         {
   50146             :                 .name = discard_const_p(char, "in_credential"),
   50147             :                 .get = py_netr_NetrLogonSendToSam_in_get_credential,
   50148             :                 .set = py_netr_NetrLogonSendToSam_in_set_credential,
   50149             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   50150             :         },
   50151             :         {
   50152             :                 .name = discard_const_p(char, "out_return_authenticator"),
   50153             :                 .get = py_netr_NetrLogonSendToSam_out_get_return_authenticator,
   50154             :                 .set = py_netr_NetrLogonSendToSam_out_set_return_authenticator,
   50155             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   50156             :         },
   50157             :         {
   50158             :                 .name = discard_const_p(char, "in_opaque_buffer"),
   50159             :                 .get = py_netr_NetrLogonSendToSam_in_get_opaque_buffer,
   50160             :                 .set = py_netr_NetrLogonSendToSam_in_set_opaque_buffer,
   50161             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   50162             :         },
   50163             :         {
   50164             :                 .name = discard_const_p(char, "in_buffer_len"),
   50165             :                 .get = py_netr_NetrLogonSendToSam_in_get_buffer_len,
   50166             :                 .set = py_netr_NetrLogonSendToSam_in_set_buffer_len,
   50167             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   50168             :         },
   50169             :         {
   50170             :                 .name = discard_const_p(char, "result"),
   50171             :                 .get = py_netr_NetrLogonSendToSam_get_result,
   50172             :                 .set = py_netr_NetrLogonSendToSam_set_result,
   50173             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   50174             :         },
   50175             :         { .name = NULL }
   50176             : };
   50177             : 
   50178           0 : static PyObject *py_netr_NetrLogonSendToSam_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   50179             : {
   50180           0 :         PyObject *self = pytalloc_new(struct netr_NetrLogonSendToSam, type);
   50181           0 :         struct netr_NetrLogonSendToSam *_self = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(self);
   50182           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   50183           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   50184           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   50185           0 :         _self->in.opaque_buffer = talloc_zero(mem_ctx, uint8_t);
   50186           0 :         return self;
   50187             : }
   50188             : 
   50189           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   50190             : {
   50191             : 
   50192             : 
   50193           0 :         return PyLong_FromLong(32);
   50194             : }
   50195             : 
   50196           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   50197             : {
   50198           0 :         const struct ndr_interface_call *call = NULL;
   50199           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   50200           0 :         PyObject *ret = NULL;
   50201           0 :         struct ndr_push *push = NULL;
   50202           0 :         DATA_BLOB blob;
   50203           0 :         enum ndr_err_code err;
   50204             : 
   50205           0 :         if (ndr_table_netlogon.num_calls < 33) {
   50206           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_pack");
   50207           0 :                 return NULL;
   50208             :         }
   50209           0 :         call = &ndr_table_netlogon.calls[32];
   50210             : 
   50211           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   50212           0 :         if (push == NULL) {
   50213           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50214           0 :                 return NULL;
   50215             :         }
   50216             : 
   50217           0 :         push->flags |= ndr_push_flags;
   50218             : 
   50219           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   50220           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50221           0 :                 TALLOC_FREE(push);
   50222           0 :                 PyErr_SetNdrError(err);
   50223           0 :                 return NULL;
   50224             :         }
   50225           0 :         blob = ndr_push_blob(push);
   50226           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   50227           0 :         TALLOC_FREE(push);
   50228           0 :         return ret;
   50229             : }
   50230             : 
   50231           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50232             : {
   50233           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50234           0 :         PyObject *bigendian_obj = NULL;
   50235           0 :         PyObject *ndr64_obj = NULL;
   50236           0 :         libndr_flags ndr_push_flags = 0;
   50237             : 
   50238           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   50239             :                 discard_const_p(char *, kwnames),
   50240             :                 &bigendian_obj,
   50241             :                 &ndr64_obj)) {
   50242           0 :                 return NULL;
   50243             :         }
   50244             : 
   50245           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50246           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50247             :         }
   50248           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50249           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50250             :         }
   50251             : 
   50252           0 :         return py_netr_NetrLogonSendToSam_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   50253             : }
   50254             : 
   50255           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50256             : {
   50257           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50258           0 :         PyObject *bigendian_obj = NULL;
   50259           0 :         PyObject *ndr64_obj = NULL;
   50260           0 :         libndr_flags ndr_push_flags = 0;
   50261             : 
   50262           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   50263             :                 discard_const_p(char *, kwnames),
   50264             :                 &bigendian_obj,
   50265             :                 &ndr64_obj)) {
   50266           0 :                 return NULL;
   50267             :         }
   50268             : 
   50269           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50270           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50271             :         }
   50272           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50273           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50274             :         }
   50275             : 
   50276           0 :         return py_netr_NetrLogonSendToSam_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   50277             : }
   50278             : 
   50279           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   50280             : {
   50281           0 :         const struct ndr_interface_call *call = NULL;
   50282           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   50283           0 :         struct ndr_pull *pull = NULL;
   50284           0 :         enum ndr_err_code err;
   50285             : 
   50286           0 :         if (ndr_table_netlogon.num_calls < 33) {
   50287           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_unpack");
   50288           0 :                 return NULL;
   50289             :         }
   50290           0 :         call = &ndr_table_netlogon.calls[32];
   50291             : 
   50292           0 :         pull = ndr_pull_init_blob(blob, object);
   50293           0 :         if (pull == NULL) {
   50294           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50295           0 :                 return NULL;
   50296             :         }
   50297             : 
   50298           0 :         pull->flags |= ndr_pull_flags;
   50299             : 
   50300           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   50301           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50302           0 :                 TALLOC_FREE(pull);
   50303           0 :                 PyErr_SetNdrError(err);
   50304           0 :                 return NULL;
   50305             :         }
   50306           0 :         if (!allow_remaining) {
   50307           0 :                 uint32_t highest_ofs;
   50308             : 
   50309           0 :                 if (pull->offset > pull->relative_highest_offset) {
   50310           0 :                         highest_ofs = pull->offset;
   50311             :                 } else {
   50312           0 :                         highest_ofs = pull->relative_highest_offset;
   50313             :                 }
   50314           0 :                 if (highest_ofs < pull->data_size) {
   50315           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   50316             :                                 "not all bytes consumed ofs[%u] size[%u]",
   50317             :                                 highest_ofs, pull->data_size);
   50318           0 :                         TALLOC_FREE(pull);
   50319           0 :                         PyErr_SetNdrError(err);
   50320           0 :                         return NULL;
   50321             :                 }
   50322             :         }
   50323             : 
   50324           0 :         TALLOC_FREE(pull);
   50325           0 :         Py_RETURN_NONE;
   50326             : }
   50327             : 
   50328           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50329             : {
   50330           0 :         DATA_BLOB blob;
   50331           0 :         Py_ssize_t blob_length = 0;
   50332           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50333           0 :         PyObject *bigendian_obj = NULL;
   50334           0 :         PyObject *ndr64_obj = NULL;
   50335           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50336           0 :         PyObject *allow_remaining_obj = NULL;
   50337           0 :         bool allow_remaining = false;
   50338             : 
   50339           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   50340             :                 discard_const_p(char *, kwnames),
   50341             :                 &blob.data, &blob_length,
   50342             :                 &bigendian_obj,
   50343             :                 &ndr64_obj,
   50344             :                 &allow_remaining_obj)) {
   50345           0 :                 return NULL;
   50346             :         }
   50347           0 :         blob.length = blob_length;
   50348             : 
   50349           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50350           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50351             :         }
   50352           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50353           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50354             :         }
   50355             : 
   50356           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50357           0 :                 allow_remaining = true;
   50358             :         }
   50359             : 
   50360           0 :         return py_netr_NetrLogonSendToSam_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   50361             : }
   50362             : 
   50363           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50364             : {
   50365           0 :         DATA_BLOB blob;
   50366           0 :         Py_ssize_t blob_length = 0;
   50367           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50368           0 :         PyObject *bigendian_obj = NULL;
   50369           0 :         PyObject *ndr64_obj = NULL;
   50370           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50371           0 :         PyObject *allow_remaining_obj = NULL;
   50372           0 :         bool allow_remaining = false;
   50373             : 
   50374           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   50375             :                 discard_const_p(char *, kwnames),
   50376             :                 &blob.data, &blob_length,
   50377             :                 &bigendian_obj,
   50378             :                 &ndr64_obj,
   50379             :                 &allow_remaining_obj)) {
   50380           0 :                 return NULL;
   50381             :         }
   50382           0 :         blob.length = blob_length;
   50383             : 
   50384           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50385           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50386             :         }
   50387           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50388           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50389             :         }
   50390             : 
   50391           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50392           0 :                 allow_remaining = true;
   50393             :         }
   50394             : 
   50395           0 :         return py_netr_NetrLogonSendToSam_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   50396             : }
   50397             : 
   50398           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   50399             : {
   50400           0 :         const struct ndr_interface_call *call = NULL;
   50401           0 :         struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
   50402           0 :         PyObject *ret;
   50403           0 :         char *retstr;
   50404             : 
   50405           0 :         if (ndr_table_netlogon.num_calls < 33) {
   50406           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_print");
   50407           0 :                 return NULL;
   50408             :         }
   50409           0 :         call = &ndr_table_netlogon.calls[32];
   50410             : 
   50411           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   50412           0 :         ret = PyUnicode_FromString(retstr);
   50413           0 :         TALLOC_FREE(retstr);
   50414             : 
   50415           0 :         return ret;
   50416             : }
   50417             : 
   50418           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50419             : {
   50420           0 :         return py_netr_NetrLogonSendToSam_ndr_print(py_obj, "netr_NetrLogonSendToSam_in", NDR_IN);
   50421             : }
   50422             : 
   50423           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50424             : {
   50425           0 :         return py_netr_NetrLogonSendToSam_ndr_print(py_obj, "netr_NetrLogonSendToSam_out", NDR_OUT);
   50426             : }
   50427             : 
   50428             : static PyMethodDef py_netr_NetrLogonSendToSam_methods[] = {
   50429             :         { "opnum", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_opnum, METH_NOARGS|METH_CLASS,
   50430             :                 "netlogon.netr_NetrLogonSendToSam.opnum() -> 32 (0x20) " },
   50431             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   50432             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   50433             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   50434             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   50435             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   50436             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   50437             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   50438             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   50439             :         { "__ndr_print_in__", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   50440             :         { "__ndr_print_out__", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   50441             :         { NULL, NULL, 0, NULL }
   50442             : };
   50443             : 
   50444             : 
   50445             : static PyTypeObject netr_NetrLogonSendToSam_Type = {
   50446             :         PyVarObject_HEAD_INIT(NULL, 0)
   50447             :         .tp_name = "netlogon.netr_NetrLogonSendToSam",
   50448             :         .tp_getset = py_netr_NetrLogonSendToSam_getsetters,
   50449             :         .tp_methods = py_netr_NetrLogonSendToSam_methods,
   50450             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   50451             :         .tp_new = py_netr_NetrLogonSendToSam_new,
   50452             : };
   50453             : 
   50454           0 : static bool pack_py_netr_NetrLogonSendToSam_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrLogonSendToSam *r)
   50455             : {
   50456           0 :         PyObject *py_server_name;
   50457           0 :         PyObject *py_computer_name;
   50458           0 :         PyObject *py_credential;
   50459           0 :         PyObject *py_opaque_buffer;
   50460           0 :         const char *kwnames[] = {
   50461             :                 "server_name", "computer_name", "credential", "opaque_buffer", NULL
   50462             :         };
   50463             : 
   50464           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)) {
   50465           0 :                 return false;
   50466             :         }
   50467             : 
   50468           0 :         if (py_server_name == NULL) {
   50469           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   50470           0 :                 return false;
   50471             :         }
   50472           0 :         if (py_server_name == Py_None) {
   50473           0 :                 r->in.server_name = NULL;
   50474             :         } else {
   50475           0 :                 r->in.server_name = NULL;
   50476             :                 {
   50477           0 :                         const char *test_str;
   50478           0 :                         const char *talloc_str;
   50479           0 :                         PyObject *unicode = NULL;
   50480           0 :                         if (PyUnicode_Check(py_server_name)) {
   50481           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   50482           0 :                                 if (unicode == NULL) {
   50483           0 :                                         return false;
   50484             :                                 }
   50485           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50486           0 :                         } else if (PyBytes_Check(py_server_name)) {
   50487           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   50488             :                         } else {
   50489           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   50490           0 :                                 return false;
   50491             :                         }
   50492           0 :                         talloc_str = talloc_strdup(r, test_str);
   50493           0 :                         if (unicode != NULL) {
   50494           0 :                                 Py_DECREF(unicode);
   50495             :                         }
   50496           0 :                         if (talloc_str == NULL) {
   50497           0 :                                 PyErr_NoMemory();
   50498           0 :                                 return false;
   50499             :                         }
   50500           0 :                         r->in.server_name = talloc_str;
   50501             :                 }
   50502             :         }
   50503           0 :         if (py_computer_name == NULL) {
   50504           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   50505           0 :                 return false;
   50506             :         }
   50507           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   50508           0 :         if (r->in.computer_name == NULL) {
   50509           0 :                 PyErr_NoMemory();
   50510           0 :                 return false;
   50511             :         }
   50512             :         {
   50513           0 :                 const char *test_str;
   50514           0 :                 const char *talloc_str;
   50515           0 :                 PyObject *unicode = NULL;
   50516           0 :                 if (PyUnicode_Check(py_computer_name)) {
   50517           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   50518           0 :                         if (unicode == NULL) {
   50519           0 :                                 return false;
   50520             :                         }
   50521           0 :                         test_str = PyBytes_AS_STRING(unicode);
   50522           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   50523           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   50524             :                 } else {
   50525           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   50526           0 :                         return false;
   50527             :                 }
   50528           0 :                 talloc_str = talloc_strdup(r, test_str);
   50529           0 :                 if (unicode != NULL) {
   50530           0 :                         Py_DECREF(unicode);
   50531             :                 }
   50532           0 :                 if (talloc_str == NULL) {
   50533           0 :                         PyErr_NoMemory();
   50534           0 :                         return false;
   50535             :                 }
   50536           0 :                 r->in.computer_name = talloc_str;
   50537             :         }
   50538           0 :         if (py_credential == NULL) {
   50539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   50540           0 :                 return false;
   50541             :         }
   50542           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   50543           0 :         if (r->in.credential == NULL) {
   50544           0 :                 PyErr_NoMemory();
   50545           0 :                 return false;
   50546             :         }
   50547           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   50548           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   50549           0 :                 PyErr_NoMemory();
   50550           0 :                 return false;
   50551             :         }
   50552           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   50553           0 :         if (py_opaque_buffer == NULL) {
   50554           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.opaque_buffer");
   50555           0 :                 return false;
   50556             :         }
   50557           0 :         r->in.opaque_buffer = talloc_ptrtype(r, r->in.opaque_buffer);
   50558           0 :         if (r->in.opaque_buffer == NULL) {
   50559           0 :                 PyErr_NoMemory();
   50560           0 :                 return false;
   50561             :         }
   50562           0 :         PY_CHECK_TYPE(&PyList_Type, py_opaque_buffer, return false;);
   50563             :         {
   50564           0 :                 int opaque_buffer_cntr_1;
   50565           0 :                 r->in.opaque_buffer = talloc_array_ptrtype(r, r->in.opaque_buffer, PyList_GET_SIZE(py_opaque_buffer));
   50566           0 :                 if (!r->in.opaque_buffer) { return false; }
   50567           0 :                 talloc_set_name_const(r->in.opaque_buffer, "ARRAY: r->in.opaque_buffer");
   50568           0 :                 for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < PyList_GET_SIZE(py_opaque_buffer); opaque_buffer_cntr_1++) {
   50569           0 :                         if (PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1) == NULL) {
   50570           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (r->in.opaque_buffer)[opaque_buffer_cntr_1]");
   50571           0 :                                 return false;
   50572             :                         }
   50573             :                         {
   50574           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((r->in.opaque_buffer)[opaque_buffer_cntr_1]));
   50575           0 :                                 if (PyLong_Check(PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1))) {
   50576           0 :                                         unsigned long long test_var;
   50577           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1));
   50578           0 :                                         if (PyErr_Occurred() != NULL) {
   50579           0 :                                                 return false;
   50580             :                                         }
   50581           0 :                                         if (test_var > uint_max) {
   50582           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50583             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   50584           0 :                                                 return false;
   50585             :                                         }
   50586           0 :                                         (r->in.opaque_buffer)[opaque_buffer_cntr_1] = test_var;
   50587             :                                 } else {
   50588           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50589             :                                           PyLong_Type.tp_name);
   50590           0 :                                         return false;
   50591             :                                 }
   50592             :                         }
   50593             :                 }
   50594             :         }
   50595           0 :         PY_CHECK_TYPE(&PyList_Type, py_opaque_buffer, return false;);
   50596           0 :         r->in.buffer_len = PyList_GET_SIZE(py_opaque_buffer);
   50597           0 :         return true;
   50598             : }
   50599             : 
   50600           0 : static PyObject *unpack_py_netr_NetrLogonSendToSam_args_out(struct netr_NetrLogonSendToSam *r)
   50601             : {
   50602           0 :         PyObject *result;
   50603           0 :         PyObject *py_return_authenticator;
   50604           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   50605           0 :         result = py_return_authenticator;
   50606           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   50607           0 :                 PyErr_SetNTSTATUS(r->out.result);
   50608           0 :                 return NULL;
   50609             :         }
   50610             : 
   50611           0 :         return result;
   50612             : }
   50613             : 
   50614             : 
   50615           0 : static PyObject *py_netr_DsRAddressToSitenamesW_in_get_server_name(PyObject *obj, void *closure)
   50616             : {
   50617           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
   50618           0 :         PyObject *py_server_name;
   50619           0 :         if (object->in.server_name == NULL) {
   50620           0 :                 Py_RETURN_NONE;
   50621             :         }
   50622           0 :         if (object->in.server_name == NULL) {
   50623           0 :                 py_server_name = Py_None;
   50624           0 :                 Py_INCREF(py_server_name);
   50625             :         } else {
   50626           0 :                 if (object->in.server_name == NULL) {
   50627           0 :                         py_server_name = Py_None;
   50628           0 :                         Py_INCREF(py_server_name);
   50629             :                 } else {
   50630           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   50631             :                 }
   50632             :         }
   50633           0 :         return py_server_name;
   50634             : }
   50635             : 
   50636           0 : static int py_netr_DsRAddressToSitenamesW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   50637             : {
   50638           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
   50639           0 :         if (value == NULL) {
   50640           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   50641           0 :                 return -1;
   50642             :         }
   50643           0 :         if (value == Py_None) {
   50644           0 :                 object->in.server_name = NULL;
   50645             :         } else {
   50646           0 :                 object->in.server_name = NULL;
   50647             :                 {
   50648           0 :                         const char *test_str;
   50649           0 :                         const char *talloc_str;
   50650           0 :                         PyObject *unicode = NULL;
   50651           0 :                         if (PyUnicode_Check(value)) {
   50652           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50653           0 :                                 if (unicode == NULL) {
   50654           0 :                                         return -1;
   50655             :                                 }
   50656           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50657           0 :                         } else if (PyBytes_Check(value)) {
   50658           0 :                                 test_str = PyBytes_AS_STRING(value);
   50659             :                         } else {
   50660           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50661           0 :                                 return -1;
   50662             :                         }
   50663           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50664           0 :                         if (unicode != NULL) {
   50665           0 :                                 Py_DECREF(unicode);
   50666             :                         }
   50667           0 :                         if (talloc_str == NULL) {
   50668           0 :                                 PyErr_NoMemory();
   50669           0 :                                 return -1;
   50670             :                         }
   50671           0 :                         object->in.server_name = talloc_str;
   50672             :                 }
   50673             :         }
   50674           0 :         return 0;
   50675             : }
   50676             : 
   50677           0 : static PyObject *py_netr_DsRAddressToSitenamesW_in_get_count(PyObject *obj, void *closure)
   50678             : {
   50679           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
   50680           0 :         PyObject *py_count;
   50681           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->in.count));
   50682           0 :         return py_count;
   50683             : }
   50684             : 
   50685           0 : static int py_netr_DsRAddressToSitenamesW_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
   50686             : {
   50687           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
   50688           0 :         if (value == NULL) {
   50689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.count");
   50690           0 :                 return -1;
   50691             :         }
   50692             :         {
   50693           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
   50694           0 :                 if (PyLong_Check(value)) {
   50695           0 :                         unsigned long long test_var;
   50696           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   50697           0 :                         if (PyErr_Occurred() != NULL) {
   50698           0 :                                 return -1;
   50699             :                         }
   50700           0 :                         if (test_var > uint_max) {
   50701           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50702             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50703           0 :                                 return -1;
   50704             :                         }
   50705           0 :                         object->in.count = test_var;
   50706             :                 } else {
   50707           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50708             :                           PyLong_Type.tp_name);
   50709           0 :                         return -1;
   50710             :                 }
   50711             :         }
   50712           0 :         return 0;
   50713             : }
   50714             : 
   50715           0 : static PyObject *py_netr_DsRAddressToSitenamesW_in_get_addresses(PyObject *obj, void *closure)
   50716             : {
   50717           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
   50718           0 :         PyObject *py_addresses;
   50719           0 :         if (object->in.addresses == NULL) {
   50720           0 :                 Py_RETURN_NONE;
   50721             :         }
   50722           0 :         py_addresses = PyList_New(object->in.count);
   50723           0 :         if (py_addresses == NULL) {
   50724           0 :                 return NULL;
   50725             :         }
   50726             :         {
   50727             :                 int addresses_cntr_1;
   50728           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < (object->in.count); addresses_cntr_1++) {
   50729           0 :                         PyObject *py_addresses_1;
   50730           0 :                         py_addresses_1 = pytalloc_reference_ex(&netr_DsRAddress_Type, object->in.addresses, &(object->in.addresses)[addresses_cntr_1]);
   50731           0 :                         PyList_SetItem(py_addresses, addresses_cntr_1, py_addresses_1);
   50732             :                 }
   50733             :         }
   50734           0 :         return py_addresses;
   50735             : }
   50736             : 
   50737           0 : static int py_netr_DsRAddressToSitenamesW_in_set_addresses(PyObject *py_obj, PyObject *value, void *closure)
   50738             : {
   50739           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
   50740           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.addresses));
   50741           0 :         if (value == NULL) {
   50742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.addresses");
   50743           0 :                 return -1;
   50744             :         }
   50745           0 :         object->in.addresses = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses);
   50746           0 :         if (object->in.addresses == NULL) {
   50747           0 :                 PyErr_NoMemory();
   50748           0 :                 return -1;
   50749             :         }
   50750           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   50751             :         {
   50752           0 :                 int addresses_cntr_1;
   50753           0 :                 object->in.addresses = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses, PyList_GET_SIZE(value));
   50754           0 :                 if (!object->in.addresses) { return -1; }
   50755           0 :                 talloc_set_name_const(object->in.addresses, "ARRAY: object->in.addresses");
   50756           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(value); addresses_cntr_1++) {
   50757           0 :                         if (PyList_GET_ITEM(value, addresses_cntr_1) == NULL) {
   50758           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->in.addresses)[addresses_cntr_1]");
   50759           0 :                                 return -1;
   50760             :                         }
   50761           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(value, addresses_cntr_1), return -1;);
   50762           0 :                         if (talloc_reference(object->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, addresses_cntr_1))) == NULL) {
   50763           0 :                                 PyErr_NoMemory();
   50764           0 :                                 return -1;
   50765             :                         }
   50766           0 :                         (object->in.addresses)[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(value, addresses_cntr_1));
   50767             :                 }
   50768             :         }
   50769           0 :         return 0;
   50770             : }
   50771             : 
   50772           0 : static PyObject *py_netr_DsRAddressToSitenamesW_out_get_ctr(PyObject *obj, void *closure)
   50773             : {
   50774           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
   50775           0 :         PyObject *py_ctr;
   50776           0 :         if (object->out.ctr == NULL) {
   50777           0 :                 Py_RETURN_NONE;
   50778             :         }
   50779           0 :         if (*object->out.ctr == NULL) {
   50780           0 :                 py_ctr = Py_None;
   50781           0 :                 Py_INCREF(py_ctr);
   50782             :         } else {
   50783           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesWCtr_Type, *object->out.ctr, *object->out.ctr);
   50784             :         }
   50785           0 :         return py_ctr;
   50786             : }
   50787             : 
   50788           0 : static int py_netr_DsRAddressToSitenamesW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   50789             : {
   50790           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
   50791           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   50792           0 :         if (value == NULL) {
   50793           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ctr");
   50794           0 :                 return -1;
   50795             :         }
   50796           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   50797           0 :         if (object->out.ctr == NULL) {
   50798           0 :                 PyErr_NoMemory();
   50799           0 :                 return -1;
   50800             :         }
   50801           0 :         if (value == Py_None) {
   50802           0 :                 *object->out.ctr = NULL;
   50803             :         } else {
   50804           0 :                 *object->out.ctr = NULL;
   50805           0 :                 PY_CHECK_TYPE(&netr_DsRAddressToSitenamesWCtr_Type, value, return -1;);
   50806           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   50807           0 :                         PyErr_NoMemory();
   50808           0 :                         return -1;
   50809             :                 }
   50810           0 :                 *object->out.ctr = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(value);
   50811             :         }
   50812           0 :         return 0;
   50813             : }
   50814             : 
   50815           0 : static PyObject *py_netr_DsRAddressToSitenamesW_get_result(PyObject *obj, void *closure)
   50816             : {
   50817           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
   50818           0 :         PyObject *py_result;
   50819           0 :         py_result = PyErr_FromWERROR(object->out.result);
   50820           0 :         return py_result;
   50821             : }
   50822             : 
   50823           0 : static int py_netr_DsRAddressToSitenamesW_set_result(PyObject *py_obj, PyObject *value, void *closure)
   50824             : {
   50825           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
   50826           0 :         if (value == NULL) {
   50827           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   50828           0 :                 return -1;
   50829             :         }
   50830           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   50831           0 :         return 0;
   50832             : }
   50833             : 
   50834             : static PyGetSetDef py_netr_DsRAddressToSitenamesW_getsetters[] = {
   50835             :         {
   50836             :                 .name = discard_const_p(char, "in_server_name"),
   50837             :                 .get = py_netr_DsRAddressToSitenamesW_in_get_server_name,
   50838             :                 .set = py_netr_DsRAddressToSitenamesW_in_set_server_name,
   50839             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50840             :         },
   50841             :         {
   50842             :                 .name = discard_const_p(char, "in_count"),
   50843             :                 .get = py_netr_DsRAddressToSitenamesW_in_get_count,
   50844             :                 .set = py_netr_DsRAddressToSitenamesW_in_set_count,
   50845             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   50846             :         },
   50847             :         {
   50848             :                 .name = discard_const_p(char, "in_addresses"),
   50849             :                 .get = py_netr_DsRAddressToSitenamesW_in_get_addresses,
   50850             :                 .set = py_netr_DsRAddressToSitenamesW_in_set_addresses,
   50851             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddress")
   50852             :         },
   50853             :         {
   50854             :                 .name = discard_const_p(char, "out_ctr"),
   50855             :                 .get = py_netr_DsRAddressToSitenamesW_out_get_ctr,
   50856             :                 .set = py_netr_DsRAddressToSitenamesW_out_set_ctr,
   50857             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddressToSitenamesWCtr")
   50858             :         },
   50859             :         {
   50860             :                 .name = discard_const_p(char, "result"),
   50861             :                 .get = py_netr_DsRAddressToSitenamesW_get_result,
   50862             :                 .set = py_netr_DsRAddressToSitenamesW_set_result,
   50863             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   50864             :         },
   50865             :         { .name = NULL }
   50866             : };
   50867             : 
   50868           0 : static PyObject *py_netr_DsRAddressToSitenamesW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   50869             : {
   50870           0 :         PyObject *self = pytalloc_new(struct netr_DsRAddressToSitenamesW, type);
   50871           0 :         struct netr_DsRAddressToSitenamesW *_self = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(self);
   50872           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   50873           0 :         _self->in.addresses = talloc_zero(mem_ctx, struct netr_DsRAddress);
   50874             :         /* a pointer to a NULL pointer */
   50875           0 :         _self->out.ctr = talloc_zero(mem_ctx, struct netr_DsRAddressToSitenamesWCtr *);
   50876           0 :         return self;
   50877             : }
   50878             : 
   50879           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   50880             : {
   50881             : 
   50882             : 
   50883           0 :         return PyLong_FromLong(33);
   50884             : }
   50885             : 
   50886           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   50887             : {
   50888           0 :         const struct ndr_interface_call *call = NULL;
   50889           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
   50890           0 :         PyObject *ret = NULL;
   50891           0 :         struct ndr_push *push = NULL;
   50892           0 :         DATA_BLOB blob;
   50893           0 :         enum ndr_err_code err;
   50894             : 
   50895           0 :         if (ndr_table_netlogon.num_calls < 34) {
   50896           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_pack");
   50897           0 :                 return NULL;
   50898             :         }
   50899           0 :         call = &ndr_table_netlogon.calls[33];
   50900             : 
   50901           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   50902           0 :         if (push == NULL) {
   50903           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50904           0 :                 return NULL;
   50905             :         }
   50906             : 
   50907           0 :         push->flags |= ndr_push_flags;
   50908             : 
   50909           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   50910           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50911           0 :                 TALLOC_FREE(push);
   50912           0 :                 PyErr_SetNdrError(err);
   50913           0 :                 return NULL;
   50914             :         }
   50915           0 :         blob = ndr_push_blob(push);
   50916           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   50917           0 :         TALLOC_FREE(push);
   50918           0 :         return ret;
   50919             : }
   50920             : 
   50921           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50922             : {
   50923           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50924           0 :         PyObject *bigendian_obj = NULL;
   50925           0 :         PyObject *ndr64_obj = NULL;
   50926           0 :         libndr_flags ndr_push_flags = 0;
   50927             : 
   50928           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   50929             :                 discard_const_p(char *, kwnames),
   50930             :                 &bigendian_obj,
   50931             :                 &ndr64_obj)) {
   50932           0 :                 return NULL;
   50933             :         }
   50934             : 
   50935           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50936           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50937             :         }
   50938           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50939           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50940             :         }
   50941             : 
   50942           0 :         return py_netr_DsRAddressToSitenamesW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   50943             : }
   50944             : 
   50945           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50946             : {
   50947           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50948           0 :         PyObject *bigendian_obj = NULL;
   50949           0 :         PyObject *ndr64_obj = NULL;
   50950           0 :         libndr_flags ndr_push_flags = 0;
   50951             : 
   50952           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   50953             :                 discard_const_p(char *, kwnames),
   50954             :                 &bigendian_obj,
   50955             :                 &ndr64_obj)) {
   50956           0 :                 return NULL;
   50957             :         }
   50958             : 
   50959           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50960           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50961             :         }
   50962           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50963           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50964             :         }
   50965             : 
   50966           0 :         return py_netr_DsRAddressToSitenamesW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   50967             : }
   50968             : 
   50969           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   50970             : {
   50971           0 :         const struct ndr_interface_call *call = NULL;
   50972           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
   50973           0 :         struct ndr_pull *pull = NULL;
   50974           0 :         enum ndr_err_code err;
   50975             : 
   50976           0 :         if (ndr_table_netlogon.num_calls < 34) {
   50977           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_unpack");
   50978           0 :                 return NULL;
   50979             :         }
   50980           0 :         call = &ndr_table_netlogon.calls[33];
   50981             : 
   50982           0 :         pull = ndr_pull_init_blob(blob, object);
   50983           0 :         if (pull == NULL) {
   50984           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50985           0 :                 return NULL;
   50986             :         }
   50987             : 
   50988           0 :         pull->flags |= ndr_pull_flags;
   50989             : 
   50990           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   50991           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50992           0 :                 TALLOC_FREE(pull);
   50993           0 :                 PyErr_SetNdrError(err);
   50994           0 :                 return NULL;
   50995             :         }
   50996           0 :         if (!allow_remaining) {
   50997           0 :                 uint32_t highest_ofs;
   50998             : 
   50999           0 :                 if (pull->offset > pull->relative_highest_offset) {
   51000           0 :                         highest_ofs = pull->offset;
   51001             :                 } else {
   51002           0 :                         highest_ofs = pull->relative_highest_offset;
   51003             :                 }
   51004           0 :                 if (highest_ofs < pull->data_size) {
   51005           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   51006             :                                 "not all bytes consumed ofs[%u] size[%u]",
   51007             :                                 highest_ofs, pull->data_size);
   51008           0 :                         TALLOC_FREE(pull);
   51009           0 :                         PyErr_SetNdrError(err);
   51010           0 :                         return NULL;
   51011             :                 }
   51012             :         }
   51013             : 
   51014           0 :         TALLOC_FREE(pull);
   51015           0 :         Py_RETURN_NONE;
   51016             : }
   51017             : 
   51018           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51019             : {
   51020           0 :         DATA_BLOB blob;
   51021           0 :         Py_ssize_t blob_length = 0;
   51022           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51023           0 :         PyObject *bigendian_obj = NULL;
   51024           0 :         PyObject *ndr64_obj = NULL;
   51025           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51026           0 :         PyObject *allow_remaining_obj = NULL;
   51027           0 :         bool allow_remaining = false;
   51028             : 
   51029           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   51030             :                 discard_const_p(char *, kwnames),
   51031             :                 &blob.data, &blob_length,
   51032             :                 &bigendian_obj,
   51033             :                 &ndr64_obj,
   51034             :                 &allow_remaining_obj)) {
   51035           0 :                 return NULL;
   51036             :         }
   51037           0 :         blob.length = blob_length;
   51038             : 
   51039           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51040           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51041             :         }
   51042           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51043           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51044             :         }
   51045             : 
   51046           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51047           0 :                 allow_remaining = true;
   51048             :         }
   51049             : 
   51050           0 :         return py_netr_DsRAddressToSitenamesW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   51051             : }
   51052             : 
   51053           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51054             : {
   51055           0 :         DATA_BLOB blob;
   51056           0 :         Py_ssize_t blob_length = 0;
   51057           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51058           0 :         PyObject *bigendian_obj = NULL;
   51059           0 :         PyObject *ndr64_obj = NULL;
   51060           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51061           0 :         PyObject *allow_remaining_obj = NULL;
   51062           0 :         bool allow_remaining = false;
   51063             : 
   51064           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   51065             :                 discard_const_p(char *, kwnames),
   51066             :                 &blob.data, &blob_length,
   51067             :                 &bigendian_obj,
   51068             :                 &ndr64_obj,
   51069             :                 &allow_remaining_obj)) {
   51070           0 :                 return NULL;
   51071             :         }
   51072           0 :         blob.length = blob_length;
   51073             : 
   51074           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51075           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51076             :         }
   51077           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51078           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51079             :         }
   51080             : 
   51081           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51082           0 :                 allow_remaining = true;
   51083             :         }
   51084             : 
   51085           0 :         return py_netr_DsRAddressToSitenamesW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   51086             : }
   51087             : 
   51088           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   51089             : {
   51090           0 :         const struct ndr_interface_call *call = NULL;
   51091           0 :         struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
   51092           0 :         PyObject *ret;
   51093           0 :         char *retstr;
   51094             : 
   51095           0 :         if (ndr_table_netlogon.num_calls < 34) {
   51096           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_print");
   51097           0 :                 return NULL;
   51098             :         }
   51099           0 :         call = &ndr_table_netlogon.calls[33];
   51100             : 
   51101           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   51102           0 :         ret = PyUnicode_FromString(retstr);
   51103           0 :         TALLOC_FREE(retstr);
   51104             : 
   51105           0 :         return ret;
   51106             : }
   51107             : 
   51108           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51109             : {
   51110           0 :         return py_netr_DsRAddressToSitenamesW_ndr_print(py_obj, "netr_DsRAddressToSitenamesW_in", NDR_IN);
   51111             : }
   51112             : 
   51113           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51114             : {
   51115           0 :         return py_netr_DsRAddressToSitenamesW_ndr_print(py_obj, "netr_DsRAddressToSitenamesW_out", NDR_OUT);
   51116             : }
   51117             : 
   51118             : static PyMethodDef py_netr_DsRAddressToSitenamesW_methods[] = {
   51119             :         { "opnum", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_opnum, METH_NOARGS|METH_CLASS,
   51120             :                 "netlogon.netr_DsRAddressToSitenamesW.opnum() -> 33 (0x21) " },
   51121             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   51122             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   51123             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   51124             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   51125             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   51126             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   51127             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   51128             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   51129             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   51130             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   51131             :         { NULL, NULL, 0, NULL }
   51132             : };
   51133             : 
   51134             : 
   51135             : static PyTypeObject netr_DsRAddressToSitenamesW_Type = {
   51136             :         PyVarObject_HEAD_INIT(NULL, 0)
   51137             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesW",
   51138             :         .tp_getset = py_netr_DsRAddressToSitenamesW_getsetters,
   51139             :         .tp_methods = py_netr_DsRAddressToSitenamesW_methods,
   51140             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   51141             :         .tp_new = py_netr_DsRAddressToSitenamesW_new,
   51142             : };
   51143             : 
   51144           0 : static bool pack_py_netr_DsRAddressToSitenamesW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRAddressToSitenamesW *r)
   51145             : {
   51146           0 :         PyObject *py_server_name;
   51147           0 :         PyObject *py_addresses;
   51148           0 :         const char *kwnames[] = {
   51149             :                 "server_name", "addresses", NULL
   51150             :         };
   51151             : 
   51152           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsRAddressToSitenamesW", discard_const_p(char *, kwnames), &py_server_name, &py_addresses)) {
   51153           0 :                 return false;
   51154             :         }
   51155             : 
   51156           0 :         if (py_server_name == NULL) {
   51157           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   51158           0 :                 return false;
   51159             :         }
   51160           0 :         if (py_server_name == Py_None) {
   51161           0 :                 r->in.server_name = NULL;
   51162             :         } else {
   51163           0 :                 r->in.server_name = NULL;
   51164             :                 {
   51165           0 :                         const char *test_str;
   51166           0 :                         const char *talloc_str;
   51167           0 :                         PyObject *unicode = NULL;
   51168           0 :                         if (PyUnicode_Check(py_server_name)) {
   51169           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   51170           0 :                                 if (unicode == NULL) {
   51171           0 :                                         return false;
   51172             :                                 }
   51173           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51174           0 :                         } else if (PyBytes_Check(py_server_name)) {
   51175           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   51176             :                         } else {
   51177           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   51178           0 :                                 return false;
   51179             :                         }
   51180           0 :                         talloc_str = talloc_strdup(r, test_str);
   51181           0 :                         if (unicode != NULL) {
   51182           0 :                                 Py_DECREF(unicode);
   51183             :                         }
   51184           0 :                         if (talloc_str == NULL) {
   51185           0 :                                 PyErr_NoMemory();
   51186           0 :                                 return false;
   51187             :                         }
   51188           0 :                         r->in.server_name = talloc_str;
   51189             :                 }
   51190             :         }
   51191           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   51192           0 :         r->in.count = PyList_GET_SIZE(py_addresses);
   51193           0 :         if (py_addresses == NULL) {
   51194           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.addresses");
   51195           0 :                 return false;
   51196             :         }
   51197           0 :         r->in.addresses = talloc_ptrtype(r, r->in.addresses);
   51198           0 :         if (r->in.addresses == NULL) {
   51199           0 :                 PyErr_NoMemory();
   51200           0 :                 return false;
   51201             :         }
   51202           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   51203             :         {
   51204           0 :                 int addresses_cntr_1;
   51205           0 :                 r->in.addresses = talloc_array_ptrtype(r, r->in.addresses, PyList_GET_SIZE(py_addresses));
   51206           0 :                 if (!r->in.addresses) { return false; }
   51207           0 :                 talloc_set_name_const(r->in.addresses, "ARRAY: r->in.addresses");
   51208           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(py_addresses); addresses_cntr_1++) {
   51209           0 :                         if (PyList_GET_ITEM(py_addresses, addresses_cntr_1) == NULL) {
   51210           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (r->in.addresses)[addresses_cntr_1]");
   51211           0 :                                 return false;
   51212             :                         }
   51213           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(py_addresses, addresses_cntr_1), return false;);
   51214           0 :                         if (talloc_reference(r->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_addresses, addresses_cntr_1))) == NULL) {
   51215           0 :                                 PyErr_NoMemory();
   51216           0 :                                 return false;
   51217             :                         }
   51218           0 :                         (r->in.addresses)[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(py_addresses, addresses_cntr_1));
   51219             :                 }
   51220             :         }
   51221           0 :         return true;
   51222             : }
   51223             : 
   51224           0 : static PyObject *unpack_py_netr_DsRAddressToSitenamesW_args_out(struct netr_DsRAddressToSitenamesW *r)
   51225             : {
   51226           0 :         PyObject *result;
   51227           0 :         PyObject *py_ctr;
   51228           0 :         if (*r->out.ctr == NULL) {
   51229           0 :                 py_ctr = Py_None;
   51230           0 :                 Py_INCREF(py_ctr);
   51231             :         } else {
   51232           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesWCtr_Type, *r->out.ctr, *r->out.ctr);
   51233             :         }
   51234           0 :         result = py_ctr;
   51235           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   51236           0 :                 PyErr_SetWERROR(r->out.result);
   51237           0 :                 return NULL;
   51238             :         }
   51239             : 
   51240           0 :         return result;
   51241             : }
   51242             : 
   51243             : 
   51244           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_server_unc(PyObject *obj, void *closure)
   51245             : {
   51246           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
   51247           0 :         PyObject *py_server_unc;
   51248           0 :         if (object->in.server_unc == NULL) {
   51249           0 :                 Py_RETURN_NONE;
   51250             :         }
   51251           0 :         if (object->in.server_unc == NULL) {
   51252           0 :                 py_server_unc = Py_None;
   51253           0 :                 Py_INCREF(py_server_unc);
   51254             :         } else {
   51255           0 :                 if (object->in.server_unc == NULL) {
   51256           0 :                         py_server_unc = Py_None;
   51257           0 :                         Py_INCREF(py_server_unc);
   51258             :                 } else {
   51259           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   51260             :                 }
   51261             :         }
   51262           0 :         return py_server_unc;
   51263             : }
   51264             : 
   51265           0 : static int py_netr_DsRGetDCNameEx2_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   51266             : {
   51267           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51268           0 :         if (value == NULL) {
   51269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   51270           0 :                 return -1;
   51271             :         }
   51272           0 :         if (value == Py_None) {
   51273           0 :                 object->in.server_unc = NULL;
   51274             :         } else {
   51275           0 :                 object->in.server_unc = NULL;
   51276             :                 {
   51277           0 :                         const char *test_str;
   51278           0 :                         const char *talloc_str;
   51279           0 :                         PyObject *unicode = NULL;
   51280           0 :                         if (PyUnicode_Check(value)) {
   51281           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51282           0 :                                 if (unicode == NULL) {
   51283           0 :                                         return -1;
   51284             :                                 }
   51285           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51286           0 :                         } else if (PyBytes_Check(value)) {
   51287           0 :                                 test_str = PyBytes_AS_STRING(value);
   51288             :                         } else {
   51289           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51290           0 :                                 return -1;
   51291             :                         }
   51292           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51293           0 :                         if (unicode != NULL) {
   51294           0 :                                 Py_DECREF(unicode);
   51295             :                         }
   51296           0 :                         if (talloc_str == NULL) {
   51297           0 :                                 PyErr_NoMemory();
   51298           0 :                                 return -1;
   51299             :                         }
   51300           0 :                         object->in.server_unc = talloc_str;
   51301             :                 }
   51302             :         }
   51303           0 :         return 0;
   51304             : }
   51305             : 
   51306           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_client_account(PyObject *obj, void *closure)
   51307             : {
   51308           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
   51309           0 :         PyObject *py_client_account;
   51310           0 :         if (object->in.client_account == NULL) {
   51311           0 :                 Py_RETURN_NONE;
   51312             :         }
   51313           0 :         if (object->in.client_account == NULL) {
   51314           0 :                 py_client_account = Py_None;
   51315           0 :                 Py_INCREF(py_client_account);
   51316             :         } else {
   51317           0 :                 if (object->in.client_account == NULL) {
   51318           0 :                         py_client_account = Py_None;
   51319           0 :                         Py_INCREF(py_client_account);
   51320             :                 } else {
   51321           0 :                         py_client_account = PyUnicode_Decode(object->in.client_account, strlen(object->in.client_account), "utf-8", "ignore");
   51322             :                 }
   51323             :         }
   51324           0 :         return py_client_account;
   51325             : }
   51326             : 
   51327           0 : static int py_netr_DsRGetDCNameEx2_in_set_client_account(PyObject *py_obj, PyObject *value, void *closure)
   51328             : {
   51329           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51330           0 :         if (value == NULL) {
   51331           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.client_account");
   51332           0 :                 return -1;
   51333             :         }
   51334           0 :         if (value == Py_None) {
   51335           0 :                 object->in.client_account = NULL;
   51336             :         } else {
   51337           0 :                 object->in.client_account = NULL;
   51338             :                 {
   51339           0 :                         const char *test_str;
   51340           0 :                         const char *talloc_str;
   51341           0 :                         PyObject *unicode = NULL;
   51342           0 :                         if (PyUnicode_Check(value)) {
   51343           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51344           0 :                                 if (unicode == NULL) {
   51345           0 :                                         return -1;
   51346             :                                 }
   51347           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51348           0 :                         } else if (PyBytes_Check(value)) {
   51349           0 :                                 test_str = PyBytes_AS_STRING(value);
   51350             :                         } else {
   51351           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51352           0 :                                 return -1;
   51353             :                         }
   51354           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51355           0 :                         if (unicode != NULL) {
   51356           0 :                                 Py_DECREF(unicode);
   51357             :                         }
   51358           0 :                         if (talloc_str == NULL) {
   51359           0 :                                 PyErr_NoMemory();
   51360           0 :                                 return -1;
   51361             :                         }
   51362           0 :                         object->in.client_account = talloc_str;
   51363             :                 }
   51364             :         }
   51365           0 :         return 0;
   51366             : }
   51367             : 
   51368           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_mask(PyObject *obj, void *closure)
   51369             : {
   51370           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
   51371           0 :         PyObject *py_mask;
   51372           0 :         py_mask = PyLong_FromUnsignedLongLong((uint32_t)(object->in.mask));
   51373           0 :         return py_mask;
   51374             : }
   51375             : 
   51376           0 : static int py_netr_DsRGetDCNameEx2_in_set_mask(PyObject *py_obj, PyObject *value, void *closure)
   51377             : {
   51378           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51379           0 :         if (value == NULL) {
   51380           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.mask");
   51381           0 :                 return -1;
   51382             :         }
   51383             :         {
   51384           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.mask));
   51385           0 :                 if (PyLong_Check(value)) {
   51386           0 :                         unsigned long long test_var;
   51387           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51388           0 :                         if (PyErr_Occurred() != NULL) {
   51389           0 :                                 return -1;
   51390             :                         }
   51391           0 :                         if (test_var > uint_max) {
   51392           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51393             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51394           0 :                                 return -1;
   51395             :                         }
   51396           0 :                         object->in.mask = test_var;
   51397             :                 } else {
   51398           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51399             :                           PyLong_Type.tp_name);
   51400           0 :                         return -1;
   51401             :                 }
   51402             :         }
   51403           0 :         return 0;
   51404             : }
   51405             : 
   51406           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_domain_name(PyObject *obj, void *closure)
   51407             : {
   51408           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
   51409           0 :         PyObject *py_domain_name;
   51410           0 :         if (object->in.domain_name == NULL) {
   51411           0 :                 Py_RETURN_NONE;
   51412             :         }
   51413           0 :         if (object->in.domain_name == NULL) {
   51414           0 :                 py_domain_name = Py_None;
   51415           0 :                 Py_INCREF(py_domain_name);
   51416             :         } else {
   51417           0 :                 if (object->in.domain_name == NULL) {
   51418           0 :                         py_domain_name = Py_None;
   51419           0 :                         Py_INCREF(py_domain_name);
   51420             :                 } else {
   51421           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   51422             :                 }
   51423             :         }
   51424           0 :         return py_domain_name;
   51425             : }
   51426             : 
   51427           0 : static int py_netr_DsRGetDCNameEx2_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   51428             : {
   51429           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51430           0 :         if (value == NULL) {
   51431           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_name");
   51432           0 :                 return -1;
   51433             :         }
   51434           0 :         if (value == Py_None) {
   51435           0 :                 object->in.domain_name = NULL;
   51436             :         } else {
   51437           0 :                 object->in.domain_name = NULL;
   51438             :                 {
   51439           0 :                         const char *test_str;
   51440           0 :                         const char *talloc_str;
   51441           0 :                         PyObject *unicode = NULL;
   51442           0 :                         if (PyUnicode_Check(value)) {
   51443           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51444           0 :                                 if (unicode == NULL) {
   51445           0 :                                         return -1;
   51446             :                                 }
   51447           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51448           0 :                         } else if (PyBytes_Check(value)) {
   51449           0 :                                 test_str = PyBytes_AS_STRING(value);
   51450             :                         } else {
   51451           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51452           0 :                                 return -1;
   51453             :                         }
   51454           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51455           0 :                         if (unicode != NULL) {
   51456           0 :                                 Py_DECREF(unicode);
   51457             :                         }
   51458           0 :                         if (talloc_str == NULL) {
   51459           0 :                                 PyErr_NoMemory();
   51460           0 :                                 return -1;
   51461             :                         }
   51462           0 :                         object->in.domain_name = talloc_str;
   51463             :                 }
   51464             :         }
   51465           0 :         return 0;
   51466             : }
   51467             : 
   51468           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_domain_guid(PyObject *obj, void *closure)
   51469             : {
   51470           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
   51471           0 :         PyObject *py_domain_guid;
   51472           0 :         if (object->in.domain_guid == NULL) {
   51473           0 :                 Py_RETURN_NONE;
   51474             :         }
   51475           0 :         if (object->in.domain_guid == NULL) {
   51476           0 :                 py_domain_guid = Py_None;
   51477           0 :                 Py_INCREF(py_domain_guid);
   51478             :         } else {
   51479           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   51480             :         }
   51481           0 :         return py_domain_guid;
   51482             : }
   51483             : 
   51484           0 : static int py_netr_DsRGetDCNameEx2_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   51485             : {
   51486           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51487           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   51488           0 :         if (value == NULL) {
   51489           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_guid");
   51490           0 :                 return -1;
   51491             :         }
   51492           0 :         if (value == Py_None) {
   51493           0 :                 object->in.domain_guid = NULL;
   51494             :         } else {
   51495           0 :                 object->in.domain_guid = NULL;
   51496           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   51497           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   51498           0 :                         PyErr_NoMemory();
   51499           0 :                         return -1;
   51500             :                 }
   51501           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   51502             :         }
   51503           0 :         return 0;
   51504             : }
   51505             : 
   51506           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_site_name(PyObject *obj, void *closure)
   51507             : {
   51508           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
   51509           0 :         PyObject *py_site_name;
   51510           0 :         if (object->in.site_name == NULL) {
   51511           0 :                 Py_RETURN_NONE;
   51512             :         }
   51513           0 :         if (object->in.site_name == NULL) {
   51514           0 :                 py_site_name = Py_None;
   51515           0 :                 Py_INCREF(py_site_name);
   51516             :         } else {
   51517           0 :                 if (object->in.site_name == NULL) {
   51518           0 :                         py_site_name = Py_None;
   51519           0 :                         Py_INCREF(py_site_name);
   51520             :                 } else {
   51521           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   51522             :                 }
   51523             :         }
   51524           0 :         return py_site_name;
   51525             : }
   51526             : 
   51527           0 : static int py_netr_DsRGetDCNameEx2_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   51528             : {
   51529           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51530           0 :         if (value == NULL) {
   51531           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.site_name");
   51532           0 :                 return -1;
   51533             :         }
   51534           0 :         if (value == Py_None) {
   51535           0 :                 object->in.site_name = NULL;
   51536             :         } else {
   51537           0 :                 object->in.site_name = NULL;
   51538             :                 {
   51539           0 :                         const char *test_str;
   51540           0 :                         const char *talloc_str;
   51541           0 :                         PyObject *unicode = NULL;
   51542           0 :                         if (PyUnicode_Check(value)) {
   51543           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51544           0 :                                 if (unicode == NULL) {
   51545           0 :                                         return -1;
   51546             :                                 }
   51547           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51548           0 :                         } else if (PyBytes_Check(value)) {
   51549           0 :                                 test_str = PyBytes_AS_STRING(value);
   51550             :                         } else {
   51551           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51552           0 :                                 return -1;
   51553             :                         }
   51554           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51555           0 :                         if (unicode != NULL) {
   51556           0 :                                 Py_DECREF(unicode);
   51557             :                         }
   51558           0 :                         if (talloc_str == NULL) {
   51559           0 :                                 PyErr_NoMemory();
   51560           0 :                                 return -1;
   51561             :                         }
   51562           0 :                         object->in.site_name = talloc_str;
   51563             :                 }
   51564             :         }
   51565           0 :         return 0;
   51566             : }
   51567             : 
   51568           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_flags(PyObject *obj, void *closure)
   51569             : {
   51570           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
   51571           0 :         PyObject *py_flags;
   51572           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
   51573           0 :         return py_flags;
   51574             : }
   51575             : 
   51576           0 : static int py_netr_DsRGetDCNameEx2_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   51577             : {
   51578           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51579           0 :         if (value == NULL) {
   51580           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
   51581           0 :                 return -1;
   51582             :         }
   51583             :         {
   51584           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   51585           0 :                 if (PyLong_Check(value)) {
   51586           0 :                         unsigned long long test_var;
   51587           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51588           0 :                         if (PyErr_Occurred() != NULL) {
   51589           0 :                                 return -1;
   51590             :                         }
   51591           0 :                         if (test_var > uint_max) {
   51592           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51593             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51594           0 :                                 return -1;
   51595             :                         }
   51596           0 :                         object->in.flags = test_var;
   51597             :                 } else {
   51598           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51599             :                           PyLong_Type.tp_name);
   51600           0 :                         return -1;
   51601             :                 }
   51602             :         }
   51603           0 :         return 0;
   51604             : }
   51605             : 
   51606           0 : static PyObject *py_netr_DsRGetDCNameEx2_out_get_info(PyObject *obj, void *closure)
   51607             : {
   51608           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
   51609           0 :         PyObject *py_info;
   51610           0 :         if (object->out.info == NULL) {
   51611           0 :                 Py_RETURN_NONE;
   51612             :         }
   51613           0 :         if (*object->out.info == NULL) {
   51614           0 :                 py_info = Py_None;
   51615           0 :                 Py_INCREF(py_info);
   51616             :         } else {
   51617           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
   51618             :         }
   51619           0 :         return py_info;
   51620             : }
   51621             : 
   51622           0 : static int py_netr_DsRGetDCNameEx2_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   51623             : {
   51624           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51625           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   51626           0 :         if (value == NULL) {
   51627           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   51628           0 :                 return -1;
   51629             :         }
   51630           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   51631           0 :         if (object->out.info == NULL) {
   51632           0 :                 PyErr_NoMemory();
   51633           0 :                 return -1;
   51634             :         }
   51635           0 :         if (value == Py_None) {
   51636           0 :                 *object->out.info = NULL;
   51637             :         } else {
   51638           0 :                 *object->out.info = NULL;
   51639           0 :                 PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
   51640           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   51641           0 :                         PyErr_NoMemory();
   51642           0 :                         return -1;
   51643             :                 }
   51644           0 :                 *object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   51645             :         }
   51646           0 :         return 0;
   51647             : }
   51648             : 
   51649           0 : static PyObject *py_netr_DsRGetDCNameEx2_get_result(PyObject *obj, void *closure)
   51650             : {
   51651           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
   51652           0 :         PyObject *py_result;
   51653           0 :         py_result = PyErr_FromWERROR(object->out.result);
   51654           0 :         return py_result;
   51655             : }
   51656             : 
   51657           0 : static int py_netr_DsRGetDCNameEx2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   51658             : {
   51659           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51660           0 :         if (value == NULL) {
   51661           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   51662           0 :                 return -1;
   51663             :         }
   51664           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   51665           0 :         return 0;
   51666             : }
   51667             : 
   51668             : static PyGetSetDef py_netr_DsRGetDCNameEx2_getsetters[] = {
   51669             :         {
   51670             :                 .name = discard_const_p(char, "in_server_unc"),
   51671             :                 .get = py_netr_DsRGetDCNameEx2_in_get_server_unc,
   51672             :                 .set = py_netr_DsRGetDCNameEx2_in_set_server_unc,
   51673             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51674             :         },
   51675             :         {
   51676             :                 .name = discard_const_p(char, "in_client_account"),
   51677             :                 .get = py_netr_DsRGetDCNameEx2_in_get_client_account,
   51678             :                 .set = py_netr_DsRGetDCNameEx2_in_set_client_account,
   51679             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51680             :         },
   51681             :         {
   51682             :                 .name = discard_const_p(char, "in_mask"),
   51683             :                 .get = py_netr_DsRGetDCNameEx2_in_get_mask,
   51684             :                 .set = py_netr_DsRGetDCNameEx2_in_set_mask,
   51685             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
   51686             :         },
   51687             :         {
   51688             :                 .name = discard_const_p(char, "in_domain_name"),
   51689             :                 .get = py_netr_DsRGetDCNameEx2_in_get_domain_name,
   51690             :                 .set = py_netr_DsRGetDCNameEx2_in_set_domain_name,
   51691             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51692             :         },
   51693             :         {
   51694             :                 .name = discard_const_p(char, "in_domain_guid"),
   51695             :                 .get = py_netr_DsRGetDCNameEx2_in_get_domain_guid,
   51696             :                 .set = py_netr_DsRGetDCNameEx2_in_set_domain_guid,
   51697             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   51698             :         },
   51699             :         {
   51700             :                 .name = discard_const_p(char, "in_site_name"),
   51701             :                 .get = py_netr_DsRGetDCNameEx2_in_get_site_name,
   51702             :                 .set = py_netr_DsRGetDCNameEx2_in_set_site_name,
   51703             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51704             :         },
   51705             :         {
   51706             :                 .name = discard_const_p(char, "in_flags"),
   51707             :                 .get = py_netr_DsRGetDCNameEx2_in_get_flags,
   51708             :                 .set = py_netr_DsRGetDCNameEx2_in_set_flags,
   51709             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
   51710             :         },
   51711             :         {
   51712             :                 .name = discard_const_p(char, "out_info"),
   51713             :                 .get = py_netr_DsRGetDCNameEx2_out_get_info,
   51714             :                 .set = py_netr_DsRGetDCNameEx2_out_set_info,
   51715             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   51716             :         },
   51717             :         {
   51718             :                 .name = discard_const_p(char, "result"),
   51719             :                 .get = py_netr_DsRGetDCNameEx2_get_result,
   51720             :                 .set = py_netr_DsRGetDCNameEx2_set_result,
   51721             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   51722             :         },
   51723             :         { .name = NULL }
   51724             : };
   51725             : 
   51726           0 : static PyObject *py_netr_DsRGetDCNameEx2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   51727             : {
   51728           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetDCNameEx2, type);
   51729           0 :         struct netr_DsRGetDCNameEx2 *_self = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(self);
   51730           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   51731             :         /* a pointer to a NULL pointer */
   51732           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   51733           0 :         return self;
   51734             : }
   51735             : 
   51736           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   51737             : {
   51738             : 
   51739             : 
   51740           0 :         return PyLong_FromLong(34);
   51741             : }
   51742             : 
   51743           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   51744             : {
   51745           0 :         const struct ndr_interface_call *call = NULL;
   51746           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51747           0 :         PyObject *ret = NULL;
   51748           0 :         struct ndr_push *push = NULL;
   51749           0 :         DATA_BLOB blob;
   51750           0 :         enum ndr_err_code err;
   51751             : 
   51752           0 :         if (ndr_table_netlogon.num_calls < 35) {
   51753           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_pack");
   51754           0 :                 return NULL;
   51755             :         }
   51756           0 :         call = &ndr_table_netlogon.calls[34];
   51757             : 
   51758           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   51759           0 :         if (push == NULL) {
   51760           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51761           0 :                 return NULL;
   51762             :         }
   51763             : 
   51764           0 :         push->flags |= ndr_push_flags;
   51765             : 
   51766           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   51767           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51768           0 :                 TALLOC_FREE(push);
   51769           0 :                 PyErr_SetNdrError(err);
   51770           0 :                 return NULL;
   51771             :         }
   51772           0 :         blob = ndr_push_blob(push);
   51773           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   51774           0 :         TALLOC_FREE(push);
   51775           0 :         return ret;
   51776             : }
   51777             : 
   51778           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51779             : {
   51780           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51781           0 :         PyObject *bigendian_obj = NULL;
   51782           0 :         PyObject *ndr64_obj = NULL;
   51783           0 :         libndr_flags ndr_push_flags = 0;
   51784             : 
   51785           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   51786             :                 discard_const_p(char *, kwnames),
   51787             :                 &bigendian_obj,
   51788             :                 &ndr64_obj)) {
   51789           0 :                 return NULL;
   51790             :         }
   51791             : 
   51792           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51793           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51794             :         }
   51795           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51796           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51797             :         }
   51798             : 
   51799           0 :         return py_netr_DsRGetDCNameEx2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   51800             : }
   51801             : 
   51802           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51803             : {
   51804           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51805           0 :         PyObject *bigendian_obj = NULL;
   51806           0 :         PyObject *ndr64_obj = NULL;
   51807           0 :         libndr_flags ndr_push_flags = 0;
   51808             : 
   51809           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   51810             :                 discard_const_p(char *, kwnames),
   51811             :                 &bigendian_obj,
   51812             :                 &ndr64_obj)) {
   51813           0 :                 return NULL;
   51814             :         }
   51815             : 
   51816           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51817           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51818             :         }
   51819           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51820           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51821             :         }
   51822             : 
   51823           0 :         return py_netr_DsRGetDCNameEx2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   51824             : }
   51825             : 
   51826           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   51827             : {
   51828           0 :         const struct ndr_interface_call *call = NULL;
   51829           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51830           0 :         struct ndr_pull *pull = NULL;
   51831           0 :         enum ndr_err_code err;
   51832             : 
   51833           0 :         if (ndr_table_netlogon.num_calls < 35) {
   51834           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_unpack");
   51835           0 :                 return NULL;
   51836             :         }
   51837           0 :         call = &ndr_table_netlogon.calls[34];
   51838             : 
   51839           0 :         pull = ndr_pull_init_blob(blob, object);
   51840           0 :         if (pull == NULL) {
   51841           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51842           0 :                 return NULL;
   51843             :         }
   51844             : 
   51845           0 :         pull->flags |= ndr_pull_flags;
   51846             : 
   51847           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   51848           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51849           0 :                 TALLOC_FREE(pull);
   51850           0 :                 PyErr_SetNdrError(err);
   51851           0 :                 return NULL;
   51852             :         }
   51853           0 :         if (!allow_remaining) {
   51854           0 :                 uint32_t highest_ofs;
   51855             : 
   51856           0 :                 if (pull->offset > pull->relative_highest_offset) {
   51857           0 :                         highest_ofs = pull->offset;
   51858             :                 } else {
   51859           0 :                         highest_ofs = pull->relative_highest_offset;
   51860             :                 }
   51861           0 :                 if (highest_ofs < pull->data_size) {
   51862           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   51863             :                                 "not all bytes consumed ofs[%u] size[%u]",
   51864             :                                 highest_ofs, pull->data_size);
   51865           0 :                         TALLOC_FREE(pull);
   51866           0 :                         PyErr_SetNdrError(err);
   51867           0 :                         return NULL;
   51868             :                 }
   51869             :         }
   51870             : 
   51871           0 :         TALLOC_FREE(pull);
   51872           0 :         Py_RETURN_NONE;
   51873             : }
   51874             : 
   51875           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51876             : {
   51877           0 :         DATA_BLOB blob;
   51878           0 :         Py_ssize_t blob_length = 0;
   51879           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51880           0 :         PyObject *bigendian_obj = NULL;
   51881           0 :         PyObject *ndr64_obj = NULL;
   51882           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51883           0 :         PyObject *allow_remaining_obj = NULL;
   51884           0 :         bool allow_remaining = false;
   51885             : 
   51886           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   51887             :                 discard_const_p(char *, kwnames),
   51888             :                 &blob.data, &blob_length,
   51889             :                 &bigendian_obj,
   51890             :                 &ndr64_obj,
   51891             :                 &allow_remaining_obj)) {
   51892           0 :                 return NULL;
   51893             :         }
   51894           0 :         blob.length = blob_length;
   51895             : 
   51896           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51897           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51898             :         }
   51899           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51900           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51901             :         }
   51902             : 
   51903           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51904           0 :                 allow_remaining = true;
   51905             :         }
   51906             : 
   51907           0 :         return py_netr_DsRGetDCNameEx2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   51908             : }
   51909             : 
   51910           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51911             : {
   51912           0 :         DATA_BLOB blob;
   51913           0 :         Py_ssize_t blob_length = 0;
   51914           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51915           0 :         PyObject *bigendian_obj = NULL;
   51916           0 :         PyObject *ndr64_obj = NULL;
   51917           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51918           0 :         PyObject *allow_remaining_obj = NULL;
   51919           0 :         bool allow_remaining = false;
   51920             : 
   51921           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   51922             :                 discard_const_p(char *, kwnames),
   51923             :                 &blob.data, &blob_length,
   51924             :                 &bigendian_obj,
   51925             :                 &ndr64_obj,
   51926             :                 &allow_remaining_obj)) {
   51927           0 :                 return NULL;
   51928             :         }
   51929           0 :         blob.length = blob_length;
   51930             : 
   51931           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51932           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51933             :         }
   51934           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51935           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51936             :         }
   51937             : 
   51938           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51939           0 :                 allow_remaining = true;
   51940             :         }
   51941             : 
   51942           0 :         return py_netr_DsRGetDCNameEx2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   51943             : }
   51944             : 
   51945           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   51946             : {
   51947           0 :         const struct ndr_interface_call *call = NULL;
   51948           0 :         struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
   51949           0 :         PyObject *ret;
   51950           0 :         char *retstr;
   51951             : 
   51952           0 :         if (ndr_table_netlogon.num_calls < 35) {
   51953           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_print");
   51954           0 :                 return NULL;
   51955             :         }
   51956           0 :         call = &ndr_table_netlogon.calls[34];
   51957             : 
   51958           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   51959           0 :         ret = PyUnicode_FromString(retstr);
   51960           0 :         TALLOC_FREE(retstr);
   51961             : 
   51962           0 :         return ret;
   51963             : }
   51964             : 
   51965           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51966             : {
   51967           0 :         return py_netr_DsRGetDCNameEx2_ndr_print(py_obj, "netr_DsRGetDCNameEx2_in", NDR_IN);
   51968             : }
   51969             : 
   51970           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51971             : {
   51972           0 :         return py_netr_DsRGetDCNameEx2_ndr_print(py_obj, "netr_DsRGetDCNameEx2_out", NDR_OUT);
   51973             : }
   51974             : 
   51975             : static PyMethodDef py_netr_DsRGetDCNameEx2_methods[] = {
   51976             :         { "opnum", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_opnum, METH_NOARGS|METH_CLASS,
   51977             :                 "netlogon.netr_DsRGetDCNameEx2.opnum() -> 34 (0x22) " },
   51978             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   51979             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   51980             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   51981             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   51982             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   51983             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   51984             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   51985             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   51986             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   51987             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   51988             :         { NULL, NULL, 0, NULL }
   51989             : };
   51990             : 
   51991             : 
   51992             : static PyTypeObject netr_DsRGetDCNameEx2_Type = {
   51993             :         PyVarObject_HEAD_INIT(NULL, 0)
   51994             :         .tp_name = "netlogon.netr_DsRGetDCNameEx2",
   51995             :         .tp_getset = py_netr_DsRGetDCNameEx2_getsetters,
   51996             :         .tp_methods = py_netr_DsRGetDCNameEx2_methods,
   51997             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   51998             :         .tp_new = py_netr_DsRGetDCNameEx2_new,
   51999             : };
   52000             : 
   52001         133 : static bool pack_py_netr_DsRGetDCNameEx2_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCNameEx2 *r)
   52002             : {
   52003           2 :         PyObject *py_server_unc;
   52004           2 :         PyObject *py_client_account;
   52005           2 :         PyObject *py_mask;
   52006           2 :         PyObject *py_domain_name;
   52007           2 :         PyObject *py_domain_guid;
   52008           2 :         PyObject *py_site_name;
   52009           2 :         PyObject *py_flags;
   52010         133 :         const char *kwnames[] = {
   52011             :                 "server_unc", "client_account", "mask", "domain_name", "domain_guid", "site_name", "flags", NULL
   52012             :         };
   52013             : 
   52014         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)) {
   52015           0 :                 return false;
   52016             :         }
   52017             : 
   52018         133 :         if (py_server_unc == NULL) {
   52019           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   52020           0 :                 return false;
   52021             :         }
   52022         133 :         if (py_server_unc == Py_None) {
   52023           0 :                 r->in.server_unc = NULL;
   52024             :         } else {
   52025         133 :                 r->in.server_unc = NULL;
   52026             :                 {
   52027           2 :                         const char *test_str;
   52028           2 :                         const char *talloc_str;
   52029         133 :                         PyObject *unicode = NULL;
   52030         133 :                         if (PyUnicode_Check(py_server_unc)) {
   52031         133 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   52032         133 :                                 if (unicode == NULL) {
   52033           0 :                                         return false;
   52034             :                                 }
   52035         133 :                                 test_str = PyBytes_AS_STRING(unicode);
   52036           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   52037           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   52038             :                         } else {
   52039           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   52040           0 :                                 return false;
   52041             :                         }
   52042         133 :                         talloc_str = talloc_strdup(r, test_str);
   52043         133 :                         if (unicode != NULL) {
   52044          74 :                                 Py_DECREF(unicode);
   52045             :                         }
   52046         133 :                         if (talloc_str == NULL) {
   52047           0 :                                 PyErr_NoMemory();
   52048           0 :                                 return false;
   52049             :                         }
   52050         133 :                         r->in.server_unc = talloc_str;
   52051             :                 }
   52052             :         }
   52053         133 :         if (py_client_account == NULL) {
   52054           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.client_account");
   52055           0 :                 return false;
   52056             :         }
   52057         133 :         if (py_client_account == Py_None) {
   52058         133 :                 r->in.client_account = NULL;
   52059             :         } else {
   52060           0 :                 r->in.client_account = NULL;
   52061             :                 {
   52062           0 :                         const char *test_str;
   52063           0 :                         const char *talloc_str;
   52064           0 :                         PyObject *unicode = NULL;
   52065           0 :                         if (PyUnicode_Check(py_client_account)) {
   52066           0 :                                 unicode = PyUnicode_AsEncodedString(py_client_account, "utf-8", "ignore");
   52067           0 :                                 if (unicode == NULL) {
   52068           0 :                                         return false;
   52069             :                                 }
   52070           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52071           0 :                         } else if (PyBytes_Check(py_client_account)) {
   52072           0 :                                 test_str = PyBytes_AS_STRING(py_client_account);
   52073             :                         } else {
   52074           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_account)->tp_name);
   52075           0 :                                 return false;
   52076             :                         }
   52077           0 :                         talloc_str = talloc_strdup(r, test_str);
   52078           0 :                         if (unicode != NULL) {
   52079           0 :                                 Py_DECREF(unicode);
   52080             :                         }
   52081           0 :                         if (talloc_str == NULL) {
   52082           0 :                                 PyErr_NoMemory();
   52083           0 :                                 return false;
   52084             :                         }
   52085           0 :                         r->in.client_account = talloc_str;
   52086             :                 }
   52087             :         }
   52088         133 :         if (py_mask == NULL) {
   52089           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.mask");
   52090           0 :                 return false;
   52091             :         }
   52092             :         {
   52093         133 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.mask));
   52094         133 :                 if (PyLong_Check(py_mask)) {
   52095           2 :                         unsigned long long test_var;
   52096         133 :                         test_var = PyLong_AsUnsignedLongLong(py_mask);
   52097         133 :                         if (PyErr_Occurred() != NULL) {
   52098           0 :                                 return false;
   52099             :                         }
   52100         133 :                         if (test_var > uint_max) {
   52101           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52102             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52103           0 :                                 return false;
   52104             :                         }
   52105         133 :                         r->in.mask = test_var;
   52106             :                 } else {
   52107           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52108             :                           PyLong_Type.tp_name);
   52109           0 :                         return false;
   52110             :                 }
   52111             :         }
   52112         133 :         if (py_domain_name == NULL) {
   52113           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_name");
   52114           0 :                 return false;
   52115             :         }
   52116         133 :         if (py_domain_name == Py_None) {
   52117         121 :                 r->in.domain_name = NULL;
   52118             :         } else {
   52119          12 :                 r->in.domain_name = NULL;
   52120             :                 {
   52121           0 :                         const char *test_str;
   52122           0 :                         const char *talloc_str;
   52123          12 :                         PyObject *unicode = NULL;
   52124          12 :                         if (PyUnicode_Check(py_domain_name)) {
   52125          12 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   52126          12 :                                 if (unicode == NULL) {
   52127           0 :                                         return false;
   52128             :                                 }
   52129          12 :                                 test_str = PyBytes_AS_STRING(unicode);
   52130           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   52131           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   52132             :                         } else {
   52133           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   52134           0 :                                 return false;
   52135             :                         }
   52136          12 :                         talloc_str = talloc_strdup(r, test_str);
   52137          12 :                         if (unicode != NULL) {
   52138           6 :                                 Py_DECREF(unicode);
   52139             :                         }
   52140          12 :                         if (talloc_str == NULL) {
   52141           0 :                                 PyErr_NoMemory();
   52142           0 :                                 return false;
   52143             :                         }
   52144          12 :                         r->in.domain_name = talloc_str;
   52145             :                 }
   52146             :         }
   52147         133 :         if (py_domain_guid == NULL) {
   52148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_guid");
   52149           0 :                 return false;
   52150             :         }
   52151         133 :         if (py_domain_guid == Py_None) {
   52152         133 :                 r->in.domain_guid = NULL;
   52153             :         } else {
   52154           0 :                 r->in.domain_guid = NULL;
   52155           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   52156           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   52157           0 :                         PyErr_NoMemory();
   52158           0 :                         return false;
   52159             :                 }
   52160           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   52161             :         }
   52162         133 :         if (py_site_name == NULL) {
   52163           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.site_name");
   52164           0 :                 return false;
   52165             :         }
   52166         133 :         if (py_site_name == Py_None) {
   52167         129 :                 r->in.site_name = NULL;
   52168             :         } else {
   52169           4 :                 r->in.site_name = NULL;
   52170             :                 {
   52171           0 :                         const char *test_str;
   52172           0 :                         const char *talloc_str;
   52173           4 :                         PyObject *unicode = NULL;
   52174           4 :                         if (PyUnicode_Check(py_site_name)) {
   52175           4 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   52176           4 :                                 if (unicode == NULL) {
   52177           0 :                                         return false;
   52178             :                                 }
   52179           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   52180           0 :                         } else if (PyBytes_Check(py_site_name)) {
   52181           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   52182             :                         } else {
   52183           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   52184           0 :                                 return false;
   52185             :                         }
   52186           4 :                         talloc_str = talloc_strdup(r, test_str);
   52187           4 :                         if (unicode != NULL) {
   52188           2 :                                 Py_DECREF(unicode);
   52189             :                         }
   52190           4 :                         if (talloc_str == NULL) {
   52191           0 :                                 PyErr_NoMemory();
   52192           0 :                                 return false;
   52193             :                         }
   52194           4 :                         r->in.site_name = talloc_str;
   52195             :                 }
   52196             :         }
   52197         133 :         if (py_flags == NULL) {
   52198           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
   52199           0 :                 return false;
   52200             :         }
   52201             :         {
   52202         133 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   52203         133 :                 if (PyLong_Check(py_flags)) {
   52204           2 :                         unsigned long long test_var;
   52205         133 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   52206         133 :                         if (PyErr_Occurred() != NULL) {
   52207           0 :                                 return false;
   52208             :                         }
   52209         133 :                         if (test_var > uint_max) {
   52210           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52211             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52212           0 :                                 return false;
   52213             :                         }
   52214         133 :                         r->in.flags = test_var;
   52215             :                 } else {
   52216           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52217             :                           PyLong_Type.tp_name);
   52218           0 :                         return false;
   52219             :                 }
   52220             :         }
   52221         133 :         return true;
   52222             : }
   52223             : 
   52224         133 : static PyObject *unpack_py_netr_DsRGetDCNameEx2_args_out(struct netr_DsRGetDCNameEx2 *r)
   52225             : {
   52226           2 :         PyObject *result;
   52227           2 :         PyObject *py_info;
   52228         133 :         if (*r->out.info == NULL) {
   52229           0 :                 py_info = Py_None;
   52230           0 :                 Py_INCREF(py_info);
   52231             :         } else {
   52232         133 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
   52233             :         }
   52234         133 :         result = py_info;
   52235         133 :         if (!W_ERROR_IS_OK(r->out.result)) {
   52236           4 :                 PyErr_SetWERROR(r->out.result);
   52237           4 :                 return NULL;
   52238             :         }
   52239             : 
   52240         127 :         return result;
   52241             : }
   52242             : 
   52243             : 
   52244           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_in_get_server_name(PyObject *obj, void *closure)
   52245             : {
   52246           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(obj);
   52247           0 :         PyObject *py_server_name;
   52248           0 :         if (object->in.server_name == NULL) {
   52249           0 :                 Py_RETURN_NONE;
   52250             :         }
   52251           0 :         if (object->in.server_name == NULL) {
   52252           0 :                 py_server_name = Py_None;
   52253           0 :                 Py_INCREF(py_server_name);
   52254             :         } else {
   52255           0 :                 if (object->in.server_name == NULL) {
   52256           0 :                         py_server_name = Py_None;
   52257           0 :                         Py_INCREF(py_server_name);
   52258             :                 } else {
   52259           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   52260             :                 }
   52261             :         }
   52262           0 :         return py_server_name;
   52263             : }
   52264             : 
   52265           0 : static int py_netr_NetrEnumerateTrustedDomainsEx_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   52266             : {
   52267           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
   52268           0 :         if (value == NULL) {
   52269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   52270           0 :                 return -1;
   52271             :         }
   52272           0 :         if (value == Py_None) {
   52273           0 :                 object->in.server_name = NULL;
   52274             :         } else {
   52275           0 :                 object->in.server_name = NULL;
   52276             :                 {
   52277           0 :                         const char *test_str;
   52278           0 :                         const char *talloc_str;
   52279           0 :                         PyObject *unicode = NULL;
   52280           0 :                         if (PyUnicode_Check(value)) {
   52281           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52282           0 :                                 if (unicode == NULL) {
   52283           0 :                                         return -1;
   52284             :                                 }
   52285           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52286           0 :                         } else if (PyBytes_Check(value)) {
   52287           0 :                                 test_str = PyBytes_AS_STRING(value);
   52288             :                         } else {
   52289           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52290           0 :                                 return -1;
   52291             :                         }
   52292           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52293           0 :                         if (unicode != NULL) {
   52294           0 :                                 Py_DECREF(unicode);
   52295             :                         }
   52296           0 :                         if (talloc_str == NULL) {
   52297           0 :                                 PyErr_NoMemory();
   52298           0 :                                 return -1;
   52299             :                         }
   52300           0 :                         object->in.server_name = talloc_str;
   52301             :                 }
   52302             :         }
   52303           0 :         return 0;
   52304             : }
   52305             : 
   52306           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_out_get_dom_trust_list(PyObject *obj, void *closure)
   52307             : {
   52308           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(obj);
   52309           0 :         PyObject *py_dom_trust_list;
   52310           0 :         if (object->out.dom_trust_list == NULL) {
   52311           0 :                 Py_RETURN_NONE;
   52312             :         }
   52313           0 :         py_dom_trust_list = pytalloc_reference_ex(&netr_DomainTrustList_Type, object->out.dom_trust_list, object->out.dom_trust_list);
   52314           0 :         return py_dom_trust_list;
   52315             : }
   52316             : 
   52317           0 : static int py_netr_NetrEnumerateTrustedDomainsEx_out_set_dom_trust_list(PyObject *py_obj, PyObject *value, void *closure)
   52318             : {
   52319           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
   52320           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dom_trust_list));
   52321           0 :         if (value == NULL) {
   52322           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.dom_trust_list");
   52323           0 :                 return -1;
   52324             :         }
   52325           0 :         object->out.dom_trust_list = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dom_trust_list);
   52326           0 :         if (object->out.dom_trust_list == NULL) {
   52327           0 :                 PyErr_NoMemory();
   52328           0 :                 return -1;
   52329             :         }
   52330           0 :         PY_CHECK_TYPE(&netr_DomainTrustList_Type, value, return -1;);
   52331           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   52332           0 :                 PyErr_NoMemory();
   52333           0 :                 return -1;
   52334             :         }
   52335           0 :         object->out.dom_trust_list = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
   52336           0 :         return 0;
   52337             : }
   52338             : 
   52339           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_get_result(PyObject *obj, void *closure)
   52340             : {
   52341           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(obj);
   52342           0 :         PyObject *py_result;
   52343           0 :         py_result = PyErr_FromWERROR(object->out.result);
   52344           0 :         return py_result;
   52345             : }
   52346             : 
   52347           0 : static int py_netr_NetrEnumerateTrustedDomainsEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   52348             : {
   52349           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
   52350           0 :         if (value == NULL) {
   52351           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   52352           0 :                 return -1;
   52353             :         }
   52354           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   52355           0 :         return 0;
   52356             : }
   52357             : 
   52358             : static PyGetSetDef py_netr_NetrEnumerateTrustedDomainsEx_getsetters[] = {
   52359             :         {
   52360             :                 .name = discard_const_p(char, "in_server_name"),
   52361             :                 .get = py_netr_NetrEnumerateTrustedDomainsEx_in_get_server_name,
   52362             :                 .set = py_netr_NetrEnumerateTrustedDomainsEx_in_set_server_name,
   52363             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52364             :         },
   52365             :         {
   52366             :                 .name = discard_const_p(char, "out_dom_trust_list"),
   52367             :                 .get = py_netr_NetrEnumerateTrustedDomainsEx_out_get_dom_trust_list,
   52368             :                 .set = py_netr_NetrEnumerateTrustedDomainsEx_out_set_dom_trust_list,
   52369             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
   52370             :         },
   52371             :         {
   52372             :                 .name = discard_const_p(char, "result"),
   52373             :                 .get = py_netr_NetrEnumerateTrustedDomainsEx_get_result,
   52374             :                 .set = py_netr_NetrEnumerateTrustedDomainsEx_set_result,
   52375             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   52376             :         },
   52377             :         { .name = NULL }
   52378             : };
   52379             : 
   52380           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   52381             : {
   52382           0 :         PyObject *self = pytalloc_new(struct netr_NetrEnumerateTrustedDomainsEx, type);
   52383           0 :         struct netr_NetrEnumerateTrustedDomainsEx *_self = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(self);
   52384           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   52385           0 :         _self->out.dom_trust_list = talloc_zero(mem_ctx, struct netr_DomainTrustList);
   52386           0 :         return self;
   52387             : }
   52388             : 
   52389           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   52390             : {
   52391             : 
   52392             : 
   52393           0 :         return PyLong_FromLong(36);
   52394             : }
   52395             : 
   52396           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   52397             : {
   52398           0 :         const struct ndr_interface_call *call = NULL;
   52399           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
   52400           0 :         PyObject *ret = NULL;
   52401           0 :         struct ndr_push *push = NULL;
   52402           0 :         DATA_BLOB blob;
   52403           0 :         enum ndr_err_code err;
   52404             : 
   52405           0 :         if (ndr_table_netlogon.num_calls < 37) {
   52406           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack");
   52407           0 :                 return NULL;
   52408             :         }
   52409           0 :         call = &ndr_table_netlogon.calls[36];
   52410             : 
   52411           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   52412           0 :         if (push == NULL) {
   52413           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52414           0 :                 return NULL;
   52415             :         }
   52416             : 
   52417           0 :         push->flags |= ndr_push_flags;
   52418             : 
   52419           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   52420           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52421           0 :                 TALLOC_FREE(push);
   52422           0 :                 PyErr_SetNdrError(err);
   52423           0 :                 return NULL;
   52424             :         }
   52425           0 :         blob = ndr_push_blob(push);
   52426           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   52427           0 :         TALLOC_FREE(push);
   52428           0 :         return ret;
   52429             : }
   52430             : 
   52431           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52432             : {
   52433           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52434           0 :         PyObject *bigendian_obj = NULL;
   52435           0 :         PyObject *ndr64_obj = NULL;
   52436           0 :         libndr_flags ndr_push_flags = 0;
   52437             : 
   52438           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   52439             :                 discard_const_p(char *, kwnames),
   52440             :                 &bigendian_obj,
   52441             :                 &ndr64_obj)) {
   52442           0 :                 return NULL;
   52443             :         }
   52444             : 
   52445           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52446           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52447             :         }
   52448           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52449           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52450             :         }
   52451             : 
   52452           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   52453             : }
   52454             : 
   52455           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52456             : {
   52457           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52458           0 :         PyObject *bigendian_obj = NULL;
   52459           0 :         PyObject *ndr64_obj = NULL;
   52460           0 :         libndr_flags ndr_push_flags = 0;
   52461             : 
   52462           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   52463             :                 discard_const_p(char *, kwnames),
   52464             :                 &bigendian_obj,
   52465             :                 &ndr64_obj)) {
   52466           0 :                 return NULL;
   52467             :         }
   52468             : 
   52469           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52470           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52471             :         }
   52472           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52473           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52474             :         }
   52475             : 
   52476           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   52477             : }
   52478             : 
   52479           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   52480             : {
   52481           0 :         const struct ndr_interface_call *call = NULL;
   52482           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
   52483           0 :         struct ndr_pull *pull = NULL;
   52484           0 :         enum ndr_err_code err;
   52485             : 
   52486           0 :         if (ndr_table_netlogon.num_calls < 37) {
   52487           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack");
   52488           0 :                 return NULL;
   52489             :         }
   52490           0 :         call = &ndr_table_netlogon.calls[36];
   52491             : 
   52492           0 :         pull = ndr_pull_init_blob(blob, object);
   52493           0 :         if (pull == NULL) {
   52494           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52495           0 :                 return NULL;
   52496             :         }
   52497             : 
   52498           0 :         pull->flags |= ndr_pull_flags;
   52499             : 
   52500           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   52501           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52502           0 :                 TALLOC_FREE(pull);
   52503           0 :                 PyErr_SetNdrError(err);
   52504           0 :                 return NULL;
   52505             :         }
   52506           0 :         if (!allow_remaining) {
   52507           0 :                 uint32_t highest_ofs;
   52508             : 
   52509           0 :                 if (pull->offset > pull->relative_highest_offset) {
   52510           0 :                         highest_ofs = pull->offset;
   52511             :                 } else {
   52512           0 :                         highest_ofs = pull->relative_highest_offset;
   52513             :                 }
   52514           0 :                 if (highest_ofs < pull->data_size) {
   52515           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   52516             :                                 "not all bytes consumed ofs[%u] size[%u]",
   52517             :                                 highest_ofs, pull->data_size);
   52518           0 :                         TALLOC_FREE(pull);
   52519           0 :                         PyErr_SetNdrError(err);
   52520           0 :                         return NULL;
   52521             :                 }
   52522             :         }
   52523             : 
   52524           0 :         TALLOC_FREE(pull);
   52525           0 :         Py_RETURN_NONE;
   52526             : }
   52527             : 
   52528           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52529             : {
   52530           0 :         DATA_BLOB blob;
   52531           0 :         Py_ssize_t blob_length = 0;
   52532           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52533           0 :         PyObject *bigendian_obj = NULL;
   52534           0 :         PyObject *ndr64_obj = NULL;
   52535           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52536           0 :         PyObject *allow_remaining_obj = NULL;
   52537           0 :         bool allow_remaining = false;
   52538             : 
   52539           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   52540             :                 discard_const_p(char *, kwnames),
   52541             :                 &blob.data, &blob_length,
   52542             :                 &bigendian_obj,
   52543             :                 &ndr64_obj,
   52544             :                 &allow_remaining_obj)) {
   52545           0 :                 return NULL;
   52546             :         }
   52547           0 :         blob.length = blob_length;
   52548             : 
   52549           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52550           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52551             :         }
   52552           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52553           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52554             :         }
   52555             : 
   52556           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52557           0 :                 allow_remaining = true;
   52558             :         }
   52559             : 
   52560           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   52561             : }
   52562             : 
   52563           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52564             : {
   52565           0 :         DATA_BLOB blob;
   52566           0 :         Py_ssize_t blob_length = 0;
   52567           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52568           0 :         PyObject *bigendian_obj = NULL;
   52569           0 :         PyObject *ndr64_obj = NULL;
   52570           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52571           0 :         PyObject *allow_remaining_obj = NULL;
   52572           0 :         bool allow_remaining = false;
   52573             : 
   52574           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   52575             :                 discard_const_p(char *, kwnames),
   52576             :                 &blob.data, &blob_length,
   52577             :                 &bigendian_obj,
   52578             :                 &ndr64_obj,
   52579             :                 &allow_remaining_obj)) {
   52580           0 :                 return NULL;
   52581             :         }
   52582           0 :         blob.length = blob_length;
   52583             : 
   52584           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52585           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52586             :         }
   52587           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52588           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52589             :         }
   52590             : 
   52591           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52592           0 :                 allow_remaining = true;
   52593             :         }
   52594             : 
   52595           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   52596             : }
   52597             : 
   52598           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   52599             : {
   52600           0 :         const struct ndr_interface_call *call = NULL;
   52601           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
   52602           0 :         PyObject *ret;
   52603           0 :         char *retstr;
   52604             : 
   52605           0 :         if (ndr_table_netlogon.num_calls < 37) {
   52606           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_print");
   52607           0 :                 return NULL;
   52608             :         }
   52609           0 :         call = &ndr_table_netlogon.calls[36];
   52610             : 
   52611           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   52612           0 :         ret = PyUnicode_FromString(retstr);
   52613           0 :         TALLOC_FREE(retstr);
   52614             : 
   52615           0 :         return ret;
   52616             : }
   52617             : 
   52618           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52619             : {
   52620           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomainsEx_in", NDR_IN);
   52621             : }
   52622             : 
   52623           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52624             : {
   52625           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomainsEx_out", NDR_OUT);
   52626             : }
   52627             : 
   52628             : static PyMethodDef py_netr_NetrEnumerateTrustedDomainsEx_methods[] = {
   52629             :         { "opnum", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   52630             :                 "netlogon.netr_NetrEnumerateTrustedDomainsEx.opnum() -> 36 (0x24) " },
   52631             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   52632             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   52633             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   52634             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   52635             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   52636             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   52637             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   52638             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   52639             :         { "__ndr_print_in__", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   52640             :         { "__ndr_print_out__", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   52641             :         { NULL, NULL, 0, NULL }
   52642             : };
   52643             : 
   52644             : 
   52645             : static PyTypeObject netr_NetrEnumerateTrustedDomainsEx_Type = {
   52646             :         PyVarObject_HEAD_INIT(NULL, 0)
   52647             :         .tp_name = "netlogon.netr_NetrEnumerateTrustedDomainsEx",
   52648             :         .tp_getset = py_netr_NetrEnumerateTrustedDomainsEx_getsetters,
   52649             :         .tp_methods = py_netr_NetrEnumerateTrustedDomainsEx_methods,
   52650             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   52651             :         .tp_new = py_netr_NetrEnumerateTrustedDomainsEx_new,
   52652             : };
   52653             : 
   52654           0 : static bool pack_py_netr_NetrEnumerateTrustedDomainsEx_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrEnumerateTrustedDomainsEx *r)
   52655             : {
   52656           0 :         PyObject *py_server_name;
   52657           0 :         const char *kwnames[] = {
   52658             :                 "server_name", NULL
   52659             :         };
   52660             : 
   52661           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_NetrEnumerateTrustedDomainsEx", discard_const_p(char *, kwnames), &py_server_name)) {
   52662           0 :                 return false;
   52663             :         }
   52664             : 
   52665           0 :         if (py_server_name == NULL) {
   52666           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   52667           0 :                 return false;
   52668             :         }
   52669           0 :         if (py_server_name == Py_None) {
   52670           0 :                 r->in.server_name = NULL;
   52671             :         } else {
   52672           0 :                 r->in.server_name = NULL;
   52673             :                 {
   52674           0 :                         const char *test_str;
   52675           0 :                         const char *talloc_str;
   52676           0 :                         PyObject *unicode = NULL;
   52677           0 :                         if (PyUnicode_Check(py_server_name)) {
   52678           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   52679           0 :                                 if (unicode == NULL) {
   52680           0 :                                         return false;
   52681             :                                 }
   52682           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52683           0 :                         } else if (PyBytes_Check(py_server_name)) {
   52684           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   52685             :                         } else {
   52686           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   52687           0 :                                 return false;
   52688             :                         }
   52689           0 :                         talloc_str = talloc_strdup(r, test_str);
   52690           0 :                         if (unicode != NULL) {
   52691           0 :                                 Py_DECREF(unicode);
   52692             :                         }
   52693           0 :                         if (talloc_str == NULL) {
   52694           0 :                                 PyErr_NoMemory();
   52695           0 :                                 return false;
   52696             :                         }
   52697           0 :                         r->in.server_name = talloc_str;
   52698             :                 }
   52699             :         }
   52700           0 :         return true;
   52701             : }
   52702             : 
   52703           0 : static PyObject *unpack_py_netr_NetrEnumerateTrustedDomainsEx_args_out(struct netr_NetrEnumerateTrustedDomainsEx *r)
   52704             : {
   52705           0 :         PyObject *result;
   52706           0 :         PyObject *py_dom_trust_list;
   52707           0 :         py_dom_trust_list = pytalloc_reference_ex(&netr_DomainTrustList_Type, r->out.dom_trust_list, r->out.dom_trust_list);
   52708           0 :         result = py_dom_trust_list;
   52709           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   52710           0 :                 PyErr_SetWERROR(r->out.result);
   52711           0 :                 return NULL;
   52712             :         }
   52713             : 
   52714           0 :         return result;
   52715             : }
   52716             : 
   52717             : 
   52718           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_server_name(PyObject *obj, void *closure)
   52719             : {
   52720           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
   52721           0 :         PyObject *py_server_name;
   52722           0 :         if (object->in.server_name == NULL) {
   52723           0 :                 Py_RETURN_NONE;
   52724             :         }
   52725           0 :         if (object->in.server_name == NULL) {
   52726           0 :                 py_server_name = Py_None;
   52727           0 :                 Py_INCREF(py_server_name);
   52728             :         } else {
   52729           0 :                 if (object->in.server_name == NULL) {
   52730           0 :                         py_server_name = Py_None;
   52731           0 :                         Py_INCREF(py_server_name);
   52732             :                 } else {
   52733           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   52734             :                 }
   52735             :         }
   52736           0 :         return py_server_name;
   52737             : }
   52738             : 
   52739           0 : static int py_netr_DsRAddressToSitenamesExW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   52740             : {
   52741           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
   52742           0 :         if (value == NULL) {
   52743           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   52744           0 :                 return -1;
   52745             :         }
   52746           0 :         if (value == Py_None) {
   52747           0 :                 object->in.server_name = NULL;
   52748             :         } else {
   52749           0 :                 object->in.server_name = NULL;
   52750             :                 {
   52751           0 :                         const char *test_str;
   52752           0 :                         const char *talloc_str;
   52753           0 :                         PyObject *unicode = NULL;
   52754           0 :                         if (PyUnicode_Check(value)) {
   52755           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52756           0 :                                 if (unicode == NULL) {
   52757           0 :                                         return -1;
   52758             :                                 }
   52759           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52760           0 :                         } else if (PyBytes_Check(value)) {
   52761           0 :                                 test_str = PyBytes_AS_STRING(value);
   52762             :                         } else {
   52763           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52764           0 :                                 return -1;
   52765             :                         }
   52766           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52767           0 :                         if (unicode != NULL) {
   52768           0 :                                 Py_DECREF(unicode);
   52769             :                         }
   52770           0 :                         if (talloc_str == NULL) {
   52771           0 :                                 PyErr_NoMemory();
   52772           0 :                                 return -1;
   52773             :                         }
   52774           0 :                         object->in.server_name = talloc_str;
   52775             :                 }
   52776             :         }
   52777           0 :         return 0;
   52778             : }
   52779             : 
   52780           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_count(PyObject *obj, void *closure)
   52781             : {
   52782           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
   52783           0 :         PyObject *py_count;
   52784           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->in.count));
   52785           0 :         return py_count;
   52786             : }
   52787             : 
   52788           0 : static int py_netr_DsRAddressToSitenamesExW_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
   52789             : {
   52790           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
   52791           0 :         if (value == NULL) {
   52792           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.count");
   52793           0 :                 return -1;
   52794             :         }
   52795             :         {
   52796           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
   52797           0 :                 if (PyLong_Check(value)) {
   52798           0 :                         unsigned long long test_var;
   52799           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52800           0 :                         if (PyErr_Occurred() != NULL) {
   52801           0 :                                 return -1;
   52802             :                         }
   52803           0 :                         if (test_var > uint_max) {
   52804           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52805             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52806           0 :                                 return -1;
   52807             :                         }
   52808           0 :                         object->in.count = test_var;
   52809             :                 } else {
   52810           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52811             :                           PyLong_Type.tp_name);
   52812           0 :                         return -1;
   52813             :                 }
   52814             :         }
   52815           0 :         return 0;
   52816             : }
   52817             : 
   52818           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_addresses(PyObject *obj, void *closure)
   52819             : {
   52820           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
   52821           0 :         PyObject *py_addresses;
   52822           0 :         if (object->in.addresses == NULL) {
   52823           0 :                 Py_RETURN_NONE;
   52824             :         }
   52825           0 :         py_addresses = PyList_New(object->in.count);
   52826           0 :         if (py_addresses == NULL) {
   52827           0 :                 return NULL;
   52828             :         }
   52829             :         {
   52830             :                 int addresses_cntr_1;
   52831           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < (object->in.count); addresses_cntr_1++) {
   52832           0 :                         PyObject *py_addresses_1;
   52833           0 :                         py_addresses_1 = pytalloc_reference_ex(&netr_DsRAddress_Type, object->in.addresses, &(object->in.addresses)[addresses_cntr_1]);
   52834           0 :                         PyList_SetItem(py_addresses, addresses_cntr_1, py_addresses_1);
   52835             :                 }
   52836             :         }
   52837           0 :         return py_addresses;
   52838             : }
   52839             : 
   52840           0 : static int py_netr_DsRAddressToSitenamesExW_in_set_addresses(PyObject *py_obj, PyObject *value, void *closure)
   52841             : {
   52842           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
   52843           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.addresses));
   52844           0 :         if (value == NULL) {
   52845           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.addresses");
   52846           0 :                 return -1;
   52847             :         }
   52848           0 :         object->in.addresses = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses);
   52849           0 :         if (object->in.addresses == NULL) {
   52850           0 :                 PyErr_NoMemory();
   52851           0 :                 return -1;
   52852             :         }
   52853           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   52854             :         {
   52855           0 :                 int addresses_cntr_1;
   52856           0 :                 object->in.addresses = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses, PyList_GET_SIZE(value));
   52857           0 :                 if (!object->in.addresses) { return -1; }
   52858           0 :                 talloc_set_name_const(object->in.addresses, "ARRAY: object->in.addresses");
   52859           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(value); addresses_cntr_1++) {
   52860           0 :                         if (PyList_GET_ITEM(value, addresses_cntr_1) == NULL) {
   52861           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->in.addresses)[addresses_cntr_1]");
   52862           0 :                                 return -1;
   52863             :                         }
   52864           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(value, addresses_cntr_1), return -1;);
   52865           0 :                         if (talloc_reference(object->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, addresses_cntr_1))) == NULL) {
   52866           0 :                                 PyErr_NoMemory();
   52867           0 :                                 return -1;
   52868             :                         }
   52869           0 :                         (object->in.addresses)[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(value, addresses_cntr_1));
   52870             :                 }
   52871             :         }
   52872           0 :         return 0;
   52873             : }
   52874             : 
   52875           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_out_get_ctr(PyObject *obj, void *closure)
   52876             : {
   52877           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
   52878           0 :         PyObject *py_ctr;
   52879           0 :         if (object->out.ctr == NULL) {
   52880           0 :                 Py_RETURN_NONE;
   52881             :         }
   52882           0 :         if (*object->out.ctr == NULL) {
   52883           0 :                 py_ctr = Py_None;
   52884           0 :                 Py_INCREF(py_ctr);
   52885             :         } else {
   52886           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesExWCtr_Type, *object->out.ctr, *object->out.ctr);
   52887             :         }
   52888           0 :         return py_ctr;
   52889             : }
   52890             : 
   52891           0 : static int py_netr_DsRAddressToSitenamesExW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   52892             : {
   52893           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
   52894           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   52895           0 :         if (value == NULL) {
   52896           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ctr");
   52897           0 :                 return -1;
   52898             :         }
   52899           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   52900           0 :         if (object->out.ctr == NULL) {
   52901           0 :                 PyErr_NoMemory();
   52902           0 :                 return -1;
   52903             :         }
   52904           0 :         if (value == Py_None) {
   52905           0 :                 *object->out.ctr = NULL;
   52906             :         } else {
   52907           0 :                 *object->out.ctr = NULL;
   52908           0 :                 PY_CHECK_TYPE(&netr_DsRAddressToSitenamesExWCtr_Type, value, return -1;);
   52909           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   52910           0 :                         PyErr_NoMemory();
   52911           0 :                         return -1;
   52912             :                 }
   52913           0 :                 *object->out.ctr = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(value);
   52914             :         }
   52915           0 :         return 0;
   52916             : }
   52917             : 
   52918           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_get_result(PyObject *obj, void *closure)
   52919             : {
   52920           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
   52921           0 :         PyObject *py_result;
   52922           0 :         py_result = PyErr_FromWERROR(object->out.result);
   52923           0 :         return py_result;
   52924             : }
   52925             : 
   52926           0 : static int py_netr_DsRAddressToSitenamesExW_set_result(PyObject *py_obj, PyObject *value, void *closure)
   52927             : {
   52928           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
   52929           0 :         if (value == NULL) {
   52930           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   52931           0 :                 return -1;
   52932             :         }
   52933           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   52934           0 :         return 0;
   52935             : }
   52936             : 
   52937             : static PyGetSetDef py_netr_DsRAddressToSitenamesExW_getsetters[] = {
   52938             :         {
   52939             :                 .name = discard_const_p(char, "in_server_name"),
   52940             :                 .get = py_netr_DsRAddressToSitenamesExW_in_get_server_name,
   52941             :                 .set = py_netr_DsRAddressToSitenamesExW_in_set_server_name,
   52942             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52943             :         },
   52944             :         {
   52945             :                 .name = discard_const_p(char, "in_count"),
   52946             :                 .get = py_netr_DsRAddressToSitenamesExW_in_get_count,
   52947             :                 .set = py_netr_DsRAddressToSitenamesExW_in_set_count,
   52948             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52949             :         },
   52950             :         {
   52951             :                 .name = discard_const_p(char, "in_addresses"),
   52952             :                 .get = py_netr_DsRAddressToSitenamesExW_in_get_addresses,
   52953             :                 .set = py_netr_DsRAddressToSitenamesExW_in_set_addresses,
   52954             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddress")
   52955             :         },
   52956             :         {
   52957             :                 .name = discard_const_p(char, "out_ctr"),
   52958             :                 .get = py_netr_DsRAddressToSitenamesExW_out_get_ctr,
   52959             :                 .set = py_netr_DsRAddressToSitenamesExW_out_set_ctr,
   52960             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddressToSitenamesExWCtr")
   52961             :         },
   52962             :         {
   52963             :                 .name = discard_const_p(char, "result"),
   52964             :                 .get = py_netr_DsRAddressToSitenamesExW_get_result,
   52965             :                 .set = py_netr_DsRAddressToSitenamesExW_set_result,
   52966             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   52967             :         },
   52968             :         { .name = NULL }
   52969             : };
   52970             : 
   52971           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   52972             : {
   52973           0 :         PyObject *self = pytalloc_new(struct netr_DsRAddressToSitenamesExW, type);
   52974           0 :         struct netr_DsRAddressToSitenamesExW *_self = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(self);
   52975           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   52976           0 :         _self->in.addresses = talloc_zero(mem_ctx, struct netr_DsRAddress);
   52977             :         /* a pointer to a NULL pointer */
   52978           0 :         _self->out.ctr = talloc_zero(mem_ctx, struct netr_DsRAddressToSitenamesExWCtr *);
   52979           0 :         return self;
   52980             : }
   52981             : 
   52982           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   52983             : {
   52984             : 
   52985             : 
   52986           0 :         return PyLong_FromLong(37);
   52987             : }
   52988             : 
   52989           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   52990             : {
   52991           0 :         const struct ndr_interface_call *call = NULL;
   52992           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
   52993           0 :         PyObject *ret = NULL;
   52994           0 :         struct ndr_push *push = NULL;
   52995           0 :         DATA_BLOB blob;
   52996           0 :         enum ndr_err_code err;
   52997             : 
   52998           0 :         if (ndr_table_netlogon.num_calls < 38) {
   52999           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_pack");
   53000           0 :                 return NULL;
   53001             :         }
   53002           0 :         call = &ndr_table_netlogon.calls[37];
   53003             : 
   53004           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   53005           0 :         if (push == NULL) {
   53006           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53007           0 :                 return NULL;
   53008             :         }
   53009             : 
   53010           0 :         push->flags |= ndr_push_flags;
   53011             : 
   53012           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   53013           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53014           0 :                 TALLOC_FREE(push);
   53015           0 :                 PyErr_SetNdrError(err);
   53016           0 :                 return NULL;
   53017             :         }
   53018           0 :         blob = ndr_push_blob(push);
   53019           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   53020           0 :         TALLOC_FREE(push);
   53021           0 :         return ret;
   53022             : }
   53023             : 
   53024           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53025             : {
   53026           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53027           0 :         PyObject *bigendian_obj = NULL;
   53028           0 :         PyObject *ndr64_obj = NULL;
   53029           0 :         libndr_flags ndr_push_flags = 0;
   53030             : 
   53031           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   53032             :                 discard_const_p(char *, kwnames),
   53033             :                 &bigendian_obj,
   53034             :                 &ndr64_obj)) {
   53035           0 :                 return NULL;
   53036             :         }
   53037             : 
   53038           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53039           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53040             :         }
   53041           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53042           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53043             :         }
   53044             : 
   53045           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   53046             : }
   53047             : 
   53048           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53049             : {
   53050           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53051           0 :         PyObject *bigendian_obj = NULL;
   53052           0 :         PyObject *ndr64_obj = NULL;
   53053           0 :         libndr_flags ndr_push_flags = 0;
   53054             : 
   53055           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   53056             :                 discard_const_p(char *, kwnames),
   53057             :                 &bigendian_obj,
   53058             :                 &ndr64_obj)) {
   53059           0 :                 return NULL;
   53060             :         }
   53061             : 
   53062           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53063           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53064             :         }
   53065           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53066           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53067             :         }
   53068             : 
   53069           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   53070             : }
   53071             : 
   53072           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   53073             : {
   53074           0 :         const struct ndr_interface_call *call = NULL;
   53075           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
   53076           0 :         struct ndr_pull *pull = NULL;
   53077           0 :         enum ndr_err_code err;
   53078             : 
   53079           0 :         if (ndr_table_netlogon.num_calls < 38) {
   53080           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_unpack");
   53081           0 :                 return NULL;
   53082             :         }
   53083           0 :         call = &ndr_table_netlogon.calls[37];
   53084             : 
   53085           0 :         pull = ndr_pull_init_blob(blob, object);
   53086           0 :         if (pull == NULL) {
   53087           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53088           0 :                 return NULL;
   53089             :         }
   53090             : 
   53091           0 :         pull->flags |= ndr_pull_flags;
   53092             : 
   53093           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   53094           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53095           0 :                 TALLOC_FREE(pull);
   53096           0 :                 PyErr_SetNdrError(err);
   53097           0 :                 return NULL;
   53098             :         }
   53099           0 :         if (!allow_remaining) {
   53100           0 :                 uint32_t highest_ofs;
   53101             : 
   53102           0 :                 if (pull->offset > pull->relative_highest_offset) {
   53103           0 :                         highest_ofs = pull->offset;
   53104             :                 } else {
   53105           0 :                         highest_ofs = pull->relative_highest_offset;
   53106             :                 }
   53107           0 :                 if (highest_ofs < pull->data_size) {
   53108           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   53109             :                                 "not all bytes consumed ofs[%u] size[%u]",
   53110             :                                 highest_ofs, pull->data_size);
   53111           0 :                         TALLOC_FREE(pull);
   53112           0 :                         PyErr_SetNdrError(err);
   53113           0 :                         return NULL;
   53114             :                 }
   53115             :         }
   53116             : 
   53117           0 :         TALLOC_FREE(pull);
   53118           0 :         Py_RETURN_NONE;
   53119             : }
   53120             : 
   53121           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53122             : {
   53123           0 :         DATA_BLOB blob;
   53124           0 :         Py_ssize_t blob_length = 0;
   53125           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53126           0 :         PyObject *bigendian_obj = NULL;
   53127           0 :         PyObject *ndr64_obj = NULL;
   53128           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53129           0 :         PyObject *allow_remaining_obj = NULL;
   53130           0 :         bool allow_remaining = false;
   53131             : 
   53132           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   53133             :                 discard_const_p(char *, kwnames),
   53134             :                 &blob.data, &blob_length,
   53135             :                 &bigendian_obj,
   53136             :                 &ndr64_obj,
   53137             :                 &allow_remaining_obj)) {
   53138           0 :                 return NULL;
   53139             :         }
   53140           0 :         blob.length = blob_length;
   53141             : 
   53142           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53143           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53144             :         }
   53145           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53146           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53147             :         }
   53148             : 
   53149           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53150           0 :                 allow_remaining = true;
   53151             :         }
   53152             : 
   53153           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   53154             : }
   53155             : 
   53156           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53157             : {
   53158           0 :         DATA_BLOB blob;
   53159           0 :         Py_ssize_t blob_length = 0;
   53160           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53161           0 :         PyObject *bigendian_obj = NULL;
   53162           0 :         PyObject *ndr64_obj = NULL;
   53163           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53164           0 :         PyObject *allow_remaining_obj = NULL;
   53165           0 :         bool allow_remaining = false;
   53166             : 
   53167           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   53168             :                 discard_const_p(char *, kwnames),
   53169             :                 &blob.data, &blob_length,
   53170             :                 &bigendian_obj,
   53171             :                 &ndr64_obj,
   53172             :                 &allow_remaining_obj)) {
   53173           0 :                 return NULL;
   53174             :         }
   53175           0 :         blob.length = blob_length;
   53176             : 
   53177           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53178           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53179             :         }
   53180           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53181           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53182             :         }
   53183             : 
   53184           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53185           0 :                 allow_remaining = true;
   53186             :         }
   53187             : 
   53188           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53189             : }
   53190             : 
   53191           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   53192             : {
   53193           0 :         const struct ndr_interface_call *call = NULL;
   53194           0 :         struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
   53195           0 :         PyObject *ret;
   53196           0 :         char *retstr;
   53197             : 
   53198           0 :         if (ndr_table_netlogon.num_calls < 38) {
   53199           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_print");
   53200           0 :                 return NULL;
   53201             :         }
   53202           0 :         call = &ndr_table_netlogon.calls[37];
   53203             : 
   53204           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53205           0 :         ret = PyUnicode_FromString(retstr);
   53206           0 :         TALLOC_FREE(retstr);
   53207             : 
   53208           0 :         return ret;
   53209             : }
   53210             : 
   53211           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53212             : {
   53213           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_print(py_obj, "netr_DsRAddressToSitenamesExW_in", NDR_IN);
   53214             : }
   53215             : 
   53216           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53217             : {
   53218           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_print(py_obj, "netr_DsRAddressToSitenamesExW_out", NDR_OUT);
   53219             : }
   53220             : 
   53221             : static PyMethodDef py_netr_DsRAddressToSitenamesExW_methods[] = {
   53222             :         { "opnum", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_opnum, METH_NOARGS|METH_CLASS,
   53223             :                 "netlogon.netr_DsRAddressToSitenamesExW.opnum() -> 37 (0x25) " },
   53224             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53225             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53226             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53227             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53228             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53229             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53230             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53231             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53232             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53233             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53234             :         { NULL, NULL, 0, NULL }
   53235             : };
   53236             : 
   53237             : 
   53238             : static PyTypeObject netr_DsRAddressToSitenamesExW_Type = {
   53239             :         PyVarObject_HEAD_INIT(NULL, 0)
   53240             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesExW",
   53241             :         .tp_getset = py_netr_DsRAddressToSitenamesExW_getsetters,
   53242             :         .tp_methods = py_netr_DsRAddressToSitenamesExW_methods,
   53243             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53244             :         .tp_new = py_netr_DsRAddressToSitenamesExW_new,
   53245             : };
   53246             : 
   53247           0 : static bool pack_py_netr_DsRAddressToSitenamesExW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRAddressToSitenamesExW *r)
   53248             : {
   53249           0 :         PyObject *py_server_name;
   53250           0 :         PyObject *py_addresses;
   53251           0 :         const char *kwnames[] = {
   53252             :                 "server_name", "addresses", NULL
   53253             :         };
   53254             : 
   53255           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsRAddressToSitenamesExW", discard_const_p(char *, kwnames), &py_server_name, &py_addresses)) {
   53256           0 :                 return false;
   53257             :         }
   53258             : 
   53259           0 :         if (py_server_name == NULL) {
   53260           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   53261           0 :                 return false;
   53262             :         }
   53263           0 :         if (py_server_name == Py_None) {
   53264           0 :                 r->in.server_name = NULL;
   53265             :         } else {
   53266           0 :                 r->in.server_name = NULL;
   53267             :                 {
   53268           0 :                         const char *test_str;
   53269           0 :                         const char *talloc_str;
   53270           0 :                         PyObject *unicode = NULL;
   53271           0 :                         if (PyUnicode_Check(py_server_name)) {
   53272           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   53273           0 :                                 if (unicode == NULL) {
   53274           0 :                                         return false;
   53275             :                                 }
   53276           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53277           0 :                         } else if (PyBytes_Check(py_server_name)) {
   53278           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   53279             :                         } else {
   53280           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   53281           0 :                                 return false;
   53282             :                         }
   53283           0 :                         talloc_str = talloc_strdup(r, test_str);
   53284           0 :                         if (unicode != NULL) {
   53285           0 :                                 Py_DECREF(unicode);
   53286             :                         }
   53287           0 :                         if (talloc_str == NULL) {
   53288           0 :                                 PyErr_NoMemory();
   53289           0 :                                 return false;
   53290             :                         }
   53291           0 :                         r->in.server_name = talloc_str;
   53292             :                 }
   53293             :         }
   53294           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   53295           0 :         r->in.count = PyList_GET_SIZE(py_addresses);
   53296           0 :         if (py_addresses == NULL) {
   53297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.addresses");
   53298           0 :                 return false;
   53299             :         }
   53300           0 :         r->in.addresses = talloc_ptrtype(r, r->in.addresses);
   53301           0 :         if (r->in.addresses == NULL) {
   53302           0 :                 PyErr_NoMemory();
   53303           0 :                 return false;
   53304             :         }
   53305           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   53306             :         {
   53307           0 :                 int addresses_cntr_1;
   53308           0 :                 r->in.addresses = talloc_array_ptrtype(r, r->in.addresses, PyList_GET_SIZE(py_addresses));
   53309           0 :                 if (!r->in.addresses) { return false; }
   53310           0 :                 talloc_set_name_const(r->in.addresses, "ARRAY: r->in.addresses");
   53311           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(py_addresses); addresses_cntr_1++) {
   53312           0 :                         if (PyList_GET_ITEM(py_addresses, addresses_cntr_1) == NULL) {
   53313           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (r->in.addresses)[addresses_cntr_1]");
   53314           0 :                                 return false;
   53315             :                         }
   53316           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(py_addresses, addresses_cntr_1), return false;);
   53317           0 :                         if (talloc_reference(r->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_addresses, addresses_cntr_1))) == NULL) {
   53318           0 :                                 PyErr_NoMemory();
   53319           0 :                                 return false;
   53320             :                         }
   53321           0 :                         (r->in.addresses)[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(py_addresses, addresses_cntr_1));
   53322             :                 }
   53323             :         }
   53324           0 :         return true;
   53325             : }
   53326             : 
   53327           0 : static PyObject *unpack_py_netr_DsRAddressToSitenamesExW_args_out(struct netr_DsRAddressToSitenamesExW *r)
   53328             : {
   53329           0 :         PyObject *result;
   53330           0 :         PyObject *py_ctr;
   53331           0 :         if (*r->out.ctr == NULL) {
   53332           0 :                 py_ctr = Py_None;
   53333           0 :                 Py_INCREF(py_ctr);
   53334             :         } else {
   53335           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesExWCtr_Type, *r->out.ctr, *r->out.ctr);
   53336             :         }
   53337           0 :         result = py_ctr;
   53338           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   53339           0 :                 PyErr_SetWERROR(r->out.result);
   53340           0 :                 return NULL;
   53341             :         }
   53342             : 
   53343           0 :         return result;
   53344             : }
   53345             : 
   53346             : 
   53347           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_in_get_server_name(PyObject *obj, void *closure)
   53348             : {
   53349           0 :         struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(obj);
   53350           0 :         PyObject *py_server_name;
   53351           0 :         if (object->in.server_name == NULL) {
   53352           0 :                 Py_RETURN_NONE;
   53353             :         }
   53354           0 :         if (object->in.server_name == NULL) {
   53355           0 :                 py_server_name = Py_None;
   53356           0 :                 Py_INCREF(py_server_name);
   53357             :         } else {
   53358           0 :                 if (object->in.server_name == NULL) {
   53359           0 :                         py_server_name = Py_None;
   53360           0 :                         Py_INCREF(py_server_name);
   53361             :                 } else {
   53362           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   53363             :                 }
   53364             :         }
   53365           0 :         return py_server_name;
   53366             : }
   53367             : 
   53368           0 : static int py_netr_DsrGetDcSiteCoverageW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   53369             : {
   53370           0 :         struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
   53371           0 :         if (value == NULL) {
   53372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   53373           0 :                 return -1;
   53374             :         }
   53375           0 :         if (value == Py_None) {
   53376           0 :                 object->in.server_name = NULL;
   53377             :         } else {
   53378           0 :                 object->in.server_name = NULL;
   53379             :                 {
   53380           0 :                         const char *test_str;
   53381           0 :                         const char *talloc_str;
   53382           0 :                         PyObject *unicode = NULL;
   53383           0 :                         if (PyUnicode_Check(value)) {
   53384           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53385           0 :                                 if (unicode == NULL) {
   53386           0 :                                         return -1;
   53387             :                                 }
   53388           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53389           0 :                         } else if (PyBytes_Check(value)) {
   53390           0 :                                 test_str = PyBytes_AS_STRING(value);
   53391             :                         } else {
   53392           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53393           0 :                                 return -1;
   53394             :                         }
   53395           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53396           0 :                         if (unicode != NULL) {
   53397           0 :                                 Py_DECREF(unicode);
   53398             :                         }
   53399           0 :                         if (talloc_str == NULL) {
   53400           0 :                                 PyErr_NoMemory();
   53401           0 :                                 return -1;
   53402             :                         }
   53403           0 :                         object->in.server_name = talloc_str;
   53404             :                 }
   53405             :         }
   53406           0 :         return 0;
   53407             : }
   53408             : 
   53409           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_out_get_ctr(PyObject *obj, void *closure)
   53410             : {
   53411           0 :         struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(obj);
   53412           0 :         PyObject *py_ctr;
   53413           0 :         if (object->out.ctr == NULL) {
   53414           0 :                 Py_RETURN_NONE;
   53415             :         }
   53416           0 :         if (*object->out.ctr == NULL) {
   53417           0 :                 py_ctr = Py_None;
   53418           0 :                 Py_INCREF(py_ctr);
   53419             :         } else {
   53420           0 :                 py_ctr = pytalloc_reference_ex(&DcSitesCtr_Type, *object->out.ctr, *object->out.ctr);
   53421             :         }
   53422           0 :         return py_ctr;
   53423             : }
   53424             : 
   53425           0 : static int py_netr_DsrGetDcSiteCoverageW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   53426             : {
   53427           0 :         struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
   53428           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   53429           0 :         if (value == NULL) {
   53430           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ctr");
   53431           0 :                 return -1;
   53432             :         }
   53433           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   53434           0 :         if (object->out.ctr == NULL) {
   53435           0 :                 PyErr_NoMemory();
   53436           0 :                 return -1;
   53437             :         }
   53438           0 :         if (value == Py_None) {
   53439           0 :                 *object->out.ctr = NULL;
   53440             :         } else {
   53441           0 :                 *object->out.ctr = NULL;
   53442           0 :                 PY_CHECK_TYPE(&DcSitesCtr_Type, value, return -1;);
   53443           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   53444           0 :                         PyErr_NoMemory();
   53445           0 :                         return -1;
   53446             :                 }
   53447           0 :                 *object->out.ctr = (struct DcSitesCtr *)pytalloc_get_ptr(value);
   53448             :         }
   53449           0 :         return 0;
   53450             : }
   53451             : 
   53452           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_get_result(PyObject *obj, void *closure)
   53453             : {
   53454           0 :         struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(obj);
   53455           0 :         PyObject *py_result;
   53456           0 :         py_result = PyErr_FromWERROR(object->out.result);
   53457           0 :         return py_result;
   53458             : }
   53459             : 
   53460           0 : static int py_netr_DsrGetDcSiteCoverageW_set_result(PyObject *py_obj, PyObject *value, void *closure)
   53461             : {
   53462           0 :         struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
   53463           0 :         if (value == NULL) {
   53464           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   53465           0 :                 return -1;
   53466             :         }
   53467           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   53468           0 :         return 0;
   53469             : }
   53470             : 
   53471             : static PyGetSetDef py_netr_DsrGetDcSiteCoverageW_getsetters[] = {
   53472             :         {
   53473             :                 .name = discard_const_p(char, "in_server_name"),
   53474             :                 .get = py_netr_DsrGetDcSiteCoverageW_in_get_server_name,
   53475             :                 .set = py_netr_DsrGetDcSiteCoverageW_in_set_server_name,
   53476             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   53477             :         },
   53478             :         {
   53479             :                 .name = discard_const_p(char, "out_ctr"),
   53480             :                 .get = py_netr_DsrGetDcSiteCoverageW_out_get_ctr,
   53481             :                 .set = py_netr_DsrGetDcSiteCoverageW_out_set_ctr,
   53482             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DcSitesCtr")
   53483             :         },
   53484             :         {
   53485             :                 .name = discard_const_p(char, "result"),
   53486             :                 .get = py_netr_DsrGetDcSiteCoverageW_get_result,
   53487             :                 .set = py_netr_DsrGetDcSiteCoverageW_set_result,
   53488             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   53489             :         },
   53490             :         { .name = NULL }
   53491             : };
   53492             : 
   53493           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   53494             : {
   53495           0 :         PyObject *self = pytalloc_new(struct netr_DsrGetDcSiteCoverageW, type);
   53496           0 :         struct netr_DsrGetDcSiteCoverageW *_self = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(self);
   53497           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   53498             :         /* a pointer to a NULL pointer */
   53499           0 :         _self->out.ctr = talloc_zero(mem_ctx, struct DcSitesCtr *);
   53500           0 :         return self;
   53501             : }
   53502             : 
   53503           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   53504             : {
   53505             : 
   53506             : 
   53507           0 :         return PyLong_FromLong(38);
   53508             : }
   53509             : 
   53510           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   53511             : {
   53512           0 :         const struct ndr_interface_call *call = NULL;
   53513           0 :         struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
   53514           0 :         PyObject *ret = NULL;
   53515           0 :         struct ndr_push *push = NULL;
   53516           0 :         DATA_BLOB blob;
   53517           0 :         enum ndr_err_code err;
   53518             : 
   53519           0 :         if (ndr_table_netlogon.num_calls < 39) {
   53520           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_pack");
   53521           0 :                 return NULL;
   53522             :         }
   53523           0 :         call = &ndr_table_netlogon.calls[38];
   53524             : 
   53525           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   53526           0 :         if (push == NULL) {
   53527           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53528           0 :                 return NULL;
   53529             :         }
   53530             : 
   53531           0 :         push->flags |= ndr_push_flags;
   53532             : 
   53533           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   53534           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53535           0 :                 TALLOC_FREE(push);
   53536           0 :                 PyErr_SetNdrError(err);
   53537           0 :                 return NULL;
   53538             :         }
   53539           0 :         blob = ndr_push_blob(push);
   53540           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   53541           0 :         TALLOC_FREE(push);
   53542           0 :         return ret;
   53543             : }
   53544             : 
   53545           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53546             : {
   53547           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53548           0 :         PyObject *bigendian_obj = NULL;
   53549           0 :         PyObject *ndr64_obj = NULL;
   53550           0 :         libndr_flags ndr_push_flags = 0;
   53551             : 
   53552           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   53553             :                 discard_const_p(char *, kwnames),
   53554             :                 &bigendian_obj,
   53555             :                 &ndr64_obj)) {
   53556           0 :                 return NULL;
   53557             :         }
   53558             : 
   53559           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53560           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53561             :         }
   53562           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53563           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53564             :         }
   53565             : 
   53566           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   53567             : }
   53568             : 
   53569           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53570             : {
   53571           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53572           0 :         PyObject *bigendian_obj = NULL;
   53573           0 :         PyObject *ndr64_obj = NULL;
   53574           0 :         libndr_flags ndr_push_flags = 0;
   53575             : 
   53576           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   53577             :                 discard_const_p(char *, kwnames),
   53578             :                 &bigendian_obj,
   53579             :                 &ndr64_obj)) {
   53580           0 :                 return NULL;
   53581             :         }
   53582             : 
   53583           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53584           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53585             :         }
   53586           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53587           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53588             :         }
   53589             : 
   53590           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   53591             : }
   53592             : 
   53593           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   53594             : {
   53595           0 :         const struct ndr_interface_call *call = NULL;
   53596           0 :         struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
   53597           0 :         struct ndr_pull *pull = NULL;
   53598           0 :         enum ndr_err_code err;
   53599             : 
   53600           0 :         if (ndr_table_netlogon.num_calls < 39) {
   53601           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_unpack");
   53602           0 :                 return NULL;
   53603             :         }
   53604           0 :         call = &ndr_table_netlogon.calls[38];
   53605             : 
   53606           0 :         pull = ndr_pull_init_blob(blob, object);
   53607           0 :         if (pull == NULL) {
   53608           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53609           0 :                 return NULL;
   53610             :         }
   53611             : 
   53612           0 :         pull->flags |= ndr_pull_flags;
   53613             : 
   53614           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   53615           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53616           0 :                 TALLOC_FREE(pull);
   53617           0 :                 PyErr_SetNdrError(err);
   53618           0 :                 return NULL;
   53619             :         }
   53620           0 :         if (!allow_remaining) {
   53621           0 :                 uint32_t highest_ofs;
   53622             : 
   53623           0 :                 if (pull->offset > pull->relative_highest_offset) {
   53624           0 :                         highest_ofs = pull->offset;
   53625             :                 } else {
   53626           0 :                         highest_ofs = pull->relative_highest_offset;
   53627             :                 }
   53628           0 :                 if (highest_ofs < pull->data_size) {
   53629           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   53630             :                                 "not all bytes consumed ofs[%u] size[%u]",
   53631             :                                 highest_ofs, pull->data_size);
   53632           0 :                         TALLOC_FREE(pull);
   53633           0 :                         PyErr_SetNdrError(err);
   53634           0 :                         return NULL;
   53635             :                 }
   53636             :         }
   53637             : 
   53638           0 :         TALLOC_FREE(pull);
   53639           0 :         Py_RETURN_NONE;
   53640             : }
   53641             : 
   53642           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53643             : {
   53644           0 :         DATA_BLOB blob;
   53645           0 :         Py_ssize_t blob_length = 0;
   53646           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53647           0 :         PyObject *bigendian_obj = NULL;
   53648           0 :         PyObject *ndr64_obj = NULL;
   53649           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53650           0 :         PyObject *allow_remaining_obj = NULL;
   53651           0 :         bool allow_remaining = false;
   53652             : 
   53653           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   53654             :                 discard_const_p(char *, kwnames),
   53655             :                 &blob.data, &blob_length,
   53656             :                 &bigendian_obj,
   53657             :                 &ndr64_obj,
   53658             :                 &allow_remaining_obj)) {
   53659           0 :                 return NULL;
   53660             :         }
   53661           0 :         blob.length = blob_length;
   53662             : 
   53663           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53664           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53665             :         }
   53666           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53667           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53668             :         }
   53669             : 
   53670           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53671           0 :                 allow_remaining = true;
   53672             :         }
   53673             : 
   53674           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   53675             : }
   53676             : 
   53677           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53678             : {
   53679           0 :         DATA_BLOB blob;
   53680           0 :         Py_ssize_t blob_length = 0;
   53681           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53682           0 :         PyObject *bigendian_obj = NULL;
   53683           0 :         PyObject *ndr64_obj = NULL;
   53684           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53685           0 :         PyObject *allow_remaining_obj = NULL;
   53686           0 :         bool allow_remaining = false;
   53687             : 
   53688           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   53689             :                 discard_const_p(char *, kwnames),
   53690             :                 &blob.data, &blob_length,
   53691             :                 &bigendian_obj,
   53692             :                 &ndr64_obj,
   53693             :                 &allow_remaining_obj)) {
   53694           0 :                 return NULL;
   53695             :         }
   53696           0 :         blob.length = blob_length;
   53697             : 
   53698           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53699           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53700             :         }
   53701           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53702           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53703             :         }
   53704             : 
   53705           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53706           0 :                 allow_remaining = true;
   53707             :         }
   53708             : 
   53709           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53710             : }
   53711             : 
   53712           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   53713             : {
   53714           0 :         const struct ndr_interface_call *call = NULL;
   53715           0 :         struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
   53716           0 :         PyObject *ret;
   53717           0 :         char *retstr;
   53718             : 
   53719           0 :         if (ndr_table_netlogon.num_calls < 39) {
   53720           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_print");
   53721           0 :                 return NULL;
   53722             :         }
   53723           0 :         call = &ndr_table_netlogon.calls[38];
   53724             : 
   53725           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53726           0 :         ret = PyUnicode_FromString(retstr);
   53727           0 :         TALLOC_FREE(retstr);
   53728             : 
   53729           0 :         return ret;
   53730             : }
   53731             : 
   53732           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53733             : {
   53734           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_print(py_obj, "netr_DsrGetDcSiteCoverageW_in", NDR_IN);
   53735             : }
   53736             : 
   53737           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53738             : {
   53739           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_print(py_obj, "netr_DsrGetDcSiteCoverageW_out", NDR_OUT);
   53740             : }
   53741             : 
   53742             : static PyMethodDef py_netr_DsrGetDcSiteCoverageW_methods[] = {
   53743             :         { "opnum", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_opnum, METH_NOARGS|METH_CLASS,
   53744             :                 "netlogon.netr_DsrGetDcSiteCoverageW.opnum() -> 38 (0x26) " },
   53745             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53746             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53747             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53748             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53749             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53750             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53751             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53752             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53753             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53754             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53755             :         { NULL, NULL, 0, NULL }
   53756             : };
   53757             : 
   53758             : 
   53759             : static PyTypeObject netr_DsrGetDcSiteCoverageW_Type = {
   53760             :         PyVarObject_HEAD_INIT(NULL, 0)
   53761             :         .tp_name = "netlogon.netr_DsrGetDcSiteCoverageW",
   53762             :         .tp_getset = py_netr_DsrGetDcSiteCoverageW_getsetters,
   53763             :         .tp_methods = py_netr_DsrGetDcSiteCoverageW_methods,
   53764             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53765             :         .tp_new = py_netr_DsrGetDcSiteCoverageW_new,
   53766             : };
   53767             : 
   53768           0 : static bool pack_py_netr_DsrGetDcSiteCoverageW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrGetDcSiteCoverageW *r)
   53769             : {
   53770           0 :         PyObject *py_server_name;
   53771           0 :         const char *kwnames[] = {
   53772             :                 "server_name", NULL
   53773             :         };
   53774             : 
   53775           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_DsrGetDcSiteCoverageW", discard_const_p(char *, kwnames), &py_server_name)) {
   53776           0 :                 return false;
   53777             :         }
   53778             : 
   53779           0 :         if (py_server_name == NULL) {
   53780           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   53781           0 :                 return false;
   53782             :         }
   53783           0 :         if (py_server_name == Py_None) {
   53784           0 :                 r->in.server_name = NULL;
   53785             :         } else {
   53786           0 :                 r->in.server_name = NULL;
   53787             :                 {
   53788           0 :                         const char *test_str;
   53789           0 :                         const char *talloc_str;
   53790           0 :                         PyObject *unicode = NULL;
   53791           0 :                         if (PyUnicode_Check(py_server_name)) {
   53792           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   53793           0 :                                 if (unicode == NULL) {
   53794           0 :                                         return false;
   53795             :                                 }
   53796           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53797           0 :                         } else if (PyBytes_Check(py_server_name)) {
   53798           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   53799             :                         } else {
   53800           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   53801           0 :                                 return false;
   53802             :                         }
   53803           0 :                         talloc_str = talloc_strdup(r, test_str);
   53804           0 :                         if (unicode != NULL) {
   53805           0 :                                 Py_DECREF(unicode);
   53806             :                         }
   53807           0 :                         if (talloc_str == NULL) {
   53808           0 :                                 PyErr_NoMemory();
   53809           0 :                                 return false;
   53810             :                         }
   53811           0 :                         r->in.server_name = talloc_str;
   53812             :                 }
   53813             :         }
   53814           0 :         return true;
   53815             : }
   53816             : 
   53817           0 : static PyObject *unpack_py_netr_DsrGetDcSiteCoverageW_args_out(struct netr_DsrGetDcSiteCoverageW *r)
   53818             : {
   53819           0 :         PyObject *result;
   53820           0 :         PyObject *py_ctr;
   53821           0 :         if (*r->out.ctr == NULL) {
   53822           0 :                 py_ctr = Py_None;
   53823           0 :                 Py_INCREF(py_ctr);
   53824             :         } else {
   53825           0 :                 py_ctr = pytalloc_reference_ex(&DcSitesCtr_Type, *r->out.ctr, *r->out.ctr);
   53826             :         }
   53827           0 :         result = py_ctr;
   53828           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   53829           0 :                 PyErr_SetWERROR(r->out.result);
   53830           0 :                 return NULL;
   53831             :         }
   53832             : 
   53833           0 :         return result;
   53834             : }
   53835             : 
   53836             : 
   53837           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_server_name(PyObject *obj, void *closure)
   53838             : {
   53839           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   53840           0 :         PyObject *py_server_name;
   53841           0 :         if (object->in.server_name == NULL) {
   53842           0 :                 Py_RETURN_NONE;
   53843             :         }
   53844           0 :         if (object->in.server_name == NULL) {
   53845           0 :                 py_server_name = Py_None;
   53846           0 :                 Py_INCREF(py_server_name);
   53847             :         } else {
   53848           0 :                 if (object->in.server_name == NULL) {
   53849           0 :                         py_server_name = Py_None;
   53850           0 :                         Py_INCREF(py_server_name);
   53851             :                 } else {
   53852           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   53853             :                 }
   53854             :         }
   53855           0 :         return py_server_name;
   53856             : }
   53857             : 
   53858           0 : static int py_netr_LogonSamLogonEx_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   53859             : {
   53860           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   53861           0 :         if (value == NULL) {
   53862           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   53863           0 :                 return -1;
   53864             :         }
   53865           0 :         if (value == Py_None) {
   53866           0 :                 object->in.server_name = NULL;
   53867             :         } else {
   53868           0 :                 object->in.server_name = NULL;
   53869             :                 {
   53870           0 :                         const char *test_str;
   53871           0 :                         const char *talloc_str;
   53872           0 :                         PyObject *unicode = NULL;
   53873           0 :                         if (PyUnicode_Check(value)) {
   53874           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53875           0 :                                 if (unicode == NULL) {
   53876           0 :                                         return -1;
   53877             :                                 }
   53878           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53879           0 :                         } else if (PyBytes_Check(value)) {
   53880           0 :                                 test_str = PyBytes_AS_STRING(value);
   53881             :                         } else {
   53882           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53883           0 :                                 return -1;
   53884             :                         }
   53885           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53886           0 :                         if (unicode != NULL) {
   53887           0 :                                 Py_DECREF(unicode);
   53888             :                         }
   53889           0 :                         if (talloc_str == NULL) {
   53890           0 :                                 PyErr_NoMemory();
   53891           0 :                                 return -1;
   53892             :                         }
   53893           0 :                         object->in.server_name = talloc_str;
   53894             :                 }
   53895             :         }
   53896           0 :         return 0;
   53897             : }
   53898             : 
   53899           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_computer_name(PyObject *obj, void *closure)
   53900             : {
   53901           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   53902           0 :         PyObject *py_computer_name;
   53903           0 :         if (object->in.computer_name == NULL) {
   53904           0 :                 Py_RETURN_NONE;
   53905             :         }
   53906           0 :         if (object->in.computer_name == NULL) {
   53907           0 :                 py_computer_name = Py_None;
   53908           0 :                 Py_INCREF(py_computer_name);
   53909             :         } else {
   53910           0 :                 if (object->in.computer_name == NULL) {
   53911           0 :                         py_computer_name = Py_None;
   53912           0 :                         Py_INCREF(py_computer_name);
   53913             :                 } else {
   53914           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   53915             :                 }
   53916             :         }
   53917           0 :         return py_computer_name;
   53918             : }
   53919             : 
   53920           0 : static int py_netr_LogonSamLogonEx_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   53921             : {
   53922           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   53923           0 :         if (value == NULL) {
   53924           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   53925           0 :                 return -1;
   53926             :         }
   53927           0 :         if (value == Py_None) {
   53928           0 :                 object->in.computer_name = NULL;
   53929             :         } else {
   53930           0 :                 object->in.computer_name = NULL;
   53931             :                 {
   53932           0 :                         const char *test_str;
   53933           0 :                         const char *talloc_str;
   53934           0 :                         PyObject *unicode = NULL;
   53935           0 :                         if (PyUnicode_Check(value)) {
   53936           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53937           0 :                                 if (unicode == NULL) {
   53938           0 :                                         return -1;
   53939             :                                 }
   53940           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53941           0 :                         } else if (PyBytes_Check(value)) {
   53942           0 :                                 test_str = PyBytes_AS_STRING(value);
   53943             :                         } else {
   53944           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53945           0 :                                 return -1;
   53946             :                         }
   53947           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53948           0 :                         if (unicode != NULL) {
   53949           0 :                                 Py_DECREF(unicode);
   53950             :                         }
   53951           0 :                         if (talloc_str == NULL) {
   53952           0 :                                 PyErr_NoMemory();
   53953           0 :                                 return -1;
   53954             :                         }
   53955           0 :                         object->in.computer_name = talloc_str;
   53956             :                 }
   53957             :         }
   53958           0 :         return 0;
   53959             : }
   53960             : 
   53961           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_logon_level(PyObject *obj, void *closure)
   53962             : {
   53963           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   53964           0 :         PyObject *py_logon_level;
   53965           0 :         py_logon_level = PyLong_FromLong((uint16_t)(object->in.logon_level));
   53966           0 :         return py_logon_level;
   53967             : }
   53968             : 
   53969           0 : static int py_netr_LogonSamLogonEx_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   53970             : {
   53971           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   53972           0 :         if (value == NULL) {
   53973           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_level");
   53974           0 :                 return -1;
   53975             :         }
   53976             :         {
   53977           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   53978           0 :                 if (PyLong_Check(value)) {
   53979           0 :                         unsigned long long test_var;
   53980           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   53981           0 :                         if (PyErr_Occurred() != NULL) {
   53982           0 :                                 return -1;
   53983             :                         }
   53984           0 :                         if (test_var > uint_max) {
   53985           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53986             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53987           0 :                                 return -1;
   53988             :                         }
   53989           0 :                         object->in.logon_level = test_var;
   53990             :                 } else {
   53991           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53992             :                           PyLong_Type.tp_name);
   53993           0 :                         return -1;
   53994             :                 }
   53995             :         }
   53996           0 :         return 0;
   53997             : }
   53998             : 
   53999           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_logon(PyObject *obj, void *closure)
   54000             : {
   54001           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   54002           0 :         PyObject *py_logon;
   54003           0 :         if (object->in.logon == NULL) {
   54004           0 :                 Py_RETURN_NONE;
   54005             :         }
   54006           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
   54007           0 :         if (py_logon == NULL) {
   54008           0 :                 return NULL;
   54009             :         }
   54010           0 :         return py_logon;
   54011             : }
   54012             : 
   54013           0 : static int py_netr_LogonSamLogonEx_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   54014             : {
   54015           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54016           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
   54017           0 :         if (value == NULL) {
   54018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon");
   54019           0 :                 return -1;
   54020             :         }
   54021           0 :         object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
   54022           0 :         if (object->in.logon == NULL) {
   54023           0 :                 PyErr_NoMemory();
   54024           0 :                 return -1;
   54025             :         }
   54026             :         {
   54027           0 :                 union netr_LogonLevel *logon_switch_1;
   54028           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");
   54029           0 :                 if (logon_switch_1 == NULL) {
   54030           0 :                         return -1;
   54031             :                 }
   54032           0 :                 object->in.logon = logon_switch_1;
   54033             :         }
   54034           0 :         return 0;
   54035             : }
   54036             : 
   54037           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_validation_level(PyObject *obj, void *closure)
   54038             : {
   54039           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   54040           0 :         PyObject *py_validation_level;
   54041           0 :         py_validation_level = PyLong_FromLong((uint16_t)(object->in.validation_level));
   54042           0 :         return py_validation_level;
   54043             : }
   54044             : 
   54045           0 : static int py_netr_LogonSamLogonEx_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   54046             : {
   54047           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54048           0 :         if (value == NULL) {
   54049           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.validation_level");
   54050           0 :                 return -1;
   54051             :         }
   54052             :         {
   54053           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   54054           0 :                 if (PyLong_Check(value)) {
   54055           0 :                         unsigned long long test_var;
   54056           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54057           0 :                         if (PyErr_Occurred() != NULL) {
   54058           0 :                                 return -1;
   54059             :                         }
   54060           0 :                         if (test_var > uint_max) {
   54061           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54062             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54063           0 :                                 return -1;
   54064             :                         }
   54065           0 :                         object->in.validation_level = test_var;
   54066             :                 } else {
   54067           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54068             :                           PyLong_Type.tp_name);
   54069           0 :                         return -1;
   54070             :                 }
   54071             :         }
   54072           0 :         return 0;
   54073             : }
   54074             : 
   54075           0 : static PyObject *py_netr_LogonSamLogonEx_out_get_validation(PyObject *obj, void *closure)
   54076             : {
   54077           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   54078           0 :         PyObject *py_validation;
   54079           0 :         if (object->out.validation == NULL) {
   54080           0 :                 Py_RETURN_NONE;
   54081             :         }
   54082           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
   54083           0 :         if (py_validation == NULL) {
   54084           0 :                 return NULL;
   54085             :         }
   54086           0 :         return py_validation;
   54087             : }
   54088             : 
   54089           0 : static int py_netr_LogonSamLogonEx_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   54090             : {
   54091           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54092           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   54093           0 :         if (value == NULL) {
   54094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.validation");
   54095           0 :                 return -1;
   54096             :         }
   54097           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   54098           0 :         if (object->out.validation == NULL) {
   54099           0 :                 PyErr_NoMemory();
   54100           0 :                 return -1;
   54101             :         }
   54102             :         {
   54103           0 :                 union netr_Validation *validation_switch_1;
   54104           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");
   54105           0 :                 if (validation_switch_1 == NULL) {
   54106           0 :                         return -1;
   54107             :                 }
   54108           0 :                 object->out.validation = validation_switch_1;
   54109             :         }
   54110           0 :         return 0;
   54111             : }
   54112             : 
   54113           0 : static PyObject *py_netr_LogonSamLogonEx_out_get_authoritative(PyObject *obj, void *closure)
   54114             : {
   54115           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   54116           0 :         PyObject *py_authoritative;
   54117           0 :         if (object->out.authoritative == NULL) {
   54118           0 :                 Py_RETURN_NONE;
   54119             :         }
   54120           0 :         py_authoritative = PyLong_FromLong((uint16_t)(*object->out.authoritative));
   54121           0 :         return py_authoritative;
   54122             : }
   54123             : 
   54124           0 : static int py_netr_LogonSamLogonEx_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   54125             : {
   54126           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54127           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   54128           0 :         if (value == NULL) {
   54129           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.authoritative");
   54130           0 :                 return -1;
   54131             :         }
   54132           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   54133           0 :         if (object->out.authoritative == NULL) {
   54134           0 :                 PyErr_NoMemory();
   54135           0 :                 return -1;
   54136             :         }
   54137             :         {
   54138           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   54139           0 :                 if (PyLong_Check(value)) {
   54140           0 :                         unsigned long long test_var;
   54141           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54142           0 :                         if (PyErr_Occurred() != NULL) {
   54143           0 :                                 return -1;
   54144             :                         }
   54145           0 :                         if (test_var > uint_max) {
   54146           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54147             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54148           0 :                                 return -1;
   54149             :                         }
   54150           0 :                         *object->out.authoritative = test_var;
   54151             :                 } else {
   54152           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54153             :                           PyLong_Type.tp_name);
   54154           0 :                         return -1;
   54155             :                 }
   54156             :         }
   54157           0 :         return 0;
   54158             : }
   54159             : 
   54160           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_flags(PyObject *obj, void *closure)
   54161             : {
   54162           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   54163           0 :         PyObject *py_flags;
   54164           0 :         if (object->in.flags == NULL) {
   54165           0 :                 Py_RETURN_NONE;
   54166             :         }
   54167           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.flags));
   54168           0 :         return py_flags;
   54169             : }
   54170             : 
   54171           0 : static int py_netr_LogonSamLogonEx_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   54172             : {
   54173           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54174           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.flags));
   54175           0 :         if (value == NULL) {
   54176           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
   54177           0 :                 return -1;
   54178             :         }
   54179           0 :         object->in.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.flags);
   54180           0 :         if (object->in.flags == NULL) {
   54181           0 :                 PyErr_NoMemory();
   54182           0 :                 return -1;
   54183             :         }
   54184             :         {
   54185           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.flags));
   54186           0 :                 if (PyLong_Check(value)) {
   54187           0 :                         unsigned long long test_var;
   54188           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54189           0 :                         if (PyErr_Occurred() != NULL) {
   54190           0 :                                 return -1;
   54191             :                         }
   54192           0 :                         if (test_var > uint_max) {
   54193           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54194             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54195           0 :                                 return -1;
   54196             :                         }
   54197           0 :                         *object->in.flags = test_var;
   54198             :                 } else {
   54199           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54200             :                           PyLong_Type.tp_name);
   54201           0 :                         return -1;
   54202             :                 }
   54203             :         }
   54204           0 :         return 0;
   54205             : }
   54206             : 
   54207           0 : static PyObject *py_netr_LogonSamLogonEx_out_get_flags(PyObject *obj, void *closure)
   54208             : {
   54209           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   54210           0 :         PyObject *py_flags;
   54211           0 :         if (object->out.flags == NULL) {
   54212           0 :                 Py_RETURN_NONE;
   54213             :         }
   54214           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.flags));
   54215           0 :         return py_flags;
   54216             : }
   54217             : 
   54218           0 : static int py_netr_LogonSamLogonEx_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   54219             : {
   54220           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54221           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
   54222           0 :         if (value == NULL) {
   54223           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.flags");
   54224           0 :                 return -1;
   54225             :         }
   54226           0 :         object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
   54227           0 :         if (object->out.flags == NULL) {
   54228           0 :                 PyErr_NoMemory();
   54229           0 :                 return -1;
   54230             :         }
   54231             :         {
   54232           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
   54233           0 :                 if (PyLong_Check(value)) {
   54234           0 :                         unsigned long long test_var;
   54235           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54236           0 :                         if (PyErr_Occurred() != NULL) {
   54237           0 :                                 return -1;
   54238             :                         }
   54239           0 :                         if (test_var > uint_max) {
   54240           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54241             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54242           0 :                                 return -1;
   54243             :                         }
   54244           0 :                         *object->out.flags = test_var;
   54245             :                 } else {
   54246           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54247             :                           PyLong_Type.tp_name);
   54248           0 :                         return -1;
   54249             :                 }
   54250             :         }
   54251           0 :         return 0;
   54252             : }
   54253             : 
   54254           0 : static PyObject *py_netr_LogonSamLogonEx_get_result(PyObject *obj, void *closure)
   54255             : {
   54256           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
   54257           0 :         PyObject *py_result;
   54258           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   54259           0 :         return py_result;
   54260             : }
   54261             : 
   54262           0 : static int py_netr_LogonSamLogonEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   54263             : {
   54264           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54265           0 :         if (value == NULL) {
   54266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   54267           0 :                 return -1;
   54268             :         }
   54269           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   54270           0 :         return 0;
   54271             : }
   54272             : 
   54273             : static PyGetSetDef py_netr_LogonSamLogonEx_getsetters[] = {
   54274             :         {
   54275             :                 .name = discard_const_p(char, "in_server_name"),
   54276             :                 .get = py_netr_LogonSamLogonEx_in_get_server_name,
   54277             :                 .set = py_netr_LogonSamLogonEx_in_set_server_name,
   54278             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54279             :         },
   54280             :         {
   54281             :                 .name = discard_const_p(char, "in_computer_name"),
   54282             :                 .get = py_netr_LogonSamLogonEx_in_get_computer_name,
   54283             :                 .set = py_netr_LogonSamLogonEx_in_set_computer_name,
   54284             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54285             :         },
   54286             :         {
   54287             :                 .name = discard_const_p(char, "in_logon_level"),
   54288             :                 .get = py_netr_LogonSamLogonEx_in_get_logon_level,
   54289             :                 .set = py_netr_LogonSamLogonEx_in_set_logon_level,
   54290             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   54291             :         },
   54292             :         {
   54293             :                 .name = discard_const_p(char, "in_logon"),
   54294             :                 .get = py_netr_LogonSamLogonEx_in_get_logon,
   54295             :                 .set = py_netr_LogonSamLogonEx_in_set_logon,
   54296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   54297             :         },
   54298             :         {
   54299             :                 .name = discard_const_p(char, "in_validation_level"),
   54300             :                 .get = py_netr_LogonSamLogonEx_in_get_validation_level,
   54301             :                 .set = py_netr_LogonSamLogonEx_in_set_validation_level,
   54302             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54303             :         },
   54304             :         {
   54305             :                 .name = discard_const_p(char, "out_validation"),
   54306             :                 .get = py_netr_LogonSamLogonEx_out_get_validation,
   54307             :                 .set = py_netr_LogonSamLogonEx_out_set_validation,
   54308             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   54309             :         },
   54310             :         {
   54311             :                 .name = discard_const_p(char, "out_authoritative"),
   54312             :                 .get = py_netr_LogonSamLogonEx_out_get_authoritative,
   54313             :                 .set = py_netr_LogonSamLogonEx_out_set_authoritative,
   54314             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   54315             :         },
   54316             :         {
   54317             :                 .name = discard_const_p(char, "in_flags"),
   54318             :                 .get = py_netr_LogonSamLogonEx_in_get_flags,
   54319             :                 .set = py_netr_LogonSamLogonEx_in_set_flags,
   54320             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   54321             :         },
   54322             :         {
   54323             :                 .name = discard_const_p(char, "out_flags"),
   54324             :                 .get = py_netr_LogonSamLogonEx_out_get_flags,
   54325             :                 .set = py_netr_LogonSamLogonEx_out_set_flags,
   54326             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   54327             :         },
   54328             :         {
   54329             :                 .name = discard_const_p(char, "result"),
   54330             :                 .get = py_netr_LogonSamLogonEx_get_result,
   54331             :                 .set = py_netr_LogonSamLogonEx_set_result,
   54332             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   54333             :         },
   54334             :         { .name = NULL }
   54335             : };
   54336             : 
   54337           0 : static PyObject *py_netr_LogonSamLogonEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   54338             : {
   54339           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogonEx, type);
   54340           0 :         struct netr_LogonSamLogonEx *_self = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(self);
   54341           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   54342           0 :         _self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
   54343           0 :         _self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
   54344           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   54345           0 :         _self->in.flags = talloc_zero(mem_ctx, uint32_t);
   54346           0 :         _self->out.flags = talloc_zero(mem_ctx, uint32_t);
   54347           0 :         return self;
   54348             : }
   54349             : 
   54350           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   54351             : {
   54352             : 
   54353             : 
   54354           0 :         return PyLong_FromLong(39);
   54355             : }
   54356             : 
   54357           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   54358             : {
   54359           0 :         const struct ndr_interface_call *call = NULL;
   54360           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54361           0 :         PyObject *ret = NULL;
   54362           0 :         struct ndr_push *push = NULL;
   54363           0 :         DATA_BLOB blob;
   54364           0 :         enum ndr_err_code err;
   54365             : 
   54366           0 :         if (ndr_table_netlogon.num_calls < 40) {
   54367           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_pack");
   54368           0 :                 return NULL;
   54369             :         }
   54370           0 :         call = &ndr_table_netlogon.calls[39];
   54371             : 
   54372           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   54373           0 :         if (push == NULL) {
   54374           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54375           0 :                 return NULL;
   54376             :         }
   54377             : 
   54378           0 :         push->flags |= ndr_push_flags;
   54379             : 
   54380           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   54381           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54382           0 :                 TALLOC_FREE(push);
   54383           0 :                 PyErr_SetNdrError(err);
   54384           0 :                 return NULL;
   54385             :         }
   54386           0 :         blob = ndr_push_blob(push);
   54387           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   54388           0 :         TALLOC_FREE(push);
   54389           0 :         return ret;
   54390             : }
   54391             : 
   54392           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54393             : {
   54394           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54395           0 :         PyObject *bigendian_obj = NULL;
   54396           0 :         PyObject *ndr64_obj = NULL;
   54397           0 :         libndr_flags ndr_push_flags = 0;
   54398             : 
   54399           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   54400             :                 discard_const_p(char *, kwnames),
   54401             :                 &bigendian_obj,
   54402             :                 &ndr64_obj)) {
   54403           0 :                 return NULL;
   54404             :         }
   54405             : 
   54406           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54407           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54408             :         }
   54409           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54410           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54411             :         }
   54412             : 
   54413           0 :         return py_netr_LogonSamLogonEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   54414             : }
   54415             : 
   54416           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54417             : {
   54418           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54419           0 :         PyObject *bigendian_obj = NULL;
   54420           0 :         PyObject *ndr64_obj = NULL;
   54421           0 :         libndr_flags ndr_push_flags = 0;
   54422             : 
   54423           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   54424             :                 discard_const_p(char *, kwnames),
   54425             :                 &bigendian_obj,
   54426             :                 &ndr64_obj)) {
   54427           0 :                 return NULL;
   54428             :         }
   54429             : 
   54430           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54431           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54432             :         }
   54433           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54434           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54435             :         }
   54436             : 
   54437           0 :         return py_netr_LogonSamLogonEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   54438             : }
   54439             : 
   54440           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   54441             : {
   54442           0 :         const struct ndr_interface_call *call = NULL;
   54443           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54444           0 :         struct ndr_pull *pull = NULL;
   54445           0 :         enum ndr_err_code err;
   54446             : 
   54447           0 :         if (ndr_table_netlogon.num_calls < 40) {
   54448           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_unpack");
   54449           0 :                 return NULL;
   54450             :         }
   54451           0 :         call = &ndr_table_netlogon.calls[39];
   54452             : 
   54453           0 :         pull = ndr_pull_init_blob(blob, object);
   54454           0 :         if (pull == NULL) {
   54455           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54456           0 :                 return NULL;
   54457             :         }
   54458             : 
   54459           0 :         pull->flags |= ndr_pull_flags;
   54460             : 
   54461           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   54462           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54463           0 :                 TALLOC_FREE(pull);
   54464           0 :                 PyErr_SetNdrError(err);
   54465           0 :                 return NULL;
   54466             :         }
   54467           0 :         if (!allow_remaining) {
   54468           0 :                 uint32_t highest_ofs;
   54469             : 
   54470           0 :                 if (pull->offset > pull->relative_highest_offset) {
   54471           0 :                         highest_ofs = pull->offset;
   54472             :                 } else {
   54473           0 :                         highest_ofs = pull->relative_highest_offset;
   54474             :                 }
   54475           0 :                 if (highest_ofs < pull->data_size) {
   54476           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   54477             :                                 "not all bytes consumed ofs[%u] size[%u]",
   54478             :                                 highest_ofs, pull->data_size);
   54479           0 :                         TALLOC_FREE(pull);
   54480           0 :                         PyErr_SetNdrError(err);
   54481           0 :                         return NULL;
   54482             :                 }
   54483             :         }
   54484             : 
   54485           0 :         TALLOC_FREE(pull);
   54486           0 :         Py_RETURN_NONE;
   54487             : }
   54488             : 
   54489           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54490             : {
   54491           0 :         DATA_BLOB blob;
   54492           0 :         Py_ssize_t blob_length = 0;
   54493           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54494           0 :         PyObject *bigendian_obj = NULL;
   54495           0 :         PyObject *ndr64_obj = NULL;
   54496           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54497           0 :         PyObject *allow_remaining_obj = NULL;
   54498           0 :         bool allow_remaining = false;
   54499             : 
   54500           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   54501             :                 discard_const_p(char *, kwnames),
   54502             :                 &blob.data, &blob_length,
   54503             :                 &bigendian_obj,
   54504             :                 &ndr64_obj,
   54505             :                 &allow_remaining_obj)) {
   54506           0 :                 return NULL;
   54507             :         }
   54508           0 :         blob.length = blob_length;
   54509             : 
   54510           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54511           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54512             :         }
   54513           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54514           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54515             :         }
   54516             : 
   54517           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54518           0 :                 allow_remaining = true;
   54519             :         }
   54520             : 
   54521           0 :         return py_netr_LogonSamLogonEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   54522             : }
   54523             : 
   54524           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54525             : {
   54526           0 :         DATA_BLOB blob;
   54527           0 :         Py_ssize_t blob_length = 0;
   54528           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54529           0 :         PyObject *bigendian_obj = NULL;
   54530           0 :         PyObject *ndr64_obj = NULL;
   54531           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54532           0 :         PyObject *allow_remaining_obj = NULL;
   54533           0 :         bool allow_remaining = false;
   54534             : 
   54535           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   54536             :                 discard_const_p(char *, kwnames),
   54537             :                 &blob.data, &blob_length,
   54538             :                 &bigendian_obj,
   54539             :                 &ndr64_obj,
   54540             :                 &allow_remaining_obj)) {
   54541           0 :                 return NULL;
   54542             :         }
   54543           0 :         blob.length = blob_length;
   54544             : 
   54545           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54546           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54547             :         }
   54548           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54549           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54550             :         }
   54551             : 
   54552           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54553           0 :                 allow_remaining = true;
   54554             :         }
   54555             : 
   54556           0 :         return py_netr_LogonSamLogonEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   54557             : }
   54558             : 
   54559           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   54560             : {
   54561           0 :         const struct ndr_interface_call *call = NULL;
   54562           0 :         struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
   54563           0 :         PyObject *ret;
   54564           0 :         char *retstr;
   54565             : 
   54566           0 :         if (ndr_table_netlogon.num_calls < 40) {
   54567           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_print");
   54568           0 :                 return NULL;
   54569             :         }
   54570           0 :         call = &ndr_table_netlogon.calls[39];
   54571             : 
   54572           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   54573           0 :         ret = PyUnicode_FromString(retstr);
   54574           0 :         TALLOC_FREE(retstr);
   54575             : 
   54576           0 :         return ret;
   54577             : }
   54578             : 
   54579           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54580             : {
   54581           0 :         return py_netr_LogonSamLogonEx_ndr_print(py_obj, "netr_LogonSamLogonEx_in", NDR_IN);
   54582             : }
   54583             : 
   54584           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54585             : {
   54586           0 :         return py_netr_LogonSamLogonEx_ndr_print(py_obj, "netr_LogonSamLogonEx_out", NDR_OUT);
   54587             : }
   54588             : 
   54589             : static PyMethodDef py_netr_LogonSamLogonEx_methods[] = {
   54590             :         { "opnum", (PyCFunction)py_netr_LogonSamLogonEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   54591             :                 "netlogon.netr_LogonSamLogonEx.opnum() -> 39 (0x27) " },
   54592             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   54593             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   54594             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   54595             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   54596             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   54597             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   54598             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   54599             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   54600             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogonEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   54601             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogonEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   54602             :         { NULL, NULL, 0, NULL }
   54603             : };
   54604             : 
   54605             : 
   54606             : static PyTypeObject netr_LogonSamLogonEx_Type = {
   54607             :         PyVarObject_HEAD_INIT(NULL, 0)
   54608             :         .tp_name = "netlogon.netr_LogonSamLogonEx",
   54609             :         .tp_getset = py_netr_LogonSamLogonEx_getsetters,
   54610             :         .tp_methods = py_netr_LogonSamLogonEx_methods,
   54611             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   54612             :         .tp_new = py_netr_LogonSamLogonEx_new,
   54613             : };
   54614             : 
   54615         195 : static bool pack_py_netr_LogonSamLogonEx_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogonEx *r)
   54616             : {
   54617           0 :         PyObject *py_server_name;
   54618           0 :         PyObject *py_computer_name;
   54619           0 :         PyObject *py_logon_level;
   54620           0 :         PyObject *py_logon;
   54621           0 :         PyObject *py_validation_level;
   54622           0 :         PyObject *py_flags;
   54623         195 :         const char *kwnames[] = {
   54624             :                 "server_name", "computer_name", "logon_level", "logon", "validation_level", "flags", NULL
   54625             :         };
   54626             : 
   54627         195 :         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)) {
   54628           0 :                 return false;
   54629             :         }
   54630             : 
   54631         195 :         if (py_server_name == NULL) {
   54632           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   54633           0 :                 return false;
   54634             :         }
   54635         195 :         if (py_server_name == Py_None) {
   54636           0 :                 r->in.server_name = NULL;
   54637             :         } else {
   54638         195 :                 r->in.server_name = NULL;
   54639             :                 {
   54640           0 :                         const char *test_str;
   54641           0 :                         const char *talloc_str;
   54642         195 :                         PyObject *unicode = NULL;
   54643         195 :                         if (PyUnicode_Check(py_server_name)) {
   54644         195 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   54645         195 :                                 if (unicode == NULL) {
   54646           0 :                                         return false;
   54647             :                                 }
   54648         195 :                                 test_str = PyBytes_AS_STRING(unicode);
   54649           0 :                         } else if (PyBytes_Check(py_server_name)) {
   54650           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   54651             :                         } else {
   54652           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   54653           0 :                                 return false;
   54654             :                         }
   54655         195 :                         talloc_str = talloc_strdup(r, test_str);
   54656         195 :                         if (unicode != NULL) {
   54657         105 :                                 Py_DECREF(unicode);
   54658             :                         }
   54659         195 :                         if (talloc_str == NULL) {
   54660           0 :                                 PyErr_NoMemory();
   54661           0 :                                 return false;
   54662             :                         }
   54663         195 :                         r->in.server_name = talloc_str;
   54664             :                 }
   54665             :         }
   54666         195 :         if (py_computer_name == NULL) {
   54667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   54668           0 :                 return false;
   54669             :         }
   54670         195 :         if (py_computer_name == Py_None) {
   54671           0 :                 r->in.computer_name = NULL;
   54672             :         } else {
   54673         195 :                 r->in.computer_name = NULL;
   54674             :                 {
   54675           0 :                         const char *test_str;
   54676           0 :                         const char *talloc_str;
   54677         195 :                         PyObject *unicode = NULL;
   54678         195 :                         if (PyUnicode_Check(py_computer_name)) {
   54679         195 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   54680         195 :                                 if (unicode == NULL) {
   54681           0 :                                         return false;
   54682             :                                 }
   54683         195 :                                 test_str = PyBytes_AS_STRING(unicode);
   54684           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   54685           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   54686             :                         } else {
   54687           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   54688           0 :                                 return false;
   54689             :                         }
   54690         195 :                         talloc_str = talloc_strdup(r, test_str);
   54691         195 :                         if (unicode != NULL) {
   54692         105 :                                 Py_DECREF(unicode);
   54693             :                         }
   54694         195 :                         if (talloc_str == NULL) {
   54695           0 :                                 PyErr_NoMemory();
   54696           0 :                                 return false;
   54697             :                         }
   54698         195 :                         r->in.computer_name = talloc_str;
   54699             :                 }
   54700             :         }
   54701         195 :         if (py_logon_level == NULL) {
   54702           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_level");
   54703           0 :                 return false;
   54704             :         }
   54705             :         {
   54706         195 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   54707         195 :                 if (PyLong_Check(py_logon_level)) {
   54708           0 :                         unsigned long long test_var;
   54709         195 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   54710         195 :                         if (PyErr_Occurred() != NULL) {
   54711           0 :                                 return false;
   54712             :                         }
   54713         195 :                         if (test_var > uint_max) {
   54714           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54715             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54716           0 :                                 return false;
   54717             :                         }
   54718         195 :                         r->in.logon_level = test_var;
   54719             :                 } else {
   54720           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54721             :                           PyLong_Type.tp_name);
   54722           0 :                         return false;
   54723             :                 }
   54724             :         }
   54725         195 :         if (py_logon == NULL) {
   54726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon");
   54727           0 :                 return false;
   54728             :         }
   54729         195 :         r->in.logon = talloc_ptrtype(r, r->in.logon);
   54730         195 :         if (r->in.logon == NULL) {
   54731           0 :                 PyErr_NoMemory();
   54732           0 :                 return false;
   54733             :         }
   54734             :         {
   54735           0 :                 union netr_LogonLevel *logon_switch_1;
   54736         195 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   54737         195 :                 if (logon_switch_1 == NULL) {
   54738           0 :                         return false;
   54739             :                 }
   54740         195 :                 r->in.logon = logon_switch_1;
   54741             :         }
   54742         195 :         if (py_validation_level == NULL) {
   54743           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.validation_level");
   54744           0 :                 return false;
   54745             :         }
   54746             :         {
   54747         195 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   54748         195 :                 if (PyLong_Check(py_validation_level)) {
   54749           0 :                         unsigned long long test_var;
   54750         195 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   54751         195 :                         if (PyErr_Occurred() != NULL) {
   54752           0 :                                 return false;
   54753             :                         }
   54754         195 :                         if (test_var > uint_max) {
   54755           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54756             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54757           0 :                                 return false;
   54758             :                         }
   54759         195 :                         r->in.validation_level = test_var;
   54760             :                 } else {
   54761           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54762             :                           PyLong_Type.tp_name);
   54763           0 :                         return false;
   54764             :                 }
   54765             :         }
   54766         195 :         if (py_flags == NULL) {
   54767           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
   54768           0 :                 return false;
   54769             :         }
   54770         195 :         r->in.flags = talloc_ptrtype(r, r->in.flags);
   54771         195 :         if (r->in.flags == NULL) {
   54772           0 :                 PyErr_NoMemory();
   54773           0 :                 return false;
   54774             :         }
   54775             :         {
   54776         195 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.flags));
   54777         195 :                 if (PyLong_Check(py_flags)) {
   54778           0 :                         unsigned long long test_var;
   54779         195 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   54780         195 :                         if (PyErr_Occurred() != NULL) {
   54781           0 :                                 return false;
   54782             :                         }
   54783         195 :                         if (test_var > uint_max) {
   54784           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54785             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54786           0 :                                 return false;
   54787             :                         }
   54788         195 :                         *r->in.flags = test_var;
   54789             :                 } else {
   54790           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54791             :                           PyLong_Type.tp_name);
   54792           0 :                         return false;
   54793             :                 }
   54794             :         }
   54795         195 :         return true;
   54796             : }
   54797             : 
   54798         195 : static PyObject *unpack_py_netr_LogonSamLogonEx_args_out(struct netr_LogonSamLogonEx *r)
   54799             : {
   54800           0 :         PyObject *result;
   54801           0 :         PyObject *py_validation;
   54802           0 :         PyObject *py_authoritative;
   54803           0 :         PyObject *py_flags;
   54804         195 :         result = PyTuple_New(3);
   54805         195 :         py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
   54806         195 :         if (py_validation == NULL) {
   54807           0 :                 return NULL;
   54808             :         }
   54809         195 :         PyTuple_SetItem(result, 0, py_validation);
   54810         195 :         py_authoritative = PyLong_FromLong((uint16_t)(*r->out.authoritative));
   54811         195 :         PyTuple_SetItem(result, 1, py_authoritative);
   54812         195 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.flags));
   54813         195 :         PyTuple_SetItem(result, 2, py_flags);
   54814         195 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   54815          95 :                 PyErr_SetNTSTATUS(r->out.result);
   54816          95 :                 return NULL;
   54817             :         }
   54818             : 
   54819         100 :         return result;
   54820             : }
   54821             : 
   54822             : 
   54823           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_in_get_server_name(PyObject *obj, void *closure)
   54824             : {
   54825           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(obj);
   54826           0 :         PyObject *py_server_name;
   54827           0 :         if (object->in.server_name == NULL) {
   54828           0 :                 Py_RETURN_NONE;
   54829             :         }
   54830           0 :         if (object->in.server_name == NULL) {
   54831           0 :                 py_server_name = Py_None;
   54832           0 :                 Py_INCREF(py_server_name);
   54833             :         } else {
   54834           0 :                 if (object->in.server_name == NULL) {
   54835           0 :                         py_server_name = Py_None;
   54836           0 :                         Py_INCREF(py_server_name);
   54837             :                 } else {
   54838           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   54839             :                 }
   54840             :         }
   54841           0 :         return py_server_name;
   54842             : }
   54843             : 
   54844           0 : static int py_netr_DsrEnumerateDomainTrusts_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   54845             : {
   54846           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
   54847           0 :         if (value == NULL) {
   54848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   54849           0 :                 return -1;
   54850             :         }
   54851           0 :         if (value == Py_None) {
   54852           0 :                 object->in.server_name = NULL;
   54853             :         } else {
   54854           0 :                 object->in.server_name = NULL;
   54855             :                 {
   54856           0 :                         const char *test_str;
   54857           0 :                         const char *talloc_str;
   54858           0 :                         PyObject *unicode = NULL;
   54859           0 :                         if (PyUnicode_Check(value)) {
   54860           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54861           0 :                                 if (unicode == NULL) {
   54862           0 :                                         return -1;
   54863             :                                 }
   54864           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   54865           0 :                         } else if (PyBytes_Check(value)) {
   54866           0 :                                 test_str = PyBytes_AS_STRING(value);
   54867             :                         } else {
   54868           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54869           0 :                                 return -1;
   54870             :                         }
   54871           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54872           0 :                         if (unicode != NULL) {
   54873           0 :                                 Py_DECREF(unicode);
   54874             :                         }
   54875           0 :                         if (talloc_str == NULL) {
   54876           0 :                                 PyErr_NoMemory();
   54877           0 :                                 return -1;
   54878             :                         }
   54879           0 :                         object->in.server_name = talloc_str;
   54880             :                 }
   54881             :         }
   54882           0 :         return 0;
   54883             : }
   54884             : 
   54885           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_in_get_trust_flags(PyObject *obj, void *closure)
   54886             : {
   54887           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(obj);
   54888           0 :         PyObject *py_trust_flags;
   54889           0 :         py_trust_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.trust_flags));
   54890           0 :         return py_trust_flags;
   54891             : }
   54892             : 
   54893           0 : static int py_netr_DsrEnumerateDomainTrusts_in_set_trust_flags(PyObject *py_obj, PyObject *value, void *closure)
   54894             : {
   54895           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
   54896           0 :         if (value == NULL) {
   54897           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.trust_flags");
   54898           0 :                 return -1;
   54899             :         }
   54900             :         {
   54901           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.trust_flags));
   54902           0 :                 if (PyLong_Check(value)) {
   54903           0 :                         unsigned long long test_var;
   54904           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54905           0 :                         if (PyErr_Occurred() != NULL) {
   54906           0 :                                 return -1;
   54907             :                         }
   54908           0 :                         if (test_var > uint_max) {
   54909           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54910             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54911           0 :                                 return -1;
   54912             :                         }
   54913           0 :                         object->in.trust_flags = test_var;
   54914             :                 } else {
   54915           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54916             :                           PyLong_Type.tp_name);
   54917           0 :                         return -1;
   54918             :                 }
   54919             :         }
   54920           0 :         return 0;
   54921             : }
   54922             : 
   54923           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_out_get_trusts(PyObject *obj, void *closure)
   54924             : {
   54925           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(obj);
   54926           0 :         PyObject *py_trusts;
   54927           0 :         if (object->out.trusts == NULL) {
   54928           0 :                 Py_RETURN_NONE;
   54929             :         }
   54930           0 :         py_trusts = pytalloc_reference_ex(&netr_DomainTrustList_Type, object->out.trusts, object->out.trusts);
   54931           0 :         return py_trusts;
   54932             : }
   54933             : 
   54934           0 : static int py_netr_DsrEnumerateDomainTrusts_out_set_trusts(PyObject *py_obj, PyObject *value, void *closure)
   54935             : {
   54936           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
   54937           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trusts));
   54938           0 :         if (value == NULL) {
   54939           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.trusts");
   54940           0 :                 return -1;
   54941             :         }
   54942           0 :         object->out.trusts = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trusts);
   54943           0 :         if (object->out.trusts == NULL) {
   54944           0 :                 PyErr_NoMemory();
   54945           0 :                 return -1;
   54946             :         }
   54947           0 :         PY_CHECK_TYPE(&netr_DomainTrustList_Type, value, return -1;);
   54948           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   54949           0 :                 PyErr_NoMemory();
   54950           0 :                 return -1;
   54951             :         }
   54952           0 :         object->out.trusts = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
   54953           0 :         return 0;
   54954             : }
   54955             : 
   54956           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_get_result(PyObject *obj, void *closure)
   54957             : {
   54958           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(obj);
   54959           0 :         PyObject *py_result;
   54960           0 :         py_result = PyErr_FromWERROR(object->out.result);
   54961           0 :         return py_result;
   54962             : }
   54963             : 
   54964           0 : static int py_netr_DsrEnumerateDomainTrusts_set_result(PyObject *py_obj, PyObject *value, void *closure)
   54965             : {
   54966           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
   54967           0 :         if (value == NULL) {
   54968           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   54969           0 :                 return -1;
   54970             :         }
   54971           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   54972           0 :         return 0;
   54973             : }
   54974             : 
   54975             : static PyGetSetDef py_netr_DsrEnumerateDomainTrusts_getsetters[] = {
   54976             :         {
   54977             :                 .name = discard_const_p(char, "in_server_name"),
   54978             :                 .get = py_netr_DsrEnumerateDomainTrusts_in_get_server_name,
   54979             :                 .set = py_netr_DsrEnumerateDomainTrusts_in_set_server_name,
   54980             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54981             :         },
   54982             :         {
   54983             :                 .name = discard_const_p(char, "in_trust_flags"),
   54984             :                 .get = py_netr_DsrEnumerateDomainTrusts_in_get_trust_flags,
   54985             :                 .set = py_netr_DsrEnumerateDomainTrusts_in_set_trust_flags,
   54986             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
   54987             :         },
   54988             :         {
   54989             :                 .name = discard_const_p(char, "out_trusts"),
   54990             :                 .get = py_netr_DsrEnumerateDomainTrusts_out_get_trusts,
   54991             :                 .set = py_netr_DsrEnumerateDomainTrusts_out_set_trusts,
   54992             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
   54993             :         },
   54994             :         {
   54995             :                 .name = discard_const_p(char, "result"),
   54996             :                 .get = py_netr_DsrEnumerateDomainTrusts_get_result,
   54997             :                 .set = py_netr_DsrEnumerateDomainTrusts_set_result,
   54998             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   54999             :         },
   55000             :         { .name = NULL }
   55001             : };
   55002             : 
   55003           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   55004             : {
   55005           0 :         PyObject *self = pytalloc_new(struct netr_DsrEnumerateDomainTrusts, type);
   55006           0 :         struct netr_DsrEnumerateDomainTrusts *_self = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(self);
   55007           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   55008           0 :         _self->out.trusts = talloc_zero(mem_ctx, struct netr_DomainTrustList);
   55009           0 :         return self;
   55010             : }
   55011             : 
   55012           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   55013             : {
   55014             : 
   55015             : 
   55016           0 :         return PyLong_FromLong(40);
   55017             : }
   55018             : 
   55019           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   55020             : {
   55021           0 :         const struct ndr_interface_call *call = NULL;
   55022           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
   55023           0 :         PyObject *ret = NULL;
   55024           0 :         struct ndr_push *push = NULL;
   55025           0 :         DATA_BLOB blob;
   55026           0 :         enum ndr_err_code err;
   55027             : 
   55028           0 :         if (ndr_table_netlogon.num_calls < 41) {
   55029           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_pack");
   55030           0 :                 return NULL;
   55031             :         }
   55032           0 :         call = &ndr_table_netlogon.calls[40];
   55033             : 
   55034           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   55035           0 :         if (push == NULL) {
   55036           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55037           0 :                 return NULL;
   55038             :         }
   55039             : 
   55040           0 :         push->flags |= ndr_push_flags;
   55041             : 
   55042           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   55043           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55044           0 :                 TALLOC_FREE(push);
   55045           0 :                 PyErr_SetNdrError(err);
   55046           0 :                 return NULL;
   55047             :         }
   55048           0 :         blob = ndr_push_blob(push);
   55049           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   55050           0 :         TALLOC_FREE(push);
   55051           0 :         return ret;
   55052             : }
   55053             : 
   55054           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55055             : {
   55056           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55057           0 :         PyObject *bigendian_obj = NULL;
   55058           0 :         PyObject *ndr64_obj = NULL;
   55059           0 :         libndr_flags ndr_push_flags = 0;
   55060             : 
   55061           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   55062             :                 discard_const_p(char *, kwnames),
   55063             :                 &bigendian_obj,
   55064             :                 &ndr64_obj)) {
   55065           0 :                 return NULL;
   55066             :         }
   55067             : 
   55068           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55069           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55070             :         }
   55071           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55072           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55073             :         }
   55074             : 
   55075           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   55076             : }
   55077             : 
   55078           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55079             : {
   55080           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55081           0 :         PyObject *bigendian_obj = NULL;
   55082           0 :         PyObject *ndr64_obj = NULL;
   55083           0 :         libndr_flags ndr_push_flags = 0;
   55084             : 
   55085           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   55086             :                 discard_const_p(char *, kwnames),
   55087             :                 &bigendian_obj,
   55088             :                 &ndr64_obj)) {
   55089           0 :                 return NULL;
   55090             :         }
   55091             : 
   55092           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55093           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55094             :         }
   55095           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55096           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55097             :         }
   55098             : 
   55099           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   55100             : }
   55101             : 
   55102           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   55103             : {
   55104           0 :         const struct ndr_interface_call *call = NULL;
   55105           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
   55106           0 :         struct ndr_pull *pull = NULL;
   55107           0 :         enum ndr_err_code err;
   55108             : 
   55109           0 :         if (ndr_table_netlogon.num_calls < 41) {
   55110           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_unpack");
   55111           0 :                 return NULL;
   55112             :         }
   55113           0 :         call = &ndr_table_netlogon.calls[40];
   55114             : 
   55115           0 :         pull = ndr_pull_init_blob(blob, object);
   55116           0 :         if (pull == NULL) {
   55117           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55118           0 :                 return NULL;
   55119             :         }
   55120             : 
   55121           0 :         pull->flags |= ndr_pull_flags;
   55122             : 
   55123           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   55124           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55125           0 :                 TALLOC_FREE(pull);
   55126           0 :                 PyErr_SetNdrError(err);
   55127           0 :                 return NULL;
   55128             :         }
   55129           0 :         if (!allow_remaining) {
   55130           0 :                 uint32_t highest_ofs;
   55131             : 
   55132           0 :                 if (pull->offset > pull->relative_highest_offset) {
   55133           0 :                         highest_ofs = pull->offset;
   55134             :                 } else {
   55135           0 :                         highest_ofs = pull->relative_highest_offset;
   55136             :                 }
   55137           0 :                 if (highest_ofs < pull->data_size) {
   55138           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   55139             :                                 "not all bytes consumed ofs[%u] size[%u]",
   55140             :                                 highest_ofs, pull->data_size);
   55141           0 :                         TALLOC_FREE(pull);
   55142           0 :                         PyErr_SetNdrError(err);
   55143           0 :                         return NULL;
   55144             :                 }
   55145             :         }
   55146             : 
   55147           0 :         TALLOC_FREE(pull);
   55148           0 :         Py_RETURN_NONE;
   55149             : }
   55150             : 
   55151           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55152             : {
   55153           0 :         DATA_BLOB blob;
   55154           0 :         Py_ssize_t blob_length = 0;
   55155           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55156           0 :         PyObject *bigendian_obj = NULL;
   55157           0 :         PyObject *ndr64_obj = NULL;
   55158           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55159           0 :         PyObject *allow_remaining_obj = NULL;
   55160           0 :         bool allow_remaining = false;
   55161             : 
   55162           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   55163             :                 discard_const_p(char *, kwnames),
   55164             :                 &blob.data, &blob_length,
   55165             :                 &bigendian_obj,
   55166             :                 &ndr64_obj,
   55167             :                 &allow_remaining_obj)) {
   55168           0 :                 return NULL;
   55169             :         }
   55170           0 :         blob.length = blob_length;
   55171             : 
   55172           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55173           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55174             :         }
   55175           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55176           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55177             :         }
   55178             : 
   55179           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55180           0 :                 allow_remaining = true;
   55181             :         }
   55182             : 
   55183           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   55184             : }
   55185             : 
   55186           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55187             : {
   55188           0 :         DATA_BLOB blob;
   55189           0 :         Py_ssize_t blob_length = 0;
   55190           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55191           0 :         PyObject *bigendian_obj = NULL;
   55192           0 :         PyObject *ndr64_obj = NULL;
   55193           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55194           0 :         PyObject *allow_remaining_obj = NULL;
   55195           0 :         bool allow_remaining = false;
   55196             : 
   55197           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   55198             :                 discard_const_p(char *, kwnames),
   55199             :                 &blob.data, &blob_length,
   55200             :                 &bigendian_obj,
   55201             :                 &ndr64_obj,
   55202             :                 &allow_remaining_obj)) {
   55203           0 :                 return NULL;
   55204             :         }
   55205           0 :         blob.length = blob_length;
   55206             : 
   55207           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55208           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55209             :         }
   55210           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55211           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55212             :         }
   55213             : 
   55214           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55215           0 :                 allow_remaining = true;
   55216             :         }
   55217             : 
   55218           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   55219             : }
   55220             : 
   55221           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   55222             : {
   55223           0 :         const struct ndr_interface_call *call = NULL;
   55224           0 :         struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
   55225           0 :         PyObject *ret;
   55226           0 :         char *retstr;
   55227             : 
   55228           0 :         if (ndr_table_netlogon.num_calls < 41) {
   55229           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_print");
   55230           0 :                 return NULL;
   55231             :         }
   55232           0 :         call = &ndr_table_netlogon.calls[40];
   55233             : 
   55234           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   55235           0 :         ret = PyUnicode_FromString(retstr);
   55236           0 :         TALLOC_FREE(retstr);
   55237             : 
   55238           0 :         return ret;
   55239             : }
   55240             : 
   55241           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55242             : {
   55243           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_print(py_obj, "netr_DsrEnumerateDomainTrusts_in", NDR_IN);
   55244             : }
   55245             : 
   55246           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55247             : {
   55248           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_print(py_obj, "netr_DsrEnumerateDomainTrusts_out", NDR_OUT);
   55249             : }
   55250             : 
   55251             : static PyMethodDef py_netr_DsrEnumerateDomainTrusts_methods[] = {
   55252             :         { "opnum", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_opnum, METH_NOARGS|METH_CLASS,
   55253             :                 "netlogon.netr_DsrEnumerateDomainTrusts.opnum() -> 40 (0x28) " },
   55254             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   55255             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   55256             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   55257             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   55258             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   55259             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   55260             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   55261             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   55262             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   55263             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   55264             :         { NULL, NULL, 0, NULL }
   55265             : };
   55266             : 
   55267             : 
   55268             : static PyTypeObject netr_DsrEnumerateDomainTrusts_Type = {
   55269             :         PyVarObject_HEAD_INIT(NULL, 0)
   55270             :         .tp_name = "netlogon.netr_DsrEnumerateDomainTrusts",
   55271             :         .tp_getset = py_netr_DsrEnumerateDomainTrusts_getsetters,
   55272             :         .tp_methods = py_netr_DsrEnumerateDomainTrusts_methods,
   55273             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   55274             :         .tp_new = py_netr_DsrEnumerateDomainTrusts_new,
   55275             : };
   55276             : 
   55277          19 : static bool pack_py_netr_DsrEnumerateDomainTrusts_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrEnumerateDomainTrusts *r)
   55278             : {
   55279           0 :         PyObject *py_server_name;
   55280           0 :         PyObject *py_trust_flags;
   55281          19 :         const char *kwnames[] = {
   55282             :                 "server_name", "trust_flags", NULL
   55283             :         };
   55284             : 
   55285          19 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsrEnumerateDomainTrusts", discard_const_p(char *, kwnames), &py_server_name, &py_trust_flags)) {
   55286           0 :                 return false;
   55287             :         }
   55288             : 
   55289          19 :         if (py_server_name == NULL) {
   55290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   55291           0 :                 return false;
   55292             :         }
   55293          19 :         if (py_server_name == Py_None) {
   55294           0 :                 r->in.server_name = NULL;
   55295             :         } else {
   55296          19 :                 r->in.server_name = NULL;
   55297             :                 {
   55298           0 :                         const char *test_str;
   55299           0 :                         const char *talloc_str;
   55300          19 :                         PyObject *unicode = NULL;
   55301          19 :                         if (PyUnicode_Check(py_server_name)) {
   55302          19 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   55303          19 :                                 if (unicode == NULL) {
   55304           0 :                                         return false;
   55305             :                                 }
   55306          19 :                                 test_str = PyBytes_AS_STRING(unicode);
   55307           0 :                         } else if (PyBytes_Check(py_server_name)) {
   55308           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   55309             :                         } else {
   55310           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   55311           0 :                                 return false;
   55312             :                         }
   55313          19 :                         talloc_str = talloc_strdup(r, test_str);
   55314          19 :                         if (unicode != NULL) {
   55315          10 :                                 Py_DECREF(unicode);
   55316             :                         }
   55317          19 :                         if (talloc_str == NULL) {
   55318           0 :                                 PyErr_NoMemory();
   55319           0 :                                 return false;
   55320             :                         }
   55321          19 :                         r->in.server_name = talloc_str;
   55322             :                 }
   55323             :         }
   55324          19 :         if (py_trust_flags == NULL) {
   55325           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.trust_flags");
   55326           0 :                 return false;
   55327             :         }
   55328             :         {
   55329          19 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.trust_flags));
   55330          19 :                 if (PyLong_Check(py_trust_flags)) {
   55331           0 :                         unsigned long long test_var;
   55332          19 :                         test_var = PyLong_AsUnsignedLongLong(py_trust_flags);
   55333          19 :                         if (PyErr_Occurred() != NULL) {
   55334           0 :                                 return false;
   55335             :                         }
   55336          19 :                         if (test_var > uint_max) {
   55337           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55338             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55339           0 :                                 return false;
   55340             :                         }
   55341          19 :                         r->in.trust_flags = test_var;
   55342             :                 } else {
   55343           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   55344             :                           PyLong_Type.tp_name);
   55345           0 :                         return false;
   55346             :                 }
   55347             :         }
   55348          19 :         return true;
   55349             : }
   55350             : 
   55351          19 : static PyObject *unpack_py_netr_DsrEnumerateDomainTrusts_args_out(struct netr_DsrEnumerateDomainTrusts *r)
   55352             : {
   55353           0 :         PyObject *result;
   55354           0 :         PyObject *py_trusts;
   55355          19 :         py_trusts = pytalloc_reference_ex(&netr_DomainTrustList_Type, r->out.trusts, r->out.trusts);
   55356          19 :         result = py_trusts;
   55357          19 :         if (!W_ERROR_IS_OK(r->out.result)) {
   55358           0 :                 PyErr_SetWERROR(r->out.result);
   55359           0 :                 return NULL;
   55360             :         }
   55361             : 
   55362          19 :         return result;
   55363             : }
   55364             : 
   55365             : 
   55366           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_server_name(PyObject *obj, void *closure)
   55367             : {
   55368           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
   55369           0 :         PyObject *py_server_name;
   55370           0 :         if (object->in.server_name == NULL) {
   55371           0 :                 Py_RETURN_NONE;
   55372             :         }
   55373           0 :         if (object->in.server_name == NULL) {
   55374           0 :                 py_server_name = Py_None;
   55375           0 :                 Py_INCREF(py_server_name);
   55376             :         } else {
   55377           0 :                 if (object->in.server_name == NULL) {
   55378           0 :                         py_server_name = Py_None;
   55379           0 :                         Py_INCREF(py_server_name);
   55380             :                 } else {
   55381           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   55382             :                 }
   55383             :         }
   55384           0 :         return py_server_name;
   55385             : }
   55386             : 
   55387           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   55388             : {
   55389           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
   55390           0 :         if (value == NULL) {
   55391           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   55392           0 :                 return -1;
   55393             :         }
   55394           0 :         if (value == Py_None) {
   55395           0 :                 object->in.server_name = NULL;
   55396             :         } else {
   55397           0 :                 object->in.server_name = NULL;
   55398             :                 {
   55399           0 :                         const char *test_str;
   55400           0 :                         const char *talloc_str;
   55401           0 :                         PyObject *unicode = NULL;
   55402           0 :                         if (PyUnicode_Check(value)) {
   55403           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55404           0 :                                 if (unicode == NULL) {
   55405           0 :                                         return -1;
   55406             :                                 }
   55407           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55408           0 :                         } else if (PyBytes_Check(value)) {
   55409           0 :                                 test_str = PyBytes_AS_STRING(value);
   55410             :                         } else {
   55411           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55412           0 :                                 return -1;
   55413             :                         }
   55414           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55415           0 :                         if (unicode != NULL) {
   55416           0 :                                 Py_DECREF(unicode);
   55417             :                         }
   55418           0 :                         if (talloc_str == NULL) {
   55419           0 :                                 PyErr_NoMemory();
   55420           0 :                                 return -1;
   55421             :                         }
   55422           0 :                         object->in.server_name = talloc_str;
   55423             :                 }
   55424             :         }
   55425           0 :         return 0;
   55426             : }
   55427             : 
   55428           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_domain(PyObject *obj, void *closure)
   55429             : {
   55430           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
   55431           0 :         PyObject *py_domain;
   55432           0 :         if (object->in.domain == NULL) {
   55433           0 :                 Py_RETURN_NONE;
   55434             :         }
   55435           0 :         if (object->in.domain == NULL) {
   55436           0 :                 py_domain = Py_None;
   55437           0 :                 Py_INCREF(py_domain);
   55438             :         } else {
   55439           0 :                 if (object->in.domain == NULL) {
   55440           0 :                         py_domain = Py_None;
   55441           0 :                         Py_INCREF(py_domain);
   55442             :                 } else {
   55443           0 :                         py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
   55444             :                 }
   55445             :         }
   55446           0 :         return py_domain;
   55447             : }
   55448             : 
   55449           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   55450             : {
   55451           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
   55452           0 :         if (value == NULL) {
   55453           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain");
   55454           0 :                 return -1;
   55455             :         }
   55456           0 :         if (value == Py_None) {
   55457           0 :                 object->in.domain = NULL;
   55458             :         } else {
   55459           0 :                 object->in.domain = NULL;
   55460             :                 {
   55461           0 :                         const char *test_str;
   55462           0 :                         const char *talloc_str;
   55463           0 :                         PyObject *unicode = NULL;
   55464           0 :                         if (PyUnicode_Check(value)) {
   55465           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55466           0 :                                 if (unicode == NULL) {
   55467           0 :                                         return -1;
   55468             :                                 }
   55469           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55470           0 :                         } else if (PyBytes_Check(value)) {
   55471           0 :                                 test_str = PyBytes_AS_STRING(value);
   55472             :                         } else {
   55473           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55474           0 :                                 return -1;
   55475             :                         }
   55476           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55477           0 :                         if (unicode != NULL) {
   55478           0 :                                 Py_DECREF(unicode);
   55479             :                         }
   55480           0 :                         if (talloc_str == NULL) {
   55481           0 :                                 PyErr_NoMemory();
   55482           0 :                                 return -1;
   55483             :                         }
   55484           0 :                         object->in.domain = talloc_str;
   55485             :                 }
   55486             :         }
   55487           0 :         return 0;
   55488             : }
   55489             : 
   55490           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_domain_guid(PyObject *obj, void *closure)
   55491             : {
   55492           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
   55493           0 :         PyObject *py_domain_guid;
   55494           0 :         if (object->in.domain_guid == NULL) {
   55495           0 :                 Py_RETURN_NONE;
   55496             :         }
   55497           0 :         if (object->in.domain_guid == NULL) {
   55498           0 :                 py_domain_guid = Py_None;
   55499           0 :                 Py_INCREF(py_domain_guid);
   55500             :         } else {
   55501           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   55502             :         }
   55503           0 :         return py_domain_guid;
   55504             : }
   55505             : 
   55506           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   55507             : {
   55508           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
   55509           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   55510           0 :         if (value == NULL) {
   55511           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_guid");
   55512           0 :                 return -1;
   55513             :         }
   55514           0 :         if (value == Py_None) {
   55515           0 :                 object->in.domain_guid = NULL;
   55516             :         } else {
   55517           0 :                 object->in.domain_guid = NULL;
   55518           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   55519           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   55520           0 :                         PyErr_NoMemory();
   55521           0 :                         return -1;
   55522             :                 }
   55523           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   55524             :         }
   55525           0 :         return 0;
   55526             : }
   55527             : 
   55528           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_dsa_guid(PyObject *obj, void *closure)
   55529             : {
   55530           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
   55531           0 :         PyObject *py_dsa_guid;
   55532           0 :         if (object->in.dsa_guid == NULL) {
   55533           0 :                 Py_RETURN_NONE;
   55534             :         }
   55535           0 :         if (object->in.dsa_guid == NULL) {
   55536           0 :                 py_dsa_guid = Py_None;
   55537           0 :                 Py_INCREF(py_dsa_guid);
   55538             :         } else {
   55539           0 :                 py_dsa_guid = pytalloc_reference_ex(GUID_Type, object->in.dsa_guid, object->in.dsa_guid);
   55540             :         }
   55541           0 :         return py_dsa_guid;
   55542             : }
   55543             : 
   55544           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
   55545             : {
   55546           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
   55547           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dsa_guid));
   55548           0 :         if (value == NULL) {
   55549           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dsa_guid");
   55550           0 :                 return -1;
   55551             :         }
   55552           0 :         if (value == Py_None) {
   55553           0 :                 object->in.dsa_guid = NULL;
   55554             :         } else {
   55555           0 :                 object->in.dsa_guid = NULL;
   55556           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   55557           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   55558           0 :                         PyErr_NoMemory();
   55559           0 :                         return -1;
   55560             :                 }
   55561           0 :                 object->in.dsa_guid = (struct GUID *)pytalloc_get_ptr(value);
   55562             :         }
   55563           0 :         return 0;
   55564             : }
   55565             : 
   55566           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_dns_host(PyObject *obj, void *closure)
   55567             : {
   55568           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
   55569           0 :         PyObject *py_dns_host;
   55570           0 :         if (object->in.dns_host == NULL) {
   55571           0 :                 Py_RETURN_NONE;
   55572             :         }
   55573           0 :         if (object->in.dns_host == NULL) {
   55574           0 :                 py_dns_host = Py_None;
   55575           0 :                 Py_INCREF(py_dns_host);
   55576             :         } else {
   55577           0 :                 py_dns_host = PyUnicode_Decode(object->in.dns_host, strlen(object->in.dns_host), "utf-8", "ignore");
   55578             :         }
   55579           0 :         return py_dns_host;
   55580             : }
   55581             : 
   55582           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_dns_host(PyObject *py_obj, PyObject *value, void *closure)
   55583             : {
   55584           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
   55585           0 :         if (value == NULL) {
   55586           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dns_host");
   55587           0 :                 return -1;
   55588             :         }
   55589           0 :         object->in.dns_host = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_host);
   55590           0 :         if (object->in.dns_host == NULL) {
   55591           0 :                 PyErr_NoMemory();
   55592           0 :                 return -1;
   55593             :         }
   55594             :         {
   55595           0 :                 const char *test_str;
   55596           0 :                 const char *talloc_str;
   55597           0 :                 PyObject *unicode = NULL;
   55598           0 :                 if (PyUnicode_Check(value)) {
   55599           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55600           0 :                         if (unicode == NULL) {
   55601           0 :                                 return -1;
   55602             :                         }
   55603           0 :                         test_str = PyBytes_AS_STRING(unicode);
   55604           0 :                 } else if (PyBytes_Check(value)) {
   55605           0 :                         test_str = PyBytes_AS_STRING(value);
   55606             :                 } else {
   55607           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55608           0 :                         return -1;
   55609             :                 }
   55610           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55611           0 :                 if (unicode != NULL) {
   55612           0 :                         Py_DECREF(unicode);
   55613             :                 }
   55614           0 :                 if (talloc_str == NULL) {
   55615           0 :                         PyErr_NoMemory();
   55616           0 :                         return -1;
   55617             :                 }
   55618           0 :                 object->in.dns_host = talloc_str;
   55619             :         }
   55620           0 :         return 0;
   55621             : }
   55622             : 
   55623           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_get_result(PyObject *obj, void *closure)
   55624             : {
   55625           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
   55626           0 :         PyObject *py_result;
   55627           0 :         py_result = PyErr_FromWERROR(object->out.result);
   55628           0 :         return py_result;
   55629             : }
   55630             : 
   55631           0 : static int py_netr_DsrDeregisterDNSHostRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
   55632             : {
   55633           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
   55634           0 :         if (value == NULL) {
   55635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   55636           0 :                 return -1;
   55637             :         }
   55638           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   55639           0 :         return 0;
   55640             : }
   55641             : 
   55642             : static PyGetSetDef py_netr_DsrDeregisterDNSHostRecords_getsetters[] = {
   55643             :         {
   55644             :                 .name = discard_const_p(char, "in_server_name"),
   55645             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_server_name,
   55646             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_server_name,
   55647             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55648             :         },
   55649             :         {
   55650             :                 .name = discard_const_p(char, "in_domain"),
   55651             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_domain,
   55652             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_domain,
   55653             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55654             :         },
   55655             :         {
   55656             :                 .name = discard_const_p(char, "in_domain_guid"),
   55657             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_domain_guid,
   55658             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_domain_guid,
   55659             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   55660             :         },
   55661             :         {
   55662             :                 .name = discard_const_p(char, "in_dsa_guid"),
   55663             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_dsa_guid,
   55664             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_dsa_guid,
   55665             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   55666             :         },
   55667             :         {
   55668             :                 .name = discard_const_p(char, "in_dns_host"),
   55669             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_dns_host,
   55670             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_dns_host,
   55671             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55672             :         },
   55673             :         {
   55674             :                 .name = discard_const_p(char, "result"),
   55675             :                 .get = py_netr_DsrDeregisterDNSHostRecords_get_result,
   55676             :                 .set = py_netr_DsrDeregisterDNSHostRecords_set_result,
   55677             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   55678             :         },
   55679             :         { .name = NULL }
   55680             : };
   55681             : 
   55682           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   55683             : {
   55684           0 :         PyObject *self = pytalloc_new(struct netr_DsrDeregisterDNSHostRecords, type);
   55685           0 :         return self;
   55686             : }
   55687             : 
   55688           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   55689             : {
   55690             : 
   55691             : 
   55692           0 :         return PyLong_FromLong(41);
   55693             : }
   55694             : 
   55695           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   55696             : {
   55697           0 :         const struct ndr_interface_call *call = NULL;
   55698           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
   55699           0 :         PyObject *ret = NULL;
   55700           0 :         struct ndr_push *push = NULL;
   55701           0 :         DATA_BLOB blob;
   55702           0 :         enum ndr_err_code err;
   55703             : 
   55704           0 :         if (ndr_table_netlogon.num_calls < 42) {
   55705           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_pack");
   55706           0 :                 return NULL;
   55707             :         }
   55708           0 :         call = &ndr_table_netlogon.calls[41];
   55709             : 
   55710           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   55711           0 :         if (push == NULL) {
   55712           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55713           0 :                 return NULL;
   55714             :         }
   55715             : 
   55716           0 :         push->flags |= ndr_push_flags;
   55717             : 
   55718           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   55719           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55720           0 :                 TALLOC_FREE(push);
   55721           0 :                 PyErr_SetNdrError(err);
   55722           0 :                 return NULL;
   55723             :         }
   55724           0 :         blob = ndr_push_blob(push);
   55725           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   55726           0 :         TALLOC_FREE(push);
   55727           0 :         return ret;
   55728             : }
   55729             : 
   55730           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55731             : {
   55732           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55733           0 :         PyObject *bigendian_obj = NULL;
   55734           0 :         PyObject *ndr64_obj = NULL;
   55735           0 :         libndr_flags ndr_push_flags = 0;
   55736             : 
   55737           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   55738             :                 discard_const_p(char *, kwnames),
   55739             :                 &bigendian_obj,
   55740             :                 &ndr64_obj)) {
   55741           0 :                 return NULL;
   55742             :         }
   55743             : 
   55744           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55745           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55746             :         }
   55747           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55748           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55749             :         }
   55750             : 
   55751           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   55752             : }
   55753             : 
   55754           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55755             : {
   55756           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55757           0 :         PyObject *bigendian_obj = NULL;
   55758           0 :         PyObject *ndr64_obj = NULL;
   55759           0 :         libndr_flags ndr_push_flags = 0;
   55760             : 
   55761           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   55762             :                 discard_const_p(char *, kwnames),
   55763             :                 &bigendian_obj,
   55764             :                 &ndr64_obj)) {
   55765           0 :                 return NULL;
   55766             :         }
   55767             : 
   55768           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55769           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55770             :         }
   55771           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55772           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55773             :         }
   55774             : 
   55775           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   55776             : }
   55777             : 
   55778           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   55779             : {
   55780           0 :         const struct ndr_interface_call *call = NULL;
   55781           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
   55782           0 :         struct ndr_pull *pull = NULL;
   55783           0 :         enum ndr_err_code err;
   55784             : 
   55785           0 :         if (ndr_table_netlogon.num_calls < 42) {
   55786           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_unpack");
   55787           0 :                 return NULL;
   55788             :         }
   55789           0 :         call = &ndr_table_netlogon.calls[41];
   55790             : 
   55791           0 :         pull = ndr_pull_init_blob(blob, object);
   55792           0 :         if (pull == NULL) {
   55793           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55794           0 :                 return NULL;
   55795             :         }
   55796             : 
   55797           0 :         pull->flags |= ndr_pull_flags;
   55798             : 
   55799           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   55800           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55801           0 :                 TALLOC_FREE(pull);
   55802           0 :                 PyErr_SetNdrError(err);
   55803           0 :                 return NULL;
   55804             :         }
   55805           0 :         if (!allow_remaining) {
   55806           0 :                 uint32_t highest_ofs;
   55807             : 
   55808           0 :                 if (pull->offset > pull->relative_highest_offset) {
   55809           0 :                         highest_ofs = pull->offset;
   55810             :                 } else {
   55811           0 :                         highest_ofs = pull->relative_highest_offset;
   55812             :                 }
   55813           0 :                 if (highest_ofs < pull->data_size) {
   55814           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   55815             :                                 "not all bytes consumed ofs[%u] size[%u]",
   55816             :                                 highest_ofs, pull->data_size);
   55817           0 :                         TALLOC_FREE(pull);
   55818           0 :                         PyErr_SetNdrError(err);
   55819           0 :                         return NULL;
   55820             :                 }
   55821             :         }
   55822             : 
   55823           0 :         TALLOC_FREE(pull);
   55824           0 :         Py_RETURN_NONE;
   55825             : }
   55826             : 
   55827           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55828             : {
   55829           0 :         DATA_BLOB blob;
   55830           0 :         Py_ssize_t blob_length = 0;
   55831           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55832           0 :         PyObject *bigendian_obj = NULL;
   55833           0 :         PyObject *ndr64_obj = NULL;
   55834           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55835           0 :         PyObject *allow_remaining_obj = NULL;
   55836           0 :         bool allow_remaining = false;
   55837             : 
   55838           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   55839             :                 discard_const_p(char *, kwnames),
   55840             :                 &blob.data, &blob_length,
   55841             :                 &bigendian_obj,
   55842             :                 &ndr64_obj,
   55843             :                 &allow_remaining_obj)) {
   55844           0 :                 return NULL;
   55845             :         }
   55846           0 :         blob.length = blob_length;
   55847             : 
   55848           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55849           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55850             :         }
   55851           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55852           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55853             :         }
   55854             : 
   55855           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55856           0 :                 allow_remaining = true;
   55857             :         }
   55858             : 
   55859           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   55860             : }
   55861             : 
   55862           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55863             : {
   55864           0 :         DATA_BLOB blob;
   55865           0 :         Py_ssize_t blob_length = 0;
   55866           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55867           0 :         PyObject *bigendian_obj = NULL;
   55868           0 :         PyObject *ndr64_obj = NULL;
   55869           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55870           0 :         PyObject *allow_remaining_obj = NULL;
   55871           0 :         bool allow_remaining = false;
   55872             : 
   55873           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   55874             :                 discard_const_p(char *, kwnames),
   55875             :                 &blob.data, &blob_length,
   55876             :                 &bigendian_obj,
   55877             :                 &ndr64_obj,
   55878             :                 &allow_remaining_obj)) {
   55879           0 :                 return NULL;
   55880             :         }
   55881           0 :         blob.length = blob_length;
   55882             : 
   55883           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55884           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55885             :         }
   55886           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55887           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55888             :         }
   55889             : 
   55890           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55891           0 :                 allow_remaining = true;
   55892             :         }
   55893             : 
   55894           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   55895             : }
   55896             : 
   55897           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   55898             : {
   55899           0 :         const struct ndr_interface_call *call = NULL;
   55900           0 :         struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
   55901           0 :         PyObject *ret;
   55902           0 :         char *retstr;
   55903             : 
   55904           0 :         if (ndr_table_netlogon.num_calls < 42) {
   55905           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_print");
   55906           0 :                 return NULL;
   55907             :         }
   55908           0 :         call = &ndr_table_netlogon.calls[41];
   55909             : 
   55910           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   55911           0 :         ret = PyUnicode_FromString(retstr);
   55912           0 :         TALLOC_FREE(retstr);
   55913             : 
   55914           0 :         return ret;
   55915             : }
   55916             : 
   55917           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55918             : {
   55919           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_print(py_obj, "netr_DsrDeregisterDNSHostRecords_in", NDR_IN);
   55920             : }
   55921             : 
   55922           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55923             : {
   55924           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_print(py_obj, "netr_DsrDeregisterDNSHostRecords_out", NDR_OUT);
   55925             : }
   55926             : 
   55927             : static PyMethodDef py_netr_DsrDeregisterDNSHostRecords_methods[] = {
   55928             :         { "opnum", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
   55929             :                 "netlogon.netr_DsrDeregisterDNSHostRecords.opnum() -> 41 (0x29) " },
   55930             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   55931             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   55932             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   55933             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   55934             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   55935             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   55936             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   55937             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   55938             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   55939             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   55940             :         { NULL, NULL, 0, NULL }
   55941             : };
   55942             : 
   55943             : 
   55944             : static PyTypeObject netr_DsrDeregisterDNSHostRecords_Type = {
   55945             :         PyVarObject_HEAD_INIT(NULL, 0)
   55946             :         .tp_name = "netlogon.netr_DsrDeregisterDNSHostRecords",
   55947             :         .tp_getset = py_netr_DsrDeregisterDNSHostRecords_getsetters,
   55948             :         .tp_methods = py_netr_DsrDeregisterDNSHostRecords_methods,
   55949             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   55950             :         .tp_new = py_netr_DsrDeregisterDNSHostRecords_new,
   55951             : };
   55952             : 
   55953           0 : static bool pack_py_netr_DsrDeregisterDNSHostRecords_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrDeregisterDNSHostRecords *r)
   55954             : {
   55955           0 :         PyObject *py_server_name;
   55956           0 :         PyObject *py_domain;
   55957           0 :         PyObject *py_domain_guid;
   55958           0 :         PyObject *py_dsa_guid;
   55959           0 :         PyObject *py_dns_host;
   55960           0 :         const char *kwnames[] = {
   55961             :                 "server_name", "domain", "domain_guid", "dsa_guid", "dns_host", NULL
   55962             :         };
   55963             : 
   55964           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)) {
   55965           0 :                 return false;
   55966             :         }
   55967             : 
   55968           0 :         if (py_server_name == NULL) {
   55969           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   55970           0 :                 return false;
   55971             :         }
   55972           0 :         if (py_server_name == Py_None) {
   55973           0 :                 r->in.server_name = NULL;
   55974             :         } else {
   55975           0 :                 r->in.server_name = NULL;
   55976             :                 {
   55977           0 :                         const char *test_str;
   55978           0 :                         const char *talloc_str;
   55979           0 :                         PyObject *unicode = NULL;
   55980           0 :                         if (PyUnicode_Check(py_server_name)) {
   55981           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   55982           0 :                                 if (unicode == NULL) {
   55983           0 :                                         return false;
   55984             :                                 }
   55985           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55986           0 :                         } else if (PyBytes_Check(py_server_name)) {
   55987           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   55988             :                         } else {
   55989           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   55990           0 :                                 return false;
   55991             :                         }
   55992           0 :                         talloc_str = talloc_strdup(r, test_str);
   55993           0 :                         if (unicode != NULL) {
   55994           0 :                                 Py_DECREF(unicode);
   55995             :                         }
   55996           0 :                         if (talloc_str == NULL) {
   55997           0 :                                 PyErr_NoMemory();
   55998           0 :                                 return false;
   55999             :                         }
   56000           0 :                         r->in.server_name = talloc_str;
   56001             :                 }
   56002             :         }
   56003           0 :         if (py_domain == NULL) {
   56004           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain");
   56005           0 :                 return false;
   56006             :         }
   56007           0 :         if (py_domain == Py_None) {
   56008           0 :                 r->in.domain = NULL;
   56009             :         } else {
   56010           0 :                 r->in.domain = NULL;
   56011             :                 {
   56012           0 :                         const char *test_str;
   56013           0 :                         const char *talloc_str;
   56014           0 :                         PyObject *unicode = NULL;
   56015           0 :                         if (PyUnicode_Check(py_domain)) {
   56016           0 :                                 unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
   56017           0 :                                 if (unicode == NULL) {
   56018           0 :                                         return false;
   56019             :                                 }
   56020           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56021           0 :                         } else if (PyBytes_Check(py_domain)) {
   56022           0 :                                 test_str = PyBytes_AS_STRING(py_domain);
   56023             :                         } else {
   56024           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
   56025           0 :                                 return false;
   56026             :                         }
   56027           0 :                         talloc_str = talloc_strdup(r, test_str);
   56028           0 :                         if (unicode != NULL) {
   56029           0 :                                 Py_DECREF(unicode);
   56030             :                         }
   56031           0 :                         if (talloc_str == NULL) {
   56032           0 :                                 PyErr_NoMemory();
   56033           0 :                                 return false;
   56034             :                         }
   56035           0 :                         r->in.domain = talloc_str;
   56036             :                 }
   56037             :         }
   56038           0 :         if (py_domain_guid == NULL) {
   56039           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_guid");
   56040           0 :                 return false;
   56041             :         }
   56042           0 :         if (py_domain_guid == Py_None) {
   56043           0 :                 r->in.domain_guid = NULL;
   56044             :         } else {
   56045           0 :                 r->in.domain_guid = NULL;
   56046           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   56047           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   56048           0 :                         PyErr_NoMemory();
   56049           0 :                         return false;
   56050             :                 }
   56051           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   56052             :         }
   56053           0 :         if (py_dsa_guid == NULL) {
   56054           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dsa_guid");
   56055           0 :                 return false;
   56056             :         }
   56057           0 :         if (py_dsa_guid == Py_None) {
   56058           0 :                 r->in.dsa_guid = NULL;
   56059             :         } else {
   56060           0 :                 r->in.dsa_guid = NULL;
   56061           0 :                 PY_CHECK_TYPE(GUID_Type, py_dsa_guid, return false;);
   56062           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_dsa_guid)) == NULL) {
   56063           0 :                         PyErr_NoMemory();
   56064           0 :                         return false;
   56065             :                 }
   56066           0 :                 r->in.dsa_guid = (struct GUID *)pytalloc_get_ptr(py_dsa_guid);
   56067             :         }
   56068           0 :         if (py_dns_host == NULL) {
   56069           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dns_host");
   56070           0 :                 return false;
   56071             :         }
   56072           0 :         r->in.dns_host = talloc_ptrtype(r, r->in.dns_host);
   56073           0 :         if (r->in.dns_host == NULL) {
   56074           0 :                 PyErr_NoMemory();
   56075           0 :                 return false;
   56076             :         }
   56077             :         {
   56078           0 :                 const char *test_str;
   56079           0 :                 const char *talloc_str;
   56080           0 :                 PyObject *unicode = NULL;
   56081           0 :                 if (PyUnicode_Check(py_dns_host)) {
   56082           0 :                         unicode = PyUnicode_AsEncodedString(py_dns_host, "utf-8", "ignore");
   56083           0 :                         if (unicode == NULL) {
   56084           0 :                                 return false;
   56085             :                         }
   56086           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56087           0 :                 } else if (PyBytes_Check(py_dns_host)) {
   56088           0 :                         test_str = PyBytes_AS_STRING(py_dns_host);
   56089             :                 } else {
   56090           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_host)->tp_name);
   56091           0 :                         return false;
   56092             :                 }
   56093           0 :                 talloc_str = talloc_strdup(r, test_str);
   56094           0 :                 if (unicode != NULL) {
   56095           0 :                         Py_DECREF(unicode);
   56096             :                 }
   56097           0 :                 if (talloc_str == NULL) {
   56098           0 :                         PyErr_NoMemory();
   56099           0 :                         return false;
   56100             :                 }
   56101           0 :                 r->in.dns_host = talloc_str;
   56102             :         }
   56103           0 :         return true;
   56104             : }
   56105             : 
   56106           0 : static PyObject *unpack_py_netr_DsrDeregisterDNSHostRecords_args_out(struct netr_DsrDeregisterDNSHostRecords *r)
   56107             : {
   56108           0 :         PyObject *result;
   56109           0 :         result = Py_None;
   56110           0 :         Py_INCREF(result);
   56111           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   56112           0 :                 PyErr_SetWERROR(r->out.result);
   56113           0 :                 return NULL;
   56114             :         }
   56115             : 
   56116           0 :         return result;
   56117             : }
   56118             : 
   56119             : 
   56120           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_server_name(PyObject *obj, void *closure)
   56121             : {
   56122           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
   56123           0 :         PyObject *py_server_name;
   56124           0 :         if (object->in.server_name == NULL) {
   56125           0 :                 Py_RETURN_NONE;
   56126             :         }
   56127           0 :         if (object->in.server_name == NULL) {
   56128           0 :                 py_server_name = Py_None;
   56129           0 :                 Py_INCREF(py_server_name);
   56130             :         } else {
   56131           0 :                 if (object->in.server_name == NULL) {
   56132           0 :                         py_server_name = Py_None;
   56133           0 :                         Py_INCREF(py_server_name);
   56134             :                 } else {
   56135           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   56136             :                 }
   56137             :         }
   56138           0 :         return py_server_name;
   56139             : }
   56140             : 
   56141           0 : static int py_netr_ServerTrustPasswordsGet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   56142             : {
   56143           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56144           0 :         if (value == NULL) {
   56145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   56146           0 :                 return -1;
   56147             :         }
   56148           0 :         if (value == Py_None) {
   56149           0 :                 object->in.server_name = NULL;
   56150             :         } else {
   56151           0 :                 object->in.server_name = NULL;
   56152             :                 {
   56153           0 :                         const char *test_str;
   56154           0 :                         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 :                                         return -1;
   56160             :                                 }
   56161           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56162           0 :                         } else if (PyBytes_Check(value)) {
   56163           0 :                                 test_str = PyBytes_AS_STRING(value);
   56164             :                         } else {
   56165           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56166           0 :                                 return -1;
   56167             :                         }
   56168           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56169           0 :                         if (unicode != NULL) {
   56170           0 :                                 Py_DECREF(unicode);
   56171             :                         }
   56172           0 :                         if (talloc_str == NULL) {
   56173           0 :                                 PyErr_NoMemory();
   56174           0 :                                 return -1;
   56175             :                         }
   56176           0 :                         object->in.server_name = talloc_str;
   56177             :                 }
   56178             :         }
   56179           0 :         return 0;
   56180             : }
   56181             : 
   56182           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_account_name(PyObject *obj, void *closure)
   56183             : {
   56184           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
   56185           0 :         PyObject *py_account_name;
   56186           0 :         if (object->in.account_name == NULL) {
   56187           0 :                 Py_RETURN_NONE;
   56188             :         }
   56189           0 :         if (object->in.account_name == NULL) {
   56190           0 :                 py_account_name = Py_None;
   56191           0 :                 Py_INCREF(py_account_name);
   56192             :         } else {
   56193           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   56194             :         }
   56195           0 :         return py_account_name;
   56196             : }
   56197             : 
   56198           0 : static int py_netr_ServerTrustPasswordsGet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   56199             : {
   56200           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56201           0 :         if (value == NULL) {
   56202           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   56203           0 :                 return -1;
   56204             :         }
   56205           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   56206           0 :         if (object->in.account_name == NULL) {
   56207           0 :                 PyErr_NoMemory();
   56208           0 :                 return -1;
   56209             :         }
   56210             :         {
   56211           0 :                 const char *test_str;
   56212           0 :                 const char *talloc_str;
   56213           0 :                 PyObject *unicode = NULL;
   56214           0 :                 if (PyUnicode_Check(value)) {
   56215           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56216           0 :                         if (unicode == NULL) {
   56217           0 :                                 return -1;
   56218             :                         }
   56219           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56220           0 :                 } else if (PyBytes_Check(value)) {
   56221           0 :                         test_str = PyBytes_AS_STRING(value);
   56222             :                 } else {
   56223           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56224           0 :                         return -1;
   56225             :                 }
   56226           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56227           0 :                 if (unicode != NULL) {
   56228           0 :                         Py_DECREF(unicode);
   56229             :                 }
   56230           0 :                 if (talloc_str == NULL) {
   56231           0 :                         PyErr_NoMemory();
   56232           0 :                         return -1;
   56233             :                 }
   56234           0 :                 object->in.account_name = talloc_str;
   56235             :         }
   56236           0 :         return 0;
   56237             : }
   56238             : 
   56239           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_secure_channel_type(PyObject *obj, void *closure)
   56240             : {
   56241           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
   56242           0 :         PyObject *py_secure_channel_type;
   56243           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
   56244           0 :         return py_secure_channel_type;
   56245             : }
   56246             : 
   56247           0 : static int py_netr_ServerTrustPasswordsGet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   56248             : {
   56249           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56250           0 :         if (value == NULL) {
   56251           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
   56252           0 :                 return -1;
   56253             :         }
   56254             :         {
   56255           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   56256           0 :                 if (PyLong_Check(value)) {
   56257           0 :                         unsigned long long test_var;
   56258           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   56259           0 :                         if (PyErr_Occurred() != NULL) {
   56260           0 :                                 return -1;
   56261             :                         }
   56262           0 :                         if (test_var > uint_max) {
   56263           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   56264             :                                   PyLong_Type.tp_name, uint_max, test_var);
   56265           0 :                                 return -1;
   56266             :                         }
   56267           0 :                         object->in.secure_channel_type = test_var;
   56268             :                 } else {
   56269           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   56270             :                           PyLong_Type.tp_name);
   56271           0 :                         return -1;
   56272             :                 }
   56273             :         }
   56274           0 :         return 0;
   56275             : }
   56276             : 
   56277           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_computer_name(PyObject *obj, void *closure)
   56278             : {
   56279           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
   56280           0 :         PyObject *py_computer_name;
   56281           0 :         if (object->in.computer_name == NULL) {
   56282           0 :                 Py_RETURN_NONE;
   56283             :         }
   56284           0 :         if (object->in.computer_name == NULL) {
   56285           0 :                 py_computer_name = Py_None;
   56286           0 :                 Py_INCREF(py_computer_name);
   56287             :         } else {
   56288           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   56289             :         }
   56290           0 :         return py_computer_name;
   56291             : }
   56292             : 
   56293           0 : static int py_netr_ServerTrustPasswordsGet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   56294             : {
   56295           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56296           0 :         if (value == NULL) {
   56297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   56298           0 :                 return -1;
   56299             :         }
   56300           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   56301           0 :         if (object->in.computer_name == NULL) {
   56302           0 :                 PyErr_NoMemory();
   56303           0 :                 return -1;
   56304             :         }
   56305             :         {
   56306           0 :                 const char *test_str;
   56307           0 :                 const char *talloc_str;
   56308           0 :                 PyObject *unicode = NULL;
   56309           0 :                 if (PyUnicode_Check(value)) {
   56310           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56311           0 :                         if (unicode == NULL) {
   56312           0 :                                 return -1;
   56313             :                         }
   56314           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56315           0 :                 } else if (PyBytes_Check(value)) {
   56316           0 :                         test_str = PyBytes_AS_STRING(value);
   56317             :                 } else {
   56318           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56319           0 :                         return -1;
   56320             :                 }
   56321           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56322           0 :                 if (unicode != NULL) {
   56323           0 :                         Py_DECREF(unicode);
   56324             :                 }
   56325           0 :                 if (talloc_str == NULL) {
   56326           0 :                         PyErr_NoMemory();
   56327           0 :                         return -1;
   56328             :                 }
   56329           0 :                 object->in.computer_name = talloc_str;
   56330             :         }
   56331           0 :         return 0;
   56332             : }
   56333             : 
   56334           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_credential(PyObject *obj, void *closure)
   56335             : {
   56336           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
   56337           0 :         PyObject *py_credential;
   56338           0 :         if (object->in.credential == NULL) {
   56339           0 :                 Py_RETURN_NONE;
   56340             :         }
   56341           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   56342           0 :         return py_credential;
   56343             : }
   56344             : 
   56345           0 : static int py_netr_ServerTrustPasswordsGet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   56346             : {
   56347           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56348           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   56349           0 :         if (value == NULL) {
   56350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   56351           0 :                 return -1;
   56352             :         }
   56353           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   56354           0 :         if (object->in.credential == NULL) {
   56355           0 :                 PyErr_NoMemory();
   56356           0 :                 return -1;
   56357             :         }
   56358           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   56359           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56360           0 :                 PyErr_NoMemory();
   56361           0 :                 return -1;
   56362             :         }
   56363           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   56364           0 :         return 0;
   56365             : }
   56366             : 
   56367           0 : static PyObject *py_netr_ServerTrustPasswordsGet_out_get_return_authenticator(PyObject *obj, void *closure)
   56368             : {
   56369           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
   56370           0 :         PyObject *py_return_authenticator;
   56371           0 :         if (object->out.return_authenticator == NULL) {
   56372           0 :                 Py_RETURN_NONE;
   56373             :         }
   56374           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   56375           0 :         return py_return_authenticator;
   56376             : }
   56377             : 
   56378           0 : static int py_netr_ServerTrustPasswordsGet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   56379             : {
   56380           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56381           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   56382           0 :         if (value == NULL) {
   56383           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   56384           0 :                 return -1;
   56385             :         }
   56386           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   56387           0 :         if (object->out.return_authenticator == NULL) {
   56388           0 :                 PyErr_NoMemory();
   56389           0 :                 return -1;
   56390             :         }
   56391           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   56392           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56393           0 :                 PyErr_NoMemory();
   56394           0 :                 return -1;
   56395             :         }
   56396           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   56397           0 :         return 0;
   56398             : }
   56399             : 
   56400           0 : static PyObject *py_netr_ServerTrustPasswordsGet_out_get_new_owf_password(PyObject *obj, void *closure)
   56401             : {
   56402           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
   56403           0 :         PyObject *py_new_owf_password;
   56404           0 :         if (object->out.new_owf_password == NULL) {
   56405           0 :                 Py_RETURN_NONE;
   56406             :         }
   56407           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.new_owf_password, object->out.new_owf_password);
   56408           0 :         return py_new_owf_password;
   56409             : }
   56410             : 
   56411           0 : static int py_netr_ServerTrustPasswordsGet_out_set_new_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   56412             : {
   56413           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56414           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.new_owf_password));
   56415           0 :         if (value == NULL) {
   56416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.new_owf_password");
   56417           0 :                 return -1;
   56418             :         }
   56419           0 :         object->out.new_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.new_owf_password);
   56420           0 :         if (object->out.new_owf_password == NULL) {
   56421           0 :                 PyErr_NoMemory();
   56422           0 :                 return -1;
   56423             :         }
   56424           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   56425           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56426           0 :                 PyErr_NoMemory();
   56427           0 :                 return -1;
   56428             :         }
   56429           0 :         object->out.new_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   56430           0 :         return 0;
   56431             : }
   56432             : 
   56433           0 : static PyObject *py_netr_ServerTrustPasswordsGet_out_get_old_owf_password(PyObject *obj, void *closure)
   56434             : {
   56435           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
   56436           0 :         PyObject *py_old_owf_password;
   56437           0 :         if (object->out.old_owf_password == NULL) {
   56438           0 :                 Py_RETURN_NONE;
   56439             :         }
   56440           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.old_owf_password, object->out.old_owf_password);
   56441           0 :         return py_old_owf_password;
   56442             : }
   56443             : 
   56444           0 : static int py_netr_ServerTrustPasswordsGet_out_set_old_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   56445             : {
   56446           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56447           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.old_owf_password));
   56448           0 :         if (value == NULL) {
   56449           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.old_owf_password");
   56450           0 :                 return -1;
   56451             :         }
   56452           0 :         object->out.old_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.old_owf_password);
   56453           0 :         if (object->out.old_owf_password == NULL) {
   56454           0 :                 PyErr_NoMemory();
   56455           0 :                 return -1;
   56456             :         }
   56457           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   56458           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56459           0 :                 PyErr_NoMemory();
   56460           0 :                 return -1;
   56461             :         }
   56462           0 :         object->out.old_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   56463           0 :         return 0;
   56464             : }
   56465             : 
   56466           0 : static PyObject *py_netr_ServerTrustPasswordsGet_get_result(PyObject *obj, void *closure)
   56467             : {
   56468           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
   56469           0 :         PyObject *py_result;
   56470           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   56471           0 :         return py_result;
   56472             : }
   56473             : 
   56474           0 : static int py_netr_ServerTrustPasswordsGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   56475             : {
   56476           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56477           0 :         if (value == NULL) {
   56478           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   56479           0 :                 return -1;
   56480             :         }
   56481           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   56482           0 :         return 0;
   56483             : }
   56484             : 
   56485             : static PyGetSetDef py_netr_ServerTrustPasswordsGet_getsetters[] = {
   56486             :         {
   56487             :                 .name = discard_const_p(char, "in_server_name"),
   56488             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_server_name,
   56489             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_server_name,
   56490             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56491             :         },
   56492             :         {
   56493             :                 .name = discard_const_p(char, "in_account_name"),
   56494             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_account_name,
   56495             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_account_name,
   56496             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56497             :         },
   56498             :         {
   56499             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   56500             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_secure_channel_type,
   56501             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_secure_channel_type,
   56502             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   56503             :         },
   56504             :         {
   56505             :                 .name = discard_const_p(char, "in_computer_name"),
   56506             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_computer_name,
   56507             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_computer_name,
   56508             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56509             :         },
   56510             :         {
   56511             :                 .name = discard_const_p(char, "in_credential"),
   56512             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_credential,
   56513             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_credential,
   56514             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   56515             :         },
   56516             :         {
   56517             :                 .name = discard_const_p(char, "out_return_authenticator"),
   56518             :                 .get = py_netr_ServerTrustPasswordsGet_out_get_return_authenticator,
   56519             :                 .set = py_netr_ServerTrustPasswordsGet_out_set_return_authenticator,
   56520             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   56521             :         },
   56522             :         {
   56523             :                 .name = discard_const_p(char, "out_new_owf_password"),
   56524             :                 .get = py_netr_ServerTrustPasswordsGet_out_get_new_owf_password,
   56525             :                 .set = py_netr_ServerTrustPasswordsGet_out_set_new_owf_password,
   56526             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   56527             :         },
   56528             :         {
   56529             :                 .name = discard_const_p(char, "out_old_owf_password"),
   56530             :                 .get = py_netr_ServerTrustPasswordsGet_out_get_old_owf_password,
   56531             :                 .set = py_netr_ServerTrustPasswordsGet_out_set_old_owf_password,
   56532             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   56533             :         },
   56534             :         {
   56535             :                 .name = discard_const_p(char, "result"),
   56536             :                 .get = py_netr_ServerTrustPasswordsGet_get_result,
   56537             :                 .set = py_netr_ServerTrustPasswordsGet_set_result,
   56538             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   56539             :         },
   56540             :         { .name = NULL }
   56541             : };
   56542             : 
   56543           0 : static PyObject *py_netr_ServerTrustPasswordsGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   56544             : {
   56545           0 :         PyObject *self = pytalloc_new(struct netr_ServerTrustPasswordsGet, type);
   56546           0 :         struct netr_ServerTrustPasswordsGet *_self = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(self);
   56547           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   56548           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   56549           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   56550           0 :         _self->out.new_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   56551           0 :         _self->out.old_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   56552           0 :         return self;
   56553             : }
   56554             : 
   56555           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   56556             : {
   56557             : 
   56558             : 
   56559           0 :         return PyLong_FromLong(42);
   56560             : }
   56561             : 
   56562           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   56563             : {
   56564           0 :         const struct ndr_interface_call *call = NULL;
   56565           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56566           0 :         PyObject *ret = NULL;
   56567           0 :         struct ndr_push *push = NULL;
   56568           0 :         DATA_BLOB blob;
   56569           0 :         enum ndr_err_code err;
   56570             : 
   56571           0 :         if (ndr_table_netlogon.num_calls < 43) {
   56572           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_pack");
   56573           0 :                 return NULL;
   56574             :         }
   56575           0 :         call = &ndr_table_netlogon.calls[42];
   56576             : 
   56577           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   56578           0 :         if (push == NULL) {
   56579           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56580           0 :                 return NULL;
   56581             :         }
   56582             : 
   56583           0 :         push->flags |= ndr_push_flags;
   56584             : 
   56585           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   56586           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56587           0 :                 TALLOC_FREE(push);
   56588           0 :                 PyErr_SetNdrError(err);
   56589           0 :                 return NULL;
   56590             :         }
   56591           0 :         blob = ndr_push_blob(push);
   56592           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   56593           0 :         TALLOC_FREE(push);
   56594           0 :         return ret;
   56595             : }
   56596             : 
   56597           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56598             : {
   56599           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56600           0 :         PyObject *bigendian_obj = NULL;
   56601           0 :         PyObject *ndr64_obj = NULL;
   56602           0 :         libndr_flags ndr_push_flags = 0;
   56603             : 
   56604           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   56605             :                 discard_const_p(char *, kwnames),
   56606             :                 &bigendian_obj,
   56607             :                 &ndr64_obj)) {
   56608           0 :                 return NULL;
   56609             :         }
   56610             : 
   56611           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56612           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56613             :         }
   56614           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56615           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56616             :         }
   56617             : 
   56618           0 :         return py_netr_ServerTrustPasswordsGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   56619             : }
   56620             : 
   56621           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56622             : {
   56623           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56624           0 :         PyObject *bigendian_obj = NULL;
   56625           0 :         PyObject *ndr64_obj = NULL;
   56626           0 :         libndr_flags ndr_push_flags = 0;
   56627             : 
   56628           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   56629             :                 discard_const_p(char *, kwnames),
   56630             :                 &bigendian_obj,
   56631             :                 &ndr64_obj)) {
   56632           0 :                 return NULL;
   56633             :         }
   56634             : 
   56635           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56636           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56637             :         }
   56638           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56639           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56640             :         }
   56641             : 
   56642           0 :         return py_netr_ServerTrustPasswordsGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   56643             : }
   56644             : 
   56645           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   56646             : {
   56647           0 :         const struct ndr_interface_call *call = NULL;
   56648           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56649           0 :         struct ndr_pull *pull = NULL;
   56650           0 :         enum ndr_err_code err;
   56651             : 
   56652           0 :         if (ndr_table_netlogon.num_calls < 43) {
   56653           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_unpack");
   56654           0 :                 return NULL;
   56655             :         }
   56656           0 :         call = &ndr_table_netlogon.calls[42];
   56657             : 
   56658           0 :         pull = ndr_pull_init_blob(blob, object);
   56659           0 :         if (pull == NULL) {
   56660           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56661           0 :                 return NULL;
   56662             :         }
   56663             : 
   56664           0 :         pull->flags |= ndr_pull_flags;
   56665             : 
   56666           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   56667           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56668           0 :                 TALLOC_FREE(pull);
   56669           0 :                 PyErr_SetNdrError(err);
   56670           0 :                 return NULL;
   56671             :         }
   56672           0 :         if (!allow_remaining) {
   56673           0 :                 uint32_t highest_ofs;
   56674             : 
   56675           0 :                 if (pull->offset > pull->relative_highest_offset) {
   56676           0 :                         highest_ofs = pull->offset;
   56677             :                 } else {
   56678           0 :                         highest_ofs = pull->relative_highest_offset;
   56679             :                 }
   56680           0 :                 if (highest_ofs < pull->data_size) {
   56681           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   56682             :                                 "not all bytes consumed ofs[%u] size[%u]",
   56683             :                                 highest_ofs, pull->data_size);
   56684           0 :                         TALLOC_FREE(pull);
   56685           0 :                         PyErr_SetNdrError(err);
   56686           0 :                         return NULL;
   56687             :                 }
   56688             :         }
   56689             : 
   56690           0 :         TALLOC_FREE(pull);
   56691           0 :         Py_RETURN_NONE;
   56692             : }
   56693             : 
   56694           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56695             : {
   56696           0 :         DATA_BLOB blob;
   56697           0 :         Py_ssize_t blob_length = 0;
   56698           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56699           0 :         PyObject *bigendian_obj = NULL;
   56700           0 :         PyObject *ndr64_obj = NULL;
   56701           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56702           0 :         PyObject *allow_remaining_obj = NULL;
   56703           0 :         bool allow_remaining = false;
   56704             : 
   56705           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   56706             :                 discard_const_p(char *, kwnames),
   56707             :                 &blob.data, &blob_length,
   56708             :                 &bigendian_obj,
   56709             :                 &ndr64_obj,
   56710             :                 &allow_remaining_obj)) {
   56711           0 :                 return NULL;
   56712             :         }
   56713           0 :         blob.length = blob_length;
   56714             : 
   56715           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56716           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56717             :         }
   56718           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56719           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56720             :         }
   56721             : 
   56722           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56723           0 :                 allow_remaining = true;
   56724             :         }
   56725             : 
   56726           0 :         return py_netr_ServerTrustPasswordsGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   56727             : }
   56728             : 
   56729           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56730             : {
   56731           0 :         DATA_BLOB blob;
   56732           0 :         Py_ssize_t blob_length = 0;
   56733           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56734           0 :         PyObject *bigendian_obj = NULL;
   56735           0 :         PyObject *ndr64_obj = NULL;
   56736           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56737           0 :         PyObject *allow_remaining_obj = NULL;
   56738           0 :         bool allow_remaining = false;
   56739             : 
   56740           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   56741             :                 discard_const_p(char *, kwnames),
   56742             :                 &blob.data, &blob_length,
   56743             :                 &bigendian_obj,
   56744             :                 &ndr64_obj,
   56745             :                 &allow_remaining_obj)) {
   56746           0 :                 return NULL;
   56747             :         }
   56748           0 :         blob.length = blob_length;
   56749             : 
   56750           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56751           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56752             :         }
   56753           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56754           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56755             :         }
   56756             : 
   56757           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56758           0 :                 allow_remaining = true;
   56759             :         }
   56760             : 
   56761           0 :         return py_netr_ServerTrustPasswordsGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   56762             : }
   56763             : 
   56764           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   56765             : {
   56766           0 :         const struct ndr_interface_call *call = NULL;
   56767           0 :         struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
   56768           0 :         PyObject *ret;
   56769           0 :         char *retstr;
   56770             : 
   56771           0 :         if (ndr_table_netlogon.num_calls < 43) {
   56772           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_print");
   56773           0 :                 return NULL;
   56774             :         }
   56775           0 :         call = &ndr_table_netlogon.calls[42];
   56776             : 
   56777           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   56778           0 :         ret = PyUnicode_FromString(retstr);
   56779           0 :         TALLOC_FREE(retstr);
   56780             : 
   56781           0 :         return ret;
   56782             : }
   56783             : 
   56784           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56785             : {
   56786           0 :         return py_netr_ServerTrustPasswordsGet_ndr_print(py_obj, "netr_ServerTrustPasswordsGet_in", NDR_IN);
   56787             : }
   56788             : 
   56789           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56790             : {
   56791           0 :         return py_netr_ServerTrustPasswordsGet_ndr_print(py_obj, "netr_ServerTrustPasswordsGet_out", NDR_OUT);
   56792             : }
   56793             : 
   56794             : static PyMethodDef py_netr_ServerTrustPasswordsGet_methods[] = {
   56795             :         { "opnum", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_opnum, METH_NOARGS|METH_CLASS,
   56796             :                 "netlogon.netr_ServerTrustPasswordsGet.opnum() -> 42 (0x2a) " },
   56797             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   56798             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   56799             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   56800             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   56801             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   56802             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   56803             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   56804             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   56805             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   56806             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   56807             :         { NULL, NULL, 0, NULL }
   56808             : };
   56809             : 
   56810             : 
   56811             : static PyTypeObject netr_ServerTrustPasswordsGet_Type = {
   56812             :         PyVarObject_HEAD_INIT(NULL, 0)
   56813             :         .tp_name = "netlogon.netr_ServerTrustPasswordsGet",
   56814             :         .tp_getset = py_netr_ServerTrustPasswordsGet_getsetters,
   56815             :         .tp_methods = py_netr_ServerTrustPasswordsGet_methods,
   56816             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   56817             :         .tp_new = py_netr_ServerTrustPasswordsGet_new,
   56818             : };
   56819             : 
   56820           0 : static bool pack_py_netr_ServerTrustPasswordsGet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerTrustPasswordsGet *r)
   56821             : {
   56822           0 :         PyObject *py_server_name;
   56823           0 :         PyObject *py_account_name;
   56824           0 :         PyObject *py_secure_channel_type;
   56825           0 :         PyObject *py_computer_name;
   56826           0 :         PyObject *py_credential;
   56827           0 :         const char *kwnames[] = {
   56828             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
   56829             :         };
   56830             : 
   56831           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)) {
   56832           0 :                 return false;
   56833             :         }
   56834             : 
   56835           0 :         if (py_server_name == NULL) {
   56836           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   56837           0 :                 return false;
   56838             :         }
   56839           0 :         if (py_server_name == Py_None) {
   56840           0 :                 r->in.server_name = NULL;
   56841             :         } else {
   56842           0 :                 r->in.server_name = NULL;
   56843             :                 {
   56844           0 :                         const char *test_str;
   56845           0 :                         const char *talloc_str;
   56846           0 :                         PyObject *unicode = NULL;
   56847           0 :                         if (PyUnicode_Check(py_server_name)) {
   56848           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   56849           0 :                                 if (unicode == NULL) {
   56850           0 :                                         return false;
   56851             :                                 }
   56852           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56853           0 :                         } else if (PyBytes_Check(py_server_name)) {
   56854           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   56855             :                         } else {
   56856           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   56857           0 :                                 return false;
   56858             :                         }
   56859           0 :                         talloc_str = talloc_strdup(r, test_str);
   56860           0 :                         if (unicode != NULL) {
   56861           0 :                                 Py_DECREF(unicode);
   56862             :                         }
   56863           0 :                         if (talloc_str == NULL) {
   56864           0 :                                 PyErr_NoMemory();
   56865           0 :                                 return false;
   56866             :                         }
   56867           0 :                         r->in.server_name = talloc_str;
   56868             :                 }
   56869             :         }
   56870           0 :         if (py_account_name == NULL) {
   56871           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   56872           0 :                 return false;
   56873             :         }
   56874           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   56875           0 :         if (r->in.account_name == NULL) {
   56876           0 :                 PyErr_NoMemory();
   56877           0 :                 return false;
   56878             :         }
   56879             :         {
   56880           0 :                 const char *test_str;
   56881           0 :                 const char *talloc_str;
   56882           0 :                 PyObject *unicode = NULL;
   56883           0 :                 if (PyUnicode_Check(py_account_name)) {
   56884           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   56885           0 :                         if (unicode == NULL) {
   56886           0 :                                 return false;
   56887             :                         }
   56888           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56889           0 :                 } else if (PyBytes_Check(py_account_name)) {
   56890           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   56891             :                 } else {
   56892           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   56893           0 :                         return false;
   56894             :                 }
   56895           0 :                 talloc_str = talloc_strdup(r, test_str);
   56896           0 :                 if (unicode != NULL) {
   56897           0 :                         Py_DECREF(unicode);
   56898             :                 }
   56899           0 :                 if (talloc_str == NULL) {
   56900           0 :                         PyErr_NoMemory();
   56901           0 :                         return false;
   56902             :                 }
   56903           0 :                 r->in.account_name = talloc_str;
   56904             :         }
   56905           0 :         if (py_secure_channel_type == NULL) {
   56906           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
   56907           0 :                 return false;
   56908             :         }
   56909             :         {
   56910           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   56911           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   56912           0 :                         unsigned long long test_var;
   56913           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   56914           0 :                         if (PyErr_Occurred() != NULL) {
   56915           0 :                                 return false;
   56916             :                         }
   56917           0 :                         if (test_var > uint_max) {
   56918           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   56919             :                                   PyLong_Type.tp_name, uint_max, test_var);
   56920           0 :                                 return false;
   56921             :                         }
   56922           0 :                         r->in.secure_channel_type = test_var;
   56923             :                 } else {
   56924           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   56925             :                           PyLong_Type.tp_name);
   56926           0 :                         return false;
   56927             :                 }
   56928             :         }
   56929           0 :         if (py_computer_name == NULL) {
   56930           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   56931           0 :                 return false;
   56932             :         }
   56933           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   56934           0 :         if (r->in.computer_name == NULL) {
   56935           0 :                 PyErr_NoMemory();
   56936           0 :                 return false;
   56937             :         }
   56938             :         {
   56939           0 :                 const char *test_str;
   56940           0 :                 const char *talloc_str;
   56941           0 :                 PyObject *unicode = NULL;
   56942           0 :                 if (PyUnicode_Check(py_computer_name)) {
   56943           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   56944           0 :                         if (unicode == NULL) {
   56945           0 :                                 return false;
   56946             :                         }
   56947           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56948           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   56949           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   56950             :                 } else {
   56951           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   56952           0 :                         return false;
   56953             :                 }
   56954           0 :                 talloc_str = talloc_strdup(r, test_str);
   56955           0 :                 if (unicode != NULL) {
   56956           0 :                         Py_DECREF(unicode);
   56957             :                 }
   56958           0 :                 if (talloc_str == NULL) {
   56959           0 :                         PyErr_NoMemory();
   56960           0 :                         return false;
   56961             :                 }
   56962           0 :                 r->in.computer_name = talloc_str;
   56963             :         }
   56964           0 :         if (py_credential == NULL) {
   56965           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   56966           0 :                 return false;
   56967             :         }
   56968           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   56969           0 :         if (r->in.credential == NULL) {
   56970           0 :                 PyErr_NoMemory();
   56971           0 :                 return false;
   56972             :         }
   56973           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   56974           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   56975           0 :                 PyErr_NoMemory();
   56976           0 :                 return false;
   56977             :         }
   56978           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   56979           0 :         return true;
   56980             : }
   56981             : 
   56982           0 : static PyObject *unpack_py_netr_ServerTrustPasswordsGet_args_out(struct netr_ServerTrustPasswordsGet *r)
   56983             : {
   56984           0 :         PyObject *result;
   56985           0 :         PyObject *py_return_authenticator;
   56986           0 :         PyObject *py_new_owf_password;
   56987           0 :         PyObject *py_old_owf_password;
   56988           0 :         result = PyTuple_New(3);
   56989           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   56990           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   56991           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.new_owf_password, r->out.new_owf_password);
   56992           0 :         PyTuple_SetItem(result, 1, py_new_owf_password);
   56993           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.old_owf_password, r->out.old_owf_password);
   56994           0 :         PyTuple_SetItem(result, 2, py_old_owf_password);
   56995           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   56996           0 :                 PyErr_SetNTSTATUS(r->out.result);
   56997           0 :                 return NULL;
   56998             :         }
   56999             : 
   57000           0 :         return result;
   57001             : }
   57002             : 
   57003             : 
   57004           0 : static PyObject *py_netr_DsRGetForestTrustInformation_in_get_server_name(PyObject *obj, void *closure)
   57005             : {
   57006           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57007           0 :         PyObject *py_server_name;
   57008           0 :         if (object->in.server_name == NULL) {
   57009           0 :                 Py_RETURN_NONE;
   57010             :         }
   57011           0 :         if (object->in.server_name == NULL) {
   57012           0 :                 py_server_name = Py_None;
   57013           0 :                 Py_INCREF(py_server_name);
   57014             :         } else {
   57015           0 :                 if (object->in.server_name == NULL) {
   57016           0 :                         py_server_name = Py_None;
   57017           0 :                         Py_INCREF(py_server_name);
   57018             :                 } else {
   57019           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   57020             :                 }
   57021             :         }
   57022           0 :         return py_server_name;
   57023             : }
   57024             : 
   57025           0 : static int py_netr_DsRGetForestTrustInformation_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   57026             : {
   57027           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57028           0 :         if (value == NULL) {
   57029           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   57030           0 :                 return -1;
   57031             :         }
   57032           0 :         if (value == Py_None) {
   57033           0 :                 object->in.server_name = NULL;
   57034             :         } else {
   57035           0 :                 object->in.server_name = NULL;
   57036             :                 {
   57037           0 :                         const char *test_str;
   57038           0 :                         const char *talloc_str;
   57039           0 :                         PyObject *unicode = NULL;
   57040           0 :                         if (PyUnicode_Check(value)) {
   57041           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57042           0 :                                 if (unicode == NULL) {
   57043           0 :                                         return -1;
   57044             :                                 }
   57045           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57046           0 :                         } else if (PyBytes_Check(value)) {
   57047           0 :                                 test_str = PyBytes_AS_STRING(value);
   57048             :                         } else {
   57049           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57050           0 :                                 return -1;
   57051             :                         }
   57052           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57053           0 :                         if (unicode != NULL) {
   57054           0 :                                 Py_DECREF(unicode);
   57055             :                         }
   57056           0 :                         if (talloc_str == NULL) {
   57057           0 :                                 PyErr_NoMemory();
   57058           0 :                                 return -1;
   57059             :                         }
   57060           0 :                         object->in.server_name = talloc_str;
   57061             :                 }
   57062             :         }
   57063           0 :         return 0;
   57064             : }
   57065             : 
   57066           0 : static PyObject *py_netr_DsRGetForestTrustInformation_in_get_trusted_domain_name(PyObject *obj, void *closure)
   57067             : {
   57068           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57069           0 :         PyObject *py_trusted_domain_name;
   57070           0 :         if (object->in.trusted_domain_name == NULL) {
   57071           0 :                 Py_RETURN_NONE;
   57072             :         }
   57073           0 :         if (object->in.trusted_domain_name == NULL) {
   57074           0 :                 py_trusted_domain_name = Py_None;
   57075           0 :                 Py_INCREF(py_trusted_domain_name);
   57076             :         } else {
   57077           0 :                 if (object->in.trusted_domain_name == NULL) {
   57078           0 :                         py_trusted_domain_name = Py_None;
   57079           0 :                         Py_INCREF(py_trusted_domain_name);
   57080             :                 } else {
   57081           0 :                         py_trusted_domain_name = PyUnicode_Decode(object->in.trusted_domain_name, strlen(object->in.trusted_domain_name), "utf-8", "ignore");
   57082             :                 }
   57083             :         }
   57084           0 :         return py_trusted_domain_name;
   57085             : }
   57086             : 
   57087           0 : static int py_netr_DsRGetForestTrustInformation_in_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   57088             : {
   57089           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57090           0 :         if (value == NULL) {
   57091           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.trusted_domain_name");
   57092           0 :                 return -1;
   57093             :         }
   57094           0 :         if (value == Py_None) {
   57095           0 :                 object->in.trusted_domain_name = NULL;
   57096             :         } else {
   57097           0 :                 object->in.trusted_domain_name = NULL;
   57098             :                 {
   57099           0 :                         const char *test_str;
   57100           0 :                         const char *talloc_str;
   57101           0 :                         PyObject *unicode = NULL;
   57102           0 :                         if (PyUnicode_Check(value)) {
   57103           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57104           0 :                                 if (unicode == NULL) {
   57105           0 :                                         return -1;
   57106             :                                 }
   57107           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57108           0 :                         } else if (PyBytes_Check(value)) {
   57109           0 :                                 test_str = PyBytes_AS_STRING(value);
   57110             :                         } else {
   57111           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57112           0 :                                 return -1;
   57113             :                         }
   57114           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57115           0 :                         if (unicode != NULL) {
   57116           0 :                                 Py_DECREF(unicode);
   57117             :                         }
   57118           0 :                         if (talloc_str == NULL) {
   57119           0 :                                 PyErr_NoMemory();
   57120           0 :                                 return -1;
   57121             :                         }
   57122           0 :                         object->in.trusted_domain_name = talloc_str;
   57123             :                 }
   57124             :         }
   57125           0 :         return 0;
   57126             : }
   57127             : 
   57128           0 : static PyObject *py_netr_DsRGetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
   57129             : {
   57130           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57131           0 :         PyObject *py_flags;
   57132           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
   57133           0 :         return py_flags;
   57134             : }
   57135             : 
   57136           0 : static int py_netr_DsRGetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   57137             : {
   57138           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57139           0 :         if (value == NULL) {
   57140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
   57141           0 :                 return -1;
   57142             :         }
   57143             :         {
   57144           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   57145           0 :                 if (PyLong_Check(value)) {
   57146           0 :                         unsigned long long test_var;
   57147           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   57148           0 :                         if (PyErr_Occurred() != NULL) {
   57149           0 :                                 return -1;
   57150             :                         }
   57151           0 :                         if (test_var > uint_max) {
   57152           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57153             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57154           0 :                                 return -1;
   57155             :                         }
   57156           0 :                         object->in.flags = test_var;
   57157             :                 } else {
   57158           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57159             :                           PyLong_Type.tp_name);
   57160           0 :                         return -1;
   57161             :                 }
   57162             :         }
   57163           0 :         return 0;
   57164             : }
   57165             : 
   57166           0 : static PyObject *py_netr_DsRGetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
   57167             : {
   57168           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57169           0 :         PyObject *py_forest_trust_info;
   57170           0 :         if (object->out.forest_trust_info == NULL) {
   57171           0 :                 Py_RETURN_NONE;
   57172             :         }
   57173           0 :         if (*object->out.forest_trust_info == NULL) {
   57174           0 :                 py_forest_trust_info = Py_None;
   57175           0 :                 Py_INCREF(py_forest_trust_info);
   57176             :         } else {
   57177           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
   57178             :         }
   57179           0 :         return py_forest_trust_info;
   57180             : }
   57181             : 
   57182           0 : static int py_netr_DsRGetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   57183             : {
   57184           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57185           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
   57186           0 :         if (value == NULL) {
   57187           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.forest_trust_info");
   57188           0 :                 return -1;
   57189             :         }
   57190           0 :         object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
   57191           0 :         if (object->out.forest_trust_info == NULL) {
   57192           0 :                 PyErr_NoMemory();
   57193           0 :                 return -1;
   57194             :         }
   57195           0 :         if (value == Py_None) {
   57196           0 :                 *object->out.forest_trust_info = NULL;
   57197             :         } else {
   57198           0 :                 *object->out.forest_trust_info = NULL;
   57199           0 :                 PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
   57200           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57201           0 :                         PyErr_NoMemory();
   57202           0 :                         return -1;
   57203             :                 }
   57204           0 :                 *object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
   57205             :         }
   57206           0 :         return 0;
   57207             : }
   57208             : 
   57209           0 : static PyObject *py_netr_DsRGetForestTrustInformation_get_result(PyObject *obj, void *closure)
   57210             : {
   57211           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57212           0 :         PyObject *py_result;
   57213           0 :         py_result = PyErr_FromWERROR(object->out.result);
   57214           0 :         return py_result;
   57215             : }
   57216             : 
   57217           0 : static int py_netr_DsRGetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
   57218             : {
   57219           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57220           0 :         if (value == NULL) {
   57221           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   57222           0 :                 return -1;
   57223             :         }
   57224           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   57225           0 :         return 0;
   57226             : }
   57227             : 
   57228             : static PyGetSetDef py_netr_DsRGetForestTrustInformation_getsetters[] = {
   57229             :         {
   57230             :                 .name = discard_const_p(char, "in_server_name"),
   57231             :                 .get = py_netr_DsRGetForestTrustInformation_in_get_server_name,
   57232             :                 .set = py_netr_DsRGetForestTrustInformation_in_set_server_name,
   57233             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57234             :         },
   57235             :         {
   57236             :                 .name = discard_const_p(char, "in_trusted_domain_name"),
   57237             :                 .get = py_netr_DsRGetForestTrustInformation_in_get_trusted_domain_name,
   57238             :                 .set = py_netr_DsRGetForestTrustInformation_in_set_trusted_domain_name,
   57239             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57240             :         },
   57241             :         {
   57242             :                 .name = discard_const_p(char, "in_flags"),
   57243             :                 .get = py_netr_DsRGetForestTrustInformation_in_get_flags,
   57244             :                 .set = py_netr_DsRGetForestTrustInformation_in_set_flags,
   57245             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   57246             :         },
   57247             :         {
   57248             :                 .name = discard_const_p(char, "out_forest_trust_info"),
   57249             :                 .get = py_netr_DsRGetForestTrustInformation_out_get_forest_trust_info,
   57250             :                 .set = py_netr_DsRGetForestTrustInformation_out_set_forest_trust_info,
   57251             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
   57252             :         },
   57253             :         {
   57254             :                 .name = discard_const_p(char, "result"),
   57255             :                 .get = py_netr_DsRGetForestTrustInformation_get_result,
   57256             :                 .set = py_netr_DsRGetForestTrustInformation_set_result,
   57257             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   57258             :         },
   57259             :         { .name = NULL }
   57260             : };
   57261             : 
   57262           0 : static PyObject *py_netr_DsRGetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   57263             : {
   57264           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetForestTrustInformation, type);
   57265           0 :         struct netr_DsRGetForestTrustInformation *_self = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(self);
   57266           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   57267             :         /* a pointer to a NULL pointer */
   57268           0 :         _self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
   57269           0 :         return self;
   57270             : }
   57271             : 
   57272           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   57273             : {
   57274             : 
   57275             : 
   57276           0 :         return PyLong_FromLong(43);
   57277             : }
   57278             : 
   57279           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   57280             : {
   57281           0 :         const struct ndr_interface_call *call = NULL;
   57282           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57283           0 :         PyObject *ret = NULL;
   57284           0 :         struct ndr_push *push = NULL;
   57285           0 :         DATA_BLOB blob;
   57286           0 :         enum ndr_err_code err;
   57287             : 
   57288           0 :         if (ndr_table_netlogon.num_calls < 44) {
   57289           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_pack");
   57290           0 :                 return NULL;
   57291             :         }
   57292           0 :         call = &ndr_table_netlogon.calls[43];
   57293             : 
   57294           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   57295           0 :         if (push == NULL) {
   57296           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57297           0 :                 return NULL;
   57298             :         }
   57299             : 
   57300           0 :         push->flags |= ndr_push_flags;
   57301             : 
   57302           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   57303           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57304           0 :                 TALLOC_FREE(push);
   57305           0 :                 PyErr_SetNdrError(err);
   57306           0 :                 return NULL;
   57307             :         }
   57308           0 :         blob = ndr_push_blob(push);
   57309           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   57310           0 :         TALLOC_FREE(push);
   57311           0 :         return ret;
   57312             : }
   57313             : 
   57314           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57315             : {
   57316           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57317           0 :         PyObject *bigendian_obj = NULL;
   57318           0 :         PyObject *ndr64_obj = NULL;
   57319           0 :         libndr_flags ndr_push_flags = 0;
   57320             : 
   57321           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   57322             :                 discard_const_p(char *, kwnames),
   57323             :                 &bigendian_obj,
   57324             :                 &ndr64_obj)) {
   57325           0 :                 return NULL;
   57326             :         }
   57327             : 
   57328           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57329           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57330             :         }
   57331           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57332           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57333             :         }
   57334             : 
   57335           0 :         return py_netr_DsRGetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   57336             : }
   57337             : 
   57338           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57339             : {
   57340           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57341           0 :         PyObject *bigendian_obj = NULL;
   57342           0 :         PyObject *ndr64_obj = NULL;
   57343           0 :         libndr_flags ndr_push_flags = 0;
   57344             : 
   57345           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   57346             :                 discard_const_p(char *, kwnames),
   57347             :                 &bigendian_obj,
   57348             :                 &ndr64_obj)) {
   57349           0 :                 return NULL;
   57350             :         }
   57351             : 
   57352           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57353           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57354             :         }
   57355           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57356           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57357             :         }
   57358             : 
   57359           0 :         return py_netr_DsRGetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   57360             : }
   57361             : 
   57362           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   57363             : {
   57364           0 :         const struct ndr_interface_call *call = NULL;
   57365           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57366           0 :         struct ndr_pull *pull = NULL;
   57367           0 :         enum ndr_err_code err;
   57368             : 
   57369           0 :         if (ndr_table_netlogon.num_calls < 44) {
   57370           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_unpack");
   57371           0 :                 return NULL;
   57372             :         }
   57373           0 :         call = &ndr_table_netlogon.calls[43];
   57374             : 
   57375           0 :         pull = ndr_pull_init_blob(blob, object);
   57376           0 :         if (pull == NULL) {
   57377           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57378           0 :                 return NULL;
   57379             :         }
   57380             : 
   57381           0 :         pull->flags |= ndr_pull_flags;
   57382             : 
   57383           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   57384           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57385           0 :                 TALLOC_FREE(pull);
   57386           0 :                 PyErr_SetNdrError(err);
   57387           0 :                 return NULL;
   57388             :         }
   57389           0 :         if (!allow_remaining) {
   57390           0 :                 uint32_t highest_ofs;
   57391             : 
   57392           0 :                 if (pull->offset > pull->relative_highest_offset) {
   57393           0 :                         highest_ofs = pull->offset;
   57394             :                 } else {
   57395           0 :                         highest_ofs = pull->relative_highest_offset;
   57396             :                 }
   57397           0 :                 if (highest_ofs < pull->data_size) {
   57398           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   57399             :                                 "not all bytes consumed ofs[%u] size[%u]",
   57400             :                                 highest_ofs, pull->data_size);
   57401           0 :                         TALLOC_FREE(pull);
   57402           0 :                         PyErr_SetNdrError(err);
   57403           0 :                         return NULL;
   57404             :                 }
   57405             :         }
   57406             : 
   57407           0 :         TALLOC_FREE(pull);
   57408           0 :         Py_RETURN_NONE;
   57409             : }
   57410             : 
   57411           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57412             : {
   57413           0 :         DATA_BLOB blob;
   57414           0 :         Py_ssize_t blob_length = 0;
   57415           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57416           0 :         PyObject *bigendian_obj = NULL;
   57417           0 :         PyObject *ndr64_obj = NULL;
   57418           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57419           0 :         PyObject *allow_remaining_obj = NULL;
   57420           0 :         bool allow_remaining = false;
   57421             : 
   57422           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   57423             :                 discard_const_p(char *, kwnames),
   57424             :                 &blob.data, &blob_length,
   57425             :                 &bigendian_obj,
   57426             :                 &ndr64_obj,
   57427             :                 &allow_remaining_obj)) {
   57428           0 :                 return NULL;
   57429             :         }
   57430           0 :         blob.length = blob_length;
   57431             : 
   57432           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57433           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57434             :         }
   57435           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57436           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57437             :         }
   57438             : 
   57439           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57440           0 :                 allow_remaining = true;
   57441             :         }
   57442             : 
   57443           0 :         return py_netr_DsRGetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   57444             : }
   57445             : 
   57446           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57447             : {
   57448           0 :         DATA_BLOB blob;
   57449           0 :         Py_ssize_t blob_length = 0;
   57450           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57451           0 :         PyObject *bigendian_obj = NULL;
   57452           0 :         PyObject *ndr64_obj = NULL;
   57453           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57454           0 :         PyObject *allow_remaining_obj = NULL;
   57455           0 :         bool allow_remaining = false;
   57456             : 
   57457           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   57458             :                 discard_const_p(char *, kwnames),
   57459             :                 &blob.data, &blob_length,
   57460             :                 &bigendian_obj,
   57461             :                 &ndr64_obj,
   57462             :                 &allow_remaining_obj)) {
   57463           0 :                 return NULL;
   57464             :         }
   57465           0 :         blob.length = blob_length;
   57466             : 
   57467           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57468           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57469             :         }
   57470           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57471           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57472             :         }
   57473             : 
   57474           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57475           0 :                 allow_remaining = true;
   57476             :         }
   57477             : 
   57478           0 :         return py_netr_DsRGetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   57479             : }
   57480             : 
   57481           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   57482             : {
   57483           0 :         const struct ndr_interface_call *call = NULL;
   57484           0 :         struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57485           0 :         PyObject *ret;
   57486           0 :         char *retstr;
   57487             : 
   57488           0 :         if (ndr_table_netlogon.num_calls < 44) {
   57489           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_print");
   57490           0 :                 return NULL;
   57491             :         }
   57492           0 :         call = &ndr_table_netlogon.calls[43];
   57493             : 
   57494           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   57495           0 :         ret = PyUnicode_FromString(retstr);
   57496           0 :         TALLOC_FREE(retstr);
   57497             : 
   57498           0 :         return ret;
   57499             : }
   57500             : 
   57501           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57502             : {
   57503           0 :         return py_netr_DsRGetForestTrustInformation_ndr_print(py_obj, "netr_DsRGetForestTrustInformation_in", NDR_IN);
   57504             : }
   57505             : 
   57506           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57507             : {
   57508           0 :         return py_netr_DsRGetForestTrustInformation_ndr_print(py_obj, "netr_DsRGetForestTrustInformation_out", NDR_OUT);
   57509             : }
   57510             : 
   57511             : static PyMethodDef py_netr_DsRGetForestTrustInformation_methods[] = {
   57512             :         { "opnum", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
   57513             :                 "netlogon.netr_DsRGetForestTrustInformation.opnum() -> 43 (0x2b) " },
   57514             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   57515             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   57516             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   57517             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   57518             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   57519             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   57520             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   57521             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   57522             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   57523             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   57524             :         { NULL, NULL, 0, NULL }
   57525             : };
   57526             : 
   57527             : 
   57528             : static PyTypeObject netr_DsRGetForestTrustInformation_Type = {
   57529             :         PyVarObject_HEAD_INIT(NULL, 0)
   57530             :         .tp_name = "netlogon.netr_DsRGetForestTrustInformation",
   57531             :         .tp_getset = py_netr_DsRGetForestTrustInformation_getsetters,
   57532             :         .tp_methods = py_netr_DsRGetForestTrustInformation_methods,
   57533             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   57534             :         .tp_new = py_netr_DsRGetForestTrustInformation_new,
   57535             : };
   57536             : 
   57537         158 : static bool pack_py_netr_DsRGetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetForestTrustInformation *r)
   57538             : {
   57539           4 :         PyObject *py_server_name;
   57540           4 :         PyObject *py_trusted_domain_name;
   57541           4 :         PyObject *py_flags;
   57542         158 :         const char *kwnames[] = {
   57543             :                 "server_name", "trusted_domain_name", "flags", NULL
   57544             :         };
   57545             : 
   57546         158 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_DsRGetForestTrustInformation", discard_const_p(char *, kwnames), &py_server_name, &py_trusted_domain_name, &py_flags)) {
   57547           0 :                 return false;
   57548             :         }
   57549             : 
   57550         158 :         if (py_server_name == NULL) {
   57551           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   57552           0 :                 return false;
   57553             :         }
   57554         158 :         if (py_server_name == Py_None) {
   57555           0 :                 r->in.server_name = NULL;
   57556             :         } else {
   57557         158 :                 r->in.server_name = NULL;
   57558             :                 {
   57559           4 :                         const char *test_str;
   57560           4 :                         const char *talloc_str;
   57561         158 :                         PyObject *unicode = NULL;
   57562         158 :                         if (PyUnicode_Check(py_server_name)) {
   57563         158 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   57564         158 :                                 if (unicode == NULL) {
   57565           0 :                                         return false;
   57566             :                                 }
   57567         158 :                                 test_str = PyBytes_AS_STRING(unicode);
   57568           0 :                         } else if (PyBytes_Check(py_server_name)) {
   57569           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   57570             :                         } else {
   57571           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   57572           0 :                                 return false;
   57573             :                         }
   57574         158 :                         talloc_str = talloc_strdup(r, test_str);
   57575         158 :                         if (unicode != NULL) {
   57576          92 :                                 Py_DECREF(unicode);
   57577             :                         }
   57578         158 :                         if (talloc_str == NULL) {
   57579           0 :                                 PyErr_NoMemory();
   57580           0 :                                 return false;
   57581             :                         }
   57582         158 :                         r->in.server_name = talloc_str;
   57583             :                 }
   57584             :         }
   57585         158 :         if (py_trusted_domain_name == NULL) {
   57586           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.trusted_domain_name");
   57587           0 :                 return false;
   57588             :         }
   57589         158 :         if (py_trusted_domain_name == Py_None) {
   57590         138 :                 r->in.trusted_domain_name = NULL;
   57591             :         } else {
   57592          20 :                 r->in.trusted_domain_name = NULL;
   57593             :                 {
   57594           0 :                         const char *test_str;
   57595           0 :                         const char *talloc_str;
   57596          20 :                         PyObject *unicode = NULL;
   57597          20 :                         if (PyUnicode_Check(py_trusted_domain_name)) {
   57598          20 :                                 unicode = PyUnicode_AsEncodedString(py_trusted_domain_name, "utf-8", "ignore");
   57599          20 :                                 if (unicode == NULL) {
   57600           0 :                                         return false;
   57601             :                                 }
   57602          20 :                                 test_str = PyBytes_AS_STRING(unicode);
   57603           0 :                         } else if (PyBytes_Check(py_trusted_domain_name)) {
   57604           0 :                                 test_str = PyBytes_AS_STRING(py_trusted_domain_name);
   57605             :                         } else {
   57606           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_trusted_domain_name)->tp_name);
   57607           0 :                                 return false;
   57608             :                         }
   57609          20 :                         talloc_str = talloc_strdup(r, test_str);
   57610          20 :                         if (unicode != NULL) {
   57611          10 :                                 Py_DECREF(unicode);
   57612             :                         }
   57613          20 :                         if (talloc_str == NULL) {
   57614           0 :                                 PyErr_NoMemory();
   57615           0 :                                 return false;
   57616             :                         }
   57617          20 :                         r->in.trusted_domain_name = talloc_str;
   57618             :                 }
   57619             :         }
   57620         158 :         if (py_flags == NULL) {
   57621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
   57622           0 :                 return false;
   57623             :         }
   57624             :         {
   57625         158 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   57626         158 :                 if (PyLong_Check(py_flags)) {
   57627           4 :                         unsigned long long test_var;
   57628         158 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   57629         158 :                         if (PyErr_Occurred() != NULL) {
   57630           0 :                                 return false;
   57631             :                         }
   57632         158 :                         if (test_var > uint_max) {
   57633           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57634             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57635           0 :                                 return false;
   57636             :                         }
   57637         158 :                         r->in.flags = test_var;
   57638             :                 } else {
   57639           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57640             :                           PyLong_Type.tp_name);
   57641           0 :                         return false;
   57642             :                 }
   57643             :         }
   57644         158 :         return true;
   57645             : }
   57646             : 
   57647         158 : static PyObject *unpack_py_netr_DsRGetForestTrustInformation_args_out(struct netr_DsRGetForestTrustInformation *r)
   57648             : {
   57649           4 :         PyObject *result;
   57650           4 :         PyObject *py_forest_trust_info;
   57651         158 :         if (*r->out.forest_trust_info == NULL) {
   57652           4 :                 py_forest_trust_info = Py_None;
   57653           2 :                 Py_INCREF(py_forest_trust_info);
   57654             :         } else {
   57655         154 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
   57656             :         }
   57657         158 :         result = py_forest_trust_info;
   57658         158 :         if (!W_ERROR_IS_OK(r->out.result)) {
   57659           4 :                 PyErr_SetWERROR(r->out.result);
   57660           4 :                 return NULL;
   57661             :         }
   57662             : 
   57663         150 :         return result;
   57664             : }
   57665             : 
   57666             : 
   57667           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_server_name(PyObject *obj, void *closure)
   57668             : {
   57669           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57670           0 :         PyObject *py_server_name;
   57671           0 :         if (object->in.server_name == NULL) {
   57672           0 :                 Py_RETURN_NONE;
   57673             :         }
   57674           0 :         if (object->in.server_name == NULL) {
   57675           0 :                 py_server_name = Py_None;
   57676           0 :                 Py_INCREF(py_server_name);
   57677             :         } else {
   57678           0 :                 if (object->in.server_name == NULL) {
   57679           0 :                         py_server_name = Py_None;
   57680           0 :                         Py_INCREF(py_server_name);
   57681             :                 } else {
   57682           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   57683             :                 }
   57684             :         }
   57685           0 :         return py_server_name;
   57686             : }
   57687             : 
   57688           0 : static int py_netr_GetForestTrustInformation_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   57689             : {
   57690           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57691           0 :         if (value == NULL) {
   57692           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   57693           0 :                 return -1;
   57694             :         }
   57695           0 :         if (value == Py_None) {
   57696           0 :                 object->in.server_name = NULL;
   57697             :         } else {
   57698           0 :                 object->in.server_name = NULL;
   57699             :                 {
   57700           0 :                         const char *test_str;
   57701           0 :                         const char *talloc_str;
   57702           0 :                         PyObject *unicode = NULL;
   57703           0 :                         if (PyUnicode_Check(value)) {
   57704           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57705           0 :                                 if (unicode == NULL) {
   57706           0 :                                         return -1;
   57707             :                                 }
   57708           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57709           0 :                         } else if (PyBytes_Check(value)) {
   57710           0 :                                 test_str = PyBytes_AS_STRING(value);
   57711             :                         } else {
   57712           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57713           0 :                                 return -1;
   57714             :                         }
   57715           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57716           0 :                         if (unicode != NULL) {
   57717           0 :                                 Py_DECREF(unicode);
   57718             :                         }
   57719           0 :                         if (talloc_str == NULL) {
   57720           0 :                                 PyErr_NoMemory();
   57721           0 :                                 return -1;
   57722             :                         }
   57723           0 :                         object->in.server_name = talloc_str;
   57724             :                 }
   57725             :         }
   57726           0 :         return 0;
   57727             : }
   57728             : 
   57729           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_computer_name(PyObject *obj, void *closure)
   57730             : {
   57731           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57732           0 :         PyObject *py_computer_name;
   57733           0 :         if (object->in.computer_name == NULL) {
   57734           0 :                 Py_RETURN_NONE;
   57735             :         }
   57736           0 :         if (object->in.computer_name == NULL) {
   57737           0 :                 py_computer_name = Py_None;
   57738           0 :                 Py_INCREF(py_computer_name);
   57739             :         } else {
   57740           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   57741             :         }
   57742           0 :         return py_computer_name;
   57743             : }
   57744             : 
   57745           0 : static int py_netr_GetForestTrustInformation_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   57746             : {
   57747           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57748           0 :         if (value == NULL) {
   57749           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   57750           0 :                 return -1;
   57751             :         }
   57752           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   57753           0 :         if (object->in.computer_name == NULL) {
   57754           0 :                 PyErr_NoMemory();
   57755           0 :                 return -1;
   57756             :         }
   57757             :         {
   57758           0 :                 const char *test_str;
   57759           0 :                 const char *talloc_str;
   57760           0 :                 PyObject *unicode = NULL;
   57761           0 :                 if (PyUnicode_Check(value)) {
   57762           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57763           0 :                         if (unicode == NULL) {
   57764           0 :                                 return -1;
   57765             :                         }
   57766           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57767           0 :                 } else if (PyBytes_Check(value)) {
   57768           0 :                         test_str = PyBytes_AS_STRING(value);
   57769             :                 } else {
   57770           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57771           0 :                         return -1;
   57772             :                 }
   57773           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57774           0 :                 if (unicode != NULL) {
   57775           0 :                         Py_DECREF(unicode);
   57776             :                 }
   57777           0 :                 if (talloc_str == NULL) {
   57778           0 :                         PyErr_NoMemory();
   57779           0 :                         return -1;
   57780             :                 }
   57781           0 :                 object->in.computer_name = talloc_str;
   57782             :         }
   57783           0 :         return 0;
   57784             : }
   57785             : 
   57786           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_credential(PyObject *obj, void *closure)
   57787             : {
   57788           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57789           0 :         PyObject *py_credential;
   57790           0 :         if (object->in.credential == NULL) {
   57791           0 :                 Py_RETURN_NONE;
   57792             :         }
   57793           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   57794           0 :         return py_credential;
   57795             : }
   57796             : 
   57797           0 : static int py_netr_GetForestTrustInformation_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   57798             : {
   57799           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57800           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   57801           0 :         if (value == NULL) {
   57802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   57803           0 :                 return -1;
   57804             :         }
   57805           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   57806           0 :         if (object->in.credential == NULL) {
   57807           0 :                 PyErr_NoMemory();
   57808           0 :                 return -1;
   57809             :         }
   57810           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   57811           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57812           0 :                 PyErr_NoMemory();
   57813           0 :                 return -1;
   57814             :         }
   57815           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   57816           0 :         return 0;
   57817             : }
   57818             : 
   57819           0 : static PyObject *py_netr_GetForestTrustInformation_out_get_return_authenticator(PyObject *obj, void *closure)
   57820             : {
   57821           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57822           0 :         PyObject *py_return_authenticator;
   57823           0 :         if (object->out.return_authenticator == NULL) {
   57824           0 :                 Py_RETURN_NONE;
   57825             :         }
   57826           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   57827           0 :         return py_return_authenticator;
   57828             : }
   57829             : 
   57830           0 : static int py_netr_GetForestTrustInformation_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   57831             : {
   57832           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57833           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   57834           0 :         if (value == NULL) {
   57835           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   57836           0 :                 return -1;
   57837             :         }
   57838           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   57839           0 :         if (object->out.return_authenticator == NULL) {
   57840           0 :                 PyErr_NoMemory();
   57841           0 :                 return -1;
   57842             :         }
   57843           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   57844           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57845           0 :                 PyErr_NoMemory();
   57846           0 :                 return -1;
   57847             :         }
   57848           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   57849           0 :         return 0;
   57850             : }
   57851             : 
   57852           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
   57853             : {
   57854           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57855           0 :         PyObject *py_flags;
   57856           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
   57857           0 :         return py_flags;
   57858             : }
   57859             : 
   57860           0 : static int py_netr_GetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   57861             : {
   57862           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57863           0 :         if (value == NULL) {
   57864           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
   57865           0 :                 return -1;
   57866             :         }
   57867             :         {
   57868           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   57869           0 :                 if (PyLong_Check(value)) {
   57870           0 :                         unsigned long long test_var;
   57871           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   57872           0 :                         if (PyErr_Occurred() != NULL) {
   57873           0 :                                 return -1;
   57874             :                         }
   57875           0 :                         if (test_var > uint_max) {
   57876           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57877             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57878           0 :                                 return -1;
   57879             :                         }
   57880           0 :                         object->in.flags = test_var;
   57881             :                 } else {
   57882           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57883             :                           PyLong_Type.tp_name);
   57884           0 :                         return -1;
   57885             :                 }
   57886             :         }
   57887           0 :         return 0;
   57888             : }
   57889             : 
   57890           0 : static PyObject *py_netr_GetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
   57891             : {
   57892           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57893           0 :         PyObject *py_forest_trust_info;
   57894           0 :         if (object->out.forest_trust_info == NULL) {
   57895           0 :                 Py_RETURN_NONE;
   57896             :         }
   57897           0 :         if (*object->out.forest_trust_info == NULL) {
   57898           0 :                 py_forest_trust_info = Py_None;
   57899           0 :                 Py_INCREF(py_forest_trust_info);
   57900             :         } else {
   57901           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
   57902             :         }
   57903           0 :         return py_forest_trust_info;
   57904             : }
   57905             : 
   57906           0 : static int py_netr_GetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   57907             : {
   57908           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57909           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
   57910           0 :         if (value == NULL) {
   57911           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.forest_trust_info");
   57912           0 :                 return -1;
   57913             :         }
   57914           0 :         object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
   57915           0 :         if (object->out.forest_trust_info == NULL) {
   57916           0 :                 PyErr_NoMemory();
   57917           0 :                 return -1;
   57918             :         }
   57919           0 :         if (value == Py_None) {
   57920           0 :                 *object->out.forest_trust_info = NULL;
   57921             :         } else {
   57922           0 :                 *object->out.forest_trust_info = NULL;
   57923           0 :                 PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
   57924           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57925           0 :                         PyErr_NoMemory();
   57926           0 :                         return -1;
   57927             :                 }
   57928           0 :                 *object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
   57929             :         }
   57930           0 :         return 0;
   57931             : }
   57932             : 
   57933           0 : static PyObject *py_netr_GetForestTrustInformation_get_result(PyObject *obj, void *closure)
   57934             : {
   57935           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
   57936           0 :         PyObject *py_result;
   57937           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   57938           0 :         return py_result;
   57939             : }
   57940             : 
   57941           0 : static int py_netr_GetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
   57942             : {
   57943           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   57944           0 :         if (value == NULL) {
   57945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   57946           0 :                 return -1;
   57947             :         }
   57948           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   57949           0 :         return 0;
   57950             : }
   57951             : 
   57952             : static PyGetSetDef py_netr_GetForestTrustInformation_getsetters[] = {
   57953             :         {
   57954             :                 .name = discard_const_p(char, "in_server_name"),
   57955             :                 .get = py_netr_GetForestTrustInformation_in_get_server_name,
   57956             :                 .set = py_netr_GetForestTrustInformation_in_set_server_name,
   57957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57958             :         },
   57959             :         {
   57960             :                 .name = discard_const_p(char, "in_computer_name"),
   57961             :                 .get = py_netr_GetForestTrustInformation_in_get_computer_name,
   57962             :                 .set = py_netr_GetForestTrustInformation_in_set_computer_name,
   57963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57964             :         },
   57965             :         {
   57966             :                 .name = discard_const_p(char, "in_credential"),
   57967             :                 .get = py_netr_GetForestTrustInformation_in_get_credential,
   57968             :                 .set = py_netr_GetForestTrustInformation_in_set_credential,
   57969             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   57970             :         },
   57971             :         {
   57972             :                 .name = discard_const_p(char, "out_return_authenticator"),
   57973             :                 .get = py_netr_GetForestTrustInformation_out_get_return_authenticator,
   57974             :                 .set = py_netr_GetForestTrustInformation_out_set_return_authenticator,
   57975             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   57976             :         },
   57977             :         {
   57978             :                 .name = discard_const_p(char, "in_flags"),
   57979             :                 .get = py_netr_GetForestTrustInformation_in_get_flags,
   57980             :                 .set = py_netr_GetForestTrustInformation_in_set_flags,
   57981             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   57982             :         },
   57983             :         {
   57984             :                 .name = discard_const_p(char, "out_forest_trust_info"),
   57985             :                 .get = py_netr_GetForestTrustInformation_out_get_forest_trust_info,
   57986             :                 .set = py_netr_GetForestTrustInformation_out_set_forest_trust_info,
   57987             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
   57988             :         },
   57989             :         {
   57990             :                 .name = discard_const_p(char, "result"),
   57991             :                 .get = py_netr_GetForestTrustInformation_get_result,
   57992             :                 .set = py_netr_GetForestTrustInformation_set_result,
   57993             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   57994             :         },
   57995             :         { .name = NULL }
   57996             : };
   57997             : 
   57998           0 : static PyObject *py_netr_GetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   57999             : {
   58000           0 :         PyObject *self = pytalloc_new(struct netr_GetForestTrustInformation, type);
   58001           0 :         struct netr_GetForestTrustInformation *_self = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(self);
   58002           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   58003           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   58004           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   58005             :         /* a pointer to a NULL pointer */
   58006           0 :         _self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
   58007           0 :         return self;
   58008             : }
   58009             : 
   58010           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   58011             : {
   58012             : 
   58013             : 
   58014           0 :         return PyLong_FromLong(44);
   58015             : }
   58016             : 
   58017           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   58018             : {
   58019           0 :         const struct ndr_interface_call *call = NULL;
   58020           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   58021           0 :         PyObject *ret = NULL;
   58022           0 :         struct ndr_push *push = NULL;
   58023           0 :         DATA_BLOB blob;
   58024           0 :         enum ndr_err_code err;
   58025             : 
   58026           0 :         if (ndr_table_netlogon.num_calls < 45) {
   58027           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_pack");
   58028           0 :                 return NULL;
   58029             :         }
   58030           0 :         call = &ndr_table_netlogon.calls[44];
   58031             : 
   58032           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   58033           0 :         if (push == NULL) {
   58034           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58035           0 :                 return NULL;
   58036             :         }
   58037             : 
   58038           0 :         push->flags |= ndr_push_flags;
   58039             : 
   58040           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   58041           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   58042           0 :                 TALLOC_FREE(push);
   58043           0 :                 PyErr_SetNdrError(err);
   58044           0 :                 return NULL;
   58045             :         }
   58046           0 :         blob = ndr_push_blob(push);
   58047           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   58048           0 :         TALLOC_FREE(push);
   58049           0 :         return ret;
   58050             : }
   58051             : 
   58052           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58053             : {
   58054           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   58055           0 :         PyObject *bigendian_obj = NULL;
   58056           0 :         PyObject *ndr64_obj = NULL;
   58057           0 :         libndr_flags ndr_push_flags = 0;
   58058             : 
   58059           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   58060             :                 discard_const_p(char *, kwnames),
   58061             :                 &bigendian_obj,
   58062             :                 &ndr64_obj)) {
   58063           0 :                 return NULL;
   58064             :         }
   58065             : 
   58066           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58067           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   58068             :         }
   58069           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58070           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   58071             :         }
   58072             : 
   58073           0 :         return py_netr_GetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   58074             : }
   58075             : 
   58076           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58077             : {
   58078           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   58079           0 :         PyObject *bigendian_obj = NULL;
   58080           0 :         PyObject *ndr64_obj = NULL;
   58081           0 :         libndr_flags ndr_push_flags = 0;
   58082             : 
   58083           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   58084             :                 discard_const_p(char *, kwnames),
   58085             :                 &bigendian_obj,
   58086             :                 &ndr64_obj)) {
   58087           0 :                 return NULL;
   58088             :         }
   58089             : 
   58090           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58091           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   58092             :         }
   58093           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58094           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   58095             :         }
   58096             : 
   58097           0 :         return py_netr_GetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   58098             : }
   58099             : 
   58100           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   58101             : {
   58102           0 :         const struct ndr_interface_call *call = NULL;
   58103           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   58104           0 :         struct ndr_pull *pull = NULL;
   58105           0 :         enum ndr_err_code err;
   58106             : 
   58107           0 :         if (ndr_table_netlogon.num_calls < 45) {
   58108           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_unpack");
   58109           0 :                 return NULL;
   58110             :         }
   58111           0 :         call = &ndr_table_netlogon.calls[44];
   58112             : 
   58113           0 :         pull = ndr_pull_init_blob(blob, object);
   58114           0 :         if (pull == NULL) {
   58115           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58116           0 :                 return NULL;
   58117             :         }
   58118             : 
   58119           0 :         pull->flags |= ndr_pull_flags;
   58120             : 
   58121           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   58122           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   58123           0 :                 TALLOC_FREE(pull);
   58124           0 :                 PyErr_SetNdrError(err);
   58125           0 :                 return NULL;
   58126             :         }
   58127           0 :         if (!allow_remaining) {
   58128           0 :                 uint32_t highest_ofs;
   58129             : 
   58130           0 :                 if (pull->offset > pull->relative_highest_offset) {
   58131           0 :                         highest_ofs = pull->offset;
   58132             :                 } else {
   58133           0 :                         highest_ofs = pull->relative_highest_offset;
   58134             :                 }
   58135           0 :                 if (highest_ofs < pull->data_size) {
   58136           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   58137             :                                 "not all bytes consumed ofs[%u] size[%u]",
   58138             :                                 highest_ofs, pull->data_size);
   58139           0 :                         TALLOC_FREE(pull);
   58140           0 :                         PyErr_SetNdrError(err);
   58141           0 :                         return NULL;
   58142             :                 }
   58143             :         }
   58144             : 
   58145           0 :         TALLOC_FREE(pull);
   58146           0 :         Py_RETURN_NONE;
   58147             : }
   58148             : 
   58149           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58150             : {
   58151           0 :         DATA_BLOB blob;
   58152           0 :         Py_ssize_t blob_length = 0;
   58153           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58154           0 :         PyObject *bigendian_obj = NULL;
   58155           0 :         PyObject *ndr64_obj = NULL;
   58156           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58157           0 :         PyObject *allow_remaining_obj = NULL;
   58158           0 :         bool allow_remaining = false;
   58159             : 
   58160           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   58161             :                 discard_const_p(char *, kwnames),
   58162             :                 &blob.data, &blob_length,
   58163             :                 &bigendian_obj,
   58164             :                 &ndr64_obj,
   58165             :                 &allow_remaining_obj)) {
   58166           0 :                 return NULL;
   58167             :         }
   58168           0 :         blob.length = blob_length;
   58169             : 
   58170           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58171           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58172             :         }
   58173           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58174           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58175             :         }
   58176             : 
   58177           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58178           0 :                 allow_remaining = true;
   58179             :         }
   58180             : 
   58181           0 :         return py_netr_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   58182             : }
   58183             : 
   58184           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58185             : {
   58186           0 :         DATA_BLOB blob;
   58187           0 :         Py_ssize_t blob_length = 0;
   58188           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58189           0 :         PyObject *bigendian_obj = NULL;
   58190           0 :         PyObject *ndr64_obj = NULL;
   58191           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58192           0 :         PyObject *allow_remaining_obj = NULL;
   58193           0 :         bool allow_remaining = false;
   58194             : 
   58195           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   58196             :                 discard_const_p(char *, kwnames),
   58197             :                 &blob.data, &blob_length,
   58198             :                 &bigendian_obj,
   58199             :                 &ndr64_obj,
   58200             :                 &allow_remaining_obj)) {
   58201           0 :                 return NULL;
   58202             :         }
   58203           0 :         blob.length = blob_length;
   58204             : 
   58205           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58206           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58207             :         }
   58208           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58209           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58210             :         }
   58211             : 
   58212           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58213           0 :                 allow_remaining = true;
   58214             :         }
   58215             : 
   58216           0 :         return py_netr_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   58217             : }
   58218             : 
   58219           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   58220             : {
   58221           0 :         const struct ndr_interface_call *call = NULL;
   58222           0 :         struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
   58223           0 :         PyObject *ret;
   58224           0 :         char *retstr;
   58225             : 
   58226           0 :         if (ndr_table_netlogon.num_calls < 45) {
   58227           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_print");
   58228           0 :                 return NULL;
   58229             :         }
   58230           0 :         call = &ndr_table_netlogon.calls[44];
   58231             : 
   58232           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   58233           0 :         ret = PyUnicode_FromString(retstr);
   58234           0 :         TALLOC_FREE(retstr);
   58235             : 
   58236           0 :         return ret;
   58237             : }
   58238             : 
   58239           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58240             : {
   58241           0 :         return py_netr_GetForestTrustInformation_ndr_print(py_obj, "netr_GetForestTrustInformation_in", NDR_IN);
   58242             : }
   58243             : 
   58244           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58245             : {
   58246           0 :         return py_netr_GetForestTrustInformation_ndr_print(py_obj, "netr_GetForestTrustInformation_out", NDR_OUT);
   58247             : }
   58248             : 
   58249             : static PyMethodDef py_netr_GetForestTrustInformation_methods[] = {
   58250             :         { "opnum", (PyCFunction)py_netr_GetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
   58251             :                 "netlogon.netr_GetForestTrustInformation.opnum() -> 44 (0x2c) " },
   58252             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   58253             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   58254             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   58255             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   58256             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   58257             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   58258             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   58259             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   58260             :         { "__ndr_print_in__", (PyCFunction)py_netr_GetForestTrustInformation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   58261             :         { "__ndr_print_out__", (PyCFunction)py_netr_GetForestTrustInformation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   58262             :         { NULL, NULL, 0, NULL }
   58263             : };
   58264             : 
   58265             : 
   58266             : static PyTypeObject netr_GetForestTrustInformation_Type = {
   58267             :         PyVarObject_HEAD_INIT(NULL, 0)
   58268             :         .tp_name = "netlogon.netr_GetForestTrustInformation",
   58269             :         .tp_getset = py_netr_GetForestTrustInformation_getsetters,
   58270             :         .tp_methods = py_netr_GetForestTrustInformation_methods,
   58271             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   58272             :         .tp_new = py_netr_GetForestTrustInformation_new,
   58273             : };
   58274             : 
   58275           0 : static bool pack_py_netr_GetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct netr_GetForestTrustInformation *r)
   58276             : {
   58277           0 :         PyObject *py_server_name;
   58278           0 :         PyObject *py_computer_name;
   58279           0 :         PyObject *py_credential;
   58280           0 :         PyObject *py_flags;
   58281           0 :         const char *kwnames[] = {
   58282             :                 "server_name", "computer_name", "credential", "flags", NULL
   58283             :         };
   58284             : 
   58285           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_GetForestTrustInformation", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_flags)) {
   58286           0 :                 return false;
   58287             :         }
   58288             : 
   58289           0 :         if (py_server_name == NULL) {
   58290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   58291           0 :                 return false;
   58292             :         }
   58293           0 :         if (py_server_name == Py_None) {
   58294           0 :                 r->in.server_name = NULL;
   58295             :         } else {
   58296           0 :                 r->in.server_name = NULL;
   58297             :                 {
   58298           0 :                         const char *test_str;
   58299           0 :                         const char *talloc_str;
   58300           0 :                         PyObject *unicode = NULL;
   58301           0 :                         if (PyUnicode_Check(py_server_name)) {
   58302           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   58303           0 :                                 if (unicode == NULL) {
   58304           0 :                                         return false;
   58305             :                                 }
   58306           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58307           0 :                         } else if (PyBytes_Check(py_server_name)) {
   58308           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   58309             :                         } else {
   58310           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   58311           0 :                                 return false;
   58312             :                         }
   58313           0 :                         talloc_str = talloc_strdup(r, test_str);
   58314           0 :                         if (unicode != NULL) {
   58315           0 :                                 Py_DECREF(unicode);
   58316             :                         }
   58317           0 :                         if (talloc_str == NULL) {
   58318           0 :                                 PyErr_NoMemory();
   58319           0 :                                 return false;
   58320             :                         }
   58321           0 :                         r->in.server_name = talloc_str;
   58322             :                 }
   58323             :         }
   58324           0 :         if (py_computer_name == NULL) {
   58325           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   58326           0 :                 return false;
   58327             :         }
   58328           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   58329           0 :         if (r->in.computer_name == NULL) {
   58330           0 :                 PyErr_NoMemory();
   58331           0 :                 return false;
   58332             :         }
   58333             :         {
   58334           0 :                 const char *test_str;
   58335           0 :                 const char *talloc_str;
   58336           0 :                 PyObject *unicode = NULL;
   58337           0 :                 if (PyUnicode_Check(py_computer_name)) {
   58338           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   58339           0 :                         if (unicode == NULL) {
   58340           0 :                                 return false;
   58341             :                         }
   58342           0 :                         test_str = PyBytes_AS_STRING(unicode);
   58343           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   58344           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   58345             :                 } else {
   58346           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   58347           0 :                         return false;
   58348             :                 }
   58349           0 :                 talloc_str = talloc_strdup(r, test_str);
   58350           0 :                 if (unicode != NULL) {
   58351           0 :                         Py_DECREF(unicode);
   58352             :                 }
   58353           0 :                 if (talloc_str == NULL) {
   58354           0 :                         PyErr_NoMemory();
   58355           0 :                         return false;
   58356             :                 }
   58357           0 :                 r->in.computer_name = talloc_str;
   58358             :         }
   58359           0 :         if (py_credential == NULL) {
   58360           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   58361           0 :                 return false;
   58362             :         }
   58363           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   58364           0 :         if (r->in.credential == NULL) {
   58365           0 :                 PyErr_NoMemory();
   58366           0 :                 return false;
   58367             :         }
   58368           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   58369           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   58370           0 :                 PyErr_NoMemory();
   58371           0 :                 return false;
   58372             :         }
   58373           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   58374           0 :         if (py_flags == NULL) {
   58375           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
   58376           0 :                 return false;
   58377             :         }
   58378             :         {
   58379           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   58380           0 :                 if (PyLong_Check(py_flags)) {
   58381           0 :                         unsigned long long test_var;
   58382           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   58383           0 :                         if (PyErr_Occurred() != NULL) {
   58384           0 :                                 return false;
   58385             :                         }
   58386           0 :                         if (test_var > uint_max) {
   58387           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58388             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58389           0 :                                 return false;
   58390             :                         }
   58391           0 :                         r->in.flags = test_var;
   58392             :                 } else {
   58393           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58394             :                           PyLong_Type.tp_name);
   58395           0 :                         return false;
   58396             :                 }
   58397             :         }
   58398           0 :         return true;
   58399             : }
   58400             : 
   58401           0 : static PyObject *unpack_py_netr_GetForestTrustInformation_args_out(struct netr_GetForestTrustInformation *r)
   58402             : {
   58403           0 :         PyObject *result;
   58404           0 :         PyObject *py_return_authenticator;
   58405           0 :         PyObject *py_forest_trust_info;
   58406           0 :         result = PyTuple_New(2);
   58407           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   58408           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   58409           0 :         if (*r->out.forest_trust_info == NULL) {
   58410           0 :                 py_forest_trust_info = Py_None;
   58411           0 :                 Py_INCREF(py_forest_trust_info);
   58412             :         } else {
   58413           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
   58414             :         }
   58415           0 :         PyTuple_SetItem(result, 1, py_forest_trust_info);
   58416           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   58417           0 :                 PyErr_SetNTSTATUS(r->out.result);
   58418           0 :                 return NULL;
   58419             :         }
   58420             : 
   58421           0 :         return result;
   58422             : }
   58423             : 
   58424             : 
   58425           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_server_name(PyObject *obj, void *closure)
   58426             : {
   58427           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58428           0 :         PyObject *py_server_name;
   58429           0 :         if (object->in.server_name == NULL) {
   58430           0 :                 Py_RETURN_NONE;
   58431             :         }
   58432           0 :         if (object->in.server_name == NULL) {
   58433           0 :                 py_server_name = Py_None;
   58434           0 :                 Py_INCREF(py_server_name);
   58435             :         } else {
   58436           0 :                 if (object->in.server_name == NULL) {
   58437           0 :                         py_server_name = Py_None;
   58438           0 :                         Py_INCREF(py_server_name);
   58439             :                 } else {
   58440           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   58441             :                 }
   58442             :         }
   58443           0 :         return py_server_name;
   58444             : }
   58445             : 
   58446           0 : static int py_netr_LogonSamLogonWithFlags_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   58447             : {
   58448           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58449           0 :         if (value == NULL) {
   58450           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   58451           0 :                 return -1;
   58452             :         }
   58453           0 :         if (value == Py_None) {
   58454           0 :                 object->in.server_name = NULL;
   58455             :         } else {
   58456           0 :                 object->in.server_name = NULL;
   58457             :                 {
   58458           0 :                         const char *test_str;
   58459           0 :                         const char *talloc_str;
   58460           0 :                         PyObject *unicode = NULL;
   58461           0 :                         if (PyUnicode_Check(value)) {
   58462           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58463           0 :                                 if (unicode == NULL) {
   58464           0 :                                         return -1;
   58465             :                                 }
   58466           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58467           0 :                         } else if (PyBytes_Check(value)) {
   58468           0 :                                 test_str = PyBytes_AS_STRING(value);
   58469             :                         } else {
   58470           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58471           0 :                                 return -1;
   58472             :                         }
   58473           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58474           0 :                         if (unicode != NULL) {
   58475           0 :                                 Py_DECREF(unicode);
   58476             :                         }
   58477           0 :                         if (talloc_str == NULL) {
   58478           0 :                                 PyErr_NoMemory();
   58479           0 :                                 return -1;
   58480             :                         }
   58481           0 :                         object->in.server_name = talloc_str;
   58482             :                 }
   58483             :         }
   58484           0 :         return 0;
   58485             : }
   58486             : 
   58487           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_computer_name(PyObject *obj, void *closure)
   58488             : {
   58489           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58490           0 :         PyObject *py_computer_name;
   58491           0 :         if (object->in.computer_name == NULL) {
   58492           0 :                 Py_RETURN_NONE;
   58493             :         }
   58494           0 :         if (object->in.computer_name == NULL) {
   58495           0 :                 py_computer_name = Py_None;
   58496           0 :                 Py_INCREF(py_computer_name);
   58497             :         } else {
   58498           0 :                 if (object->in.computer_name == NULL) {
   58499           0 :                         py_computer_name = Py_None;
   58500           0 :                         Py_INCREF(py_computer_name);
   58501             :                 } else {
   58502           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   58503             :                 }
   58504             :         }
   58505           0 :         return py_computer_name;
   58506             : }
   58507             : 
   58508           0 : static int py_netr_LogonSamLogonWithFlags_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   58509             : {
   58510           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58511           0 :         if (value == NULL) {
   58512           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   58513           0 :                 return -1;
   58514             :         }
   58515           0 :         if (value == Py_None) {
   58516           0 :                 object->in.computer_name = NULL;
   58517             :         } else {
   58518           0 :                 object->in.computer_name = NULL;
   58519             :                 {
   58520           0 :                         const char *test_str;
   58521           0 :                         const char *talloc_str;
   58522           0 :                         PyObject *unicode = NULL;
   58523           0 :                         if (PyUnicode_Check(value)) {
   58524           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58525           0 :                                 if (unicode == NULL) {
   58526           0 :                                         return -1;
   58527             :                                 }
   58528           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58529           0 :                         } else if (PyBytes_Check(value)) {
   58530           0 :                                 test_str = PyBytes_AS_STRING(value);
   58531             :                         } else {
   58532           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58533           0 :                                 return -1;
   58534             :                         }
   58535           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58536           0 :                         if (unicode != NULL) {
   58537           0 :                                 Py_DECREF(unicode);
   58538             :                         }
   58539           0 :                         if (talloc_str == NULL) {
   58540           0 :                                 PyErr_NoMemory();
   58541           0 :                                 return -1;
   58542             :                         }
   58543           0 :                         object->in.computer_name = talloc_str;
   58544             :                 }
   58545             :         }
   58546           0 :         return 0;
   58547             : }
   58548             : 
   58549           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_credential(PyObject *obj, void *closure)
   58550             : {
   58551           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58552           0 :         PyObject *py_credential;
   58553           0 :         if (object->in.credential == NULL) {
   58554           0 :                 Py_RETURN_NONE;
   58555             :         }
   58556           0 :         if (object->in.credential == NULL) {
   58557           0 :                 py_credential = Py_None;
   58558           0 :                 Py_INCREF(py_credential);
   58559             :         } else {
   58560           0 :                 py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   58561             :         }
   58562           0 :         return py_credential;
   58563             : }
   58564             : 
   58565           0 : static int py_netr_LogonSamLogonWithFlags_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   58566             : {
   58567           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58568           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   58569           0 :         if (value == NULL) {
   58570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   58571           0 :                 return -1;
   58572             :         }
   58573           0 :         if (value == Py_None) {
   58574           0 :                 object->in.credential = NULL;
   58575             :         } else {
   58576           0 :                 object->in.credential = NULL;
   58577           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58578           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58579           0 :                         PyErr_NoMemory();
   58580           0 :                         return -1;
   58581             :                 }
   58582           0 :                 object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58583             :         }
   58584           0 :         return 0;
   58585             : }
   58586             : 
   58587           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_return_authenticator(PyObject *obj, void *closure)
   58588             : {
   58589           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58590           0 :         PyObject *py_return_authenticator;
   58591           0 :         if (object->in.return_authenticator == NULL) {
   58592           0 :                 Py_RETURN_NONE;
   58593             :         }
   58594           0 :         if (object->in.return_authenticator == NULL) {
   58595           0 :                 py_return_authenticator = Py_None;
   58596           0 :                 Py_INCREF(py_return_authenticator);
   58597             :         } else {
   58598           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   58599             :         }
   58600           0 :         return py_return_authenticator;
   58601             : }
   58602             : 
   58603           0 : static int py_netr_LogonSamLogonWithFlags_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   58604             : {
   58605           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58606           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   58607           0 :         if (value == NULL) {
   58608           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
   58609           0 :                 return -1;
   58610             :         }
   58611           0 :         if (value == Py_None) {
   58612           0 :                 object->in.return_authenticator = NULL;
   58613             :         } else {
   58614           0 :                 object->in.return_authenticator = NULL;
   58615           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58616           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58617           0 :                         PyErr_NoMemory();
   58618           0 :                         return -1;
   58619             :                 }
   58620           0 :                 object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58621             :         }
   58622           0 :         return 0;
   58623             : }
   58624             : 
   58625           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_return_authenticator(PyObject *obj, void *closure)
   58626             : {
   58627           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58628           0 :         PyObject *py_return_authenticator;
   58629           0 :         if (object->out.return_authenticator == NULL) {
   58630           0 :                 Py_RETURN_NONE;
   58631             :         }
   58632           0 :         if (object->out.return_authenticator == NULL) {
   58633           0 :                 py_return_authenticator = Py_None;
   58634           0 :                 Py_INCREF(py_return_authenticator);
   58635             :         } else {
   58636           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   58637             :         }
   58638           0 :         return py_return_authenticator;
   58639             : }
   58640             : 
   58641           0 : static int py_netr_LogonSamLogonWithFlags_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   58642             : {
   58643           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58644           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   58645           0 :         if (value == NULL) {
   58646           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   58647           0 :                 return -1;
   58648             :         }
   58649           0 :         if (value == Py_None) {
   58650           0 :                 object->out.return_authenticator = NULL;
   58651             :         } else {
   58652           0 :                 object->out.return_authenticator = NULL;
   58653           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58654           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58655           0 :                         PyErr_NoMemory();
   58656           0 :                         return -1;
   58657             :                 }
   58658           0 :                 object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58659             :         }
   58660           0 :         return 0;
   58661             : }
   58662             : 
   58663           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_logon_level(PyObject *obj, void *closure)
   58664             : {
   58665           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58666           0 :         PyObject *py_logon_level;
   58667           0 :         py_logon_level = PyLong_FromLong((uint16_t)(object->in.logon_level));
   58668           0 :         return py_logon_level;
   58669             : }
   58670             : 
   58671           0 : static int py_netr_LogonSamLogonWithFlags_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   58672             : {
   58673           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58674           0 :         if (value == NULL) {
   58675           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_level");
   58676           0 :                 return -1;
   58677             :         }
   58678             :         {
   58679           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   58680           0 :                 if (PyLong_Check(value)) {
   58681           0 :                         unsigned long long test_var;
   58682           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58683           0 :                         if (PyErr_Occurred() != NULL) {
   58684           0 :                                 return -1;
   58685             :                         }
   58686           0 :                         if (test_var > uint_max) {
   58687           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58688             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58689           0 :                                 return -1;
   58690             :                         }
   58691           0 :                         object->in.logon_level = test_var;
   58692             :                 } else {
   58693           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58694             :                           PyLong_Type.tp_name);
   58695           0 :                         return -1;
   58696             :                 }
   58697             :         }
   58698           0 :         return 0;
   58699             : }
   58700             : 
   58701           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_logon(PyObject *obj, void *closure)
   58702             : {
   58703           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58704           0 :         PyObject *py_logon;
   58705           0 :         if (object->in.logon == NULL) {
   58706           0 :                 Py_RETURN_NONE;
   58707             :         }
   58708           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
   58709           0 :         if (py_logon == NULL) {
   58710           0 :                 return NULL;
   58711             :         }
   58712           0 :         return py_logon;
   58713             : }
   58714             : 
   58715           0 : static int py_netr_LogonSamLogonWithFlags_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   58716             : {
   58717           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58718           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
   58719           0 :         if (value == NULL) {
   58720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon");
   58721           0 :                 return -1;
   58722             :         }
   58723           0 :         object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
   58724           0 :         if (object->in.logon == NULL) {
   58725           0 :                 PyErr_NoMemory();
   58726           0 :                 return -1;
   58727             :         }
   58728             :         {
   58729           0 :                 union netr_LogonLevel *logon_switch_1;
   58730           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");
   58731           0 :                 if (logon_switch_1 == NULL) {
   58732           0 :                         return -1;
   58733             :                 }
   58734           0 :                 object->in.logon = logon_switch_1;
   58735             :         }
   58736           0 :         return 0;
   58737             : }
   58738             : 
   58739           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_validation_level(PyObject *obj, void *closure)
   58740             : {
   58741           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58742           0 :         PyObject *py_validation_level;
   58743           0 :         py_validation_level = PyLong_FromLong((uint16_t)(object->in.validation_level));
   58744           0 :         return py_validation_level;
   58745             : }
   58746             : 
   58747           0 : static int py_netr_LogonSamLogonWithFlags_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   58748             : {
   58749           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58750           0 :         if (value == NULL) {
   58751           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.validation_level");
   58752           0 :                 return -1;
   58753             :         }
   58754             :         {
   58755           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   58756           0 :                 if (PyLong_Check(value)) {
   58757           0 :                         unsigned long long test_var;
   58758           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58759           0 :                         if (PyErr_Occurred() != NULL) {
   58760           0 :                                 return -1;
   58761             :                         }
   58762           0 :                         if (test_var > uint_max) {
   58763           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58764             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58765           0 :                                 return -1;
   58766             :                         }
   58767           0 :                         object->in.validation_level = test_var;
   58768             :                 } else {
   58769           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58770             :                           PyLong_Type.tp_name);
   58771           0 :                         return -1;
   58772             :                 }
   58773             :         }
   58774           0 :         return 0;
   58775             : }
   58776             : 
   58777           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_validation(PyObject *obj, void *closure)
   58778             : {
   58779           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58780           0 :         PyObject *py_validation;
   58781           0 :         if (object->out.validation == NULL) {
   58782           0 :                 Py_RETURN_NONE;
   58783             :         }
   58784           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
   58785           0 :         if (py_validation == NULL) {
   58786           0 :                 return NULL;
   58787             :         }
   58788           0 :         return py_validation;
   58789             : }
   58790             : 
   58791           0 : static int py_netr_LogonSamLogonWithFlags_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   58792             : {
   58793           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58794           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   58795           0 :         if (value == NULL) {
   58796           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.validation");
   58797           0 :                 return -1;
   58798             :         }
   58799           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   58800           0 :         if (object->out.validation == NULL) {
   58801           0 :                 PyErr_NoMemory();
   58802           0 :                 return -1;
   58803             :         }
   58804             :         {
   58805           0 :                 union netr_Validation *validation_switch_1;
   58806           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");
   58807           0 :                 if (validation_switch_1 == NULL) {
   58808           0 :                         return -1;
   58809             :                 }
   58810           0 :                 object->out.validation = validation_switch_1;
   58811             :         }
   58812           0 :         return 0;
   58813             : }
   58814             : 
   58815           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_authoritative(PyObject *obj, void *closure)
   58816             : {
   58817           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58818           0 :         PyObject *py_authoritative;
   58819           0 :         if (object->out.authoritative == NULL) {
   58820           0 :                 Py_RETURN_NONE;
   58821             :         }
   58822           0 :         py_authoritative = PyLong_FromLong((uint16_t)(*object->out.authoritative));
   58823           0 :         return py_authoritative;
   58824             : }
   58825             : 
   58826           0 : static int py_netr_LogonSamLogonWithFlags_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   58827             : {
   58828           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58829           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   58830           0 :         if (value == NULL) {
   58831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.authoritative");
   58832           0 :                 return -1;
   58833             :         }
   58834           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   58835           0 :         if (object->out.authoritative == NULL) {
   58836           0 :                 PyErr_NoMemory();
   58837           0 :                 return -1;
   58838             :         }
   58839             :         {
   58840           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   58841           0 :                 if (PyLong_Check(value)) {
   58842           0 :                         unsigned long long test_var;
   58843           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58844           0 :                         if (PyErr_Occurred() != NULL) {
   58845           0 :                                 return -1;
   58846             :                         }
   58847           0 :                         if (test_var > uint_max) {
   58848           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58849             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58850           0 :                                 return -1;
   58851             :                         }
   58852           0 :                         *object->out.authoritative = test_var;
   58853             :                 } else {
   58854           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58855             :                           PyLong_Type.tp_name);
   58856           0 :                         return -1;
   58857             :                 }
   58858             :         }
   58859           0 :         return 0;
   58860             : }
   58861             : 
   58862           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_flags(PyObject *obj, void *closure)
   58863             : {
   58864           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58865           0 :         PyObject *py_flags;
   58866           0 :         if (object->in.flags == NULL) {
   58867           0 :                 Py_RETURN_NONE;
   58868             :         }
   58869           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.flags));
   58870           0 :         return py_flags;
   58871             : }
   58872             : 
   58873           0 : static int py_netr_LogonSamLogonWithFlags_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   58874             : {
   58875           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58876           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.flags));
   58877           0 :         if (value == NULL) {
   58878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
   58879           0 :                 return -1;
   58880             :         }
   58881           0 :         object->in.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.flags);
   58882           0 :         if (object->in.flags == NULL) {
   58883           0 :                 PyErr_NoMemory();
   58884           0 :                 return -1;
   58885             :         }
   58886             :         {
   58887           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.flags));
   58888           0 :                 if (PyLong_Check(value)) {
   58889           0 :                         unsigned long long test_var;
   58890           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58891           0 :                         if (PyErr_Occurred() != NULL) {
   58892           0 :                                 return -1;
   58893             :                         }
   58894           0 :                         if (test_var > uint_max) {
   58895           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58896             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58897           0 :                                 return -1;
   58898             :                         }
   58899           0 :                         *object->in.flags = test_var;
   58900             :                 } else {
   58901           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58902             :                           PyLong_Type.tp_name);
   58903           0 :                         return -1;
   58904             :                 }
   58905             :         }
   58906           0 :         return 0;
   58907             : }
   58908             : 
   58909           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_flags(PyObject *obj, void *closure)
   58910             : {
   58911           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58912           0 :         PyObject *py_flags;
   58913           0 :         if (object->out.flags == NULL) {
   58914           0 :                 Py_RETURN_NONE;
   58915             :         }
   58916           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.flags));
   58917           0 :         return py_flags;
   58918             : }
   58919             : 
   58920           0 : static int py_netr_LogonSamLogonWithFlags_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   58921             : {
   58922           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58923           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
   58924           0 :         if (value == NULL) {
   58925           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.flags");
   58926           0 :                 return -1;
   58927             :         }
   58928           0 :         object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
   58929           0 :         if (object->out.flags == NULL) {
   58930           0 :                 PyErr_NoMemory();
   58931           0 :                 return -1;
   58932             :         }
   58933             :         {
   58934           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
   58935           0 :                 if (PyLong_Check(value)) {
   58936           0 :                         unsigned long long test_var;
   58937           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58938           0 :                         if (PyErr_Occurred() != NULL) {
   58939           0 :                                 return -1;
   58940             :                         }
   58941           0 :                         if (test_var > uint_max) {
   58942           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58943             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58944           0 :                                 return -1;
   58945             :                         }
   58946           0 :                         *object->out.flags = test_var;
   58947             :                 } else {
   58948           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58949             :                           PyLong_Type.tp_name);
   58950           0 :                         return -1;
   58951             :                 }
   58952             :         }
   58953           0 :         return 0;
   58954             : }
   58955             : 
   58956           0 : static PyObject *py_netr_LogonSamLogonWithFlags_get_result(PyObject *obj, void *closure)
   58957             : {
   58958           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
   58959           0 :         PyObject *py_result;
   58960           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   58961           0 :         return py_result;
   58962             : }
   58963             : 
   58964           0 : static int py_netr_LogonSamLogonWithFlags_set_result(PyObject *py_obj, PyObject *value, void *closure)
   58965             : {
   58966           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   58967           0 :         if (value == NULL) {
   58968           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   58969           0 :                 return -1;
   58970             :         }
   58971           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   58972           0 :         return 0;
   58973             : }
   58974             : 
   58975             : static PyGetSetDef py_netr_LogonSamLogonWithFlags_getsetters[] = {
   58976             :         {
   58977             :                 .name = discard_const_p(char, "in_server_name"),
   58978             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_server_name,
   58979             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_server_name,
   58980             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58981             :         },
   58982             :         {
   58983             :                 .name = discard_const_p(char, "in_computer_name"),
   58984             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_computer_name,
   58985             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_computer_name,
   58986             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58987             :         },
   58988             :         {
   58989             :                 .name = discard_const_p(char, "in_credential"),
   58990             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_credential,
   58991             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_credential,
   58992             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   58993             :         },
   58994             :         {
   58995             :                 .name = discard_const_p(char, "in_return_authenticator"),
   58996             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_return_authenticator,
   58997             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_return_authenticator,
   58998             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   58999             :         },
   59000             :         {
   59001             :                 .name = discard_const_p(char, "out_return_authenticator"),
   59002             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_return_authenticator,
   59003             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_return_authenticator,
   59004             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   59005             :         },
   59006             :         {
   59007             :                 .name = discard_const_p(char, "in_logon_level"),
   59008             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_logon_level,
   59009             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_logon_level,
   59010             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   59011             :         },
   59012             :         {
   59013             :                 .name = discard_const_p(char, "in_logon"),
   59014             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_logon,
   59015             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_logon,
   59016             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   59017             :         },
   59018             :         {
   59019             :                 .name = discard_const_p(char, "in_validation_level"),
   59020             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_validation_level,
   59021             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_validation_level,
   59022             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59023             :         },
   59024             :         {
   59025             :                 .name = discard_const_p(char, "out_validation"),
   59026             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_validation,
   59027             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_validation,
   59028             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   59029             :         },
   59030             :         {
   59031             :                 .name = discard_const_p(char, "out_authoritative"),
   59032             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_authoritative,
   59033             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_authoritative,
   59034             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   59035             :         },
   59036             :         {
   59037             :                 .name = discard_const_p(char, "in_flags"),
   59038             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_flags,
   59039             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_flags,
   59040             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   59041             :         },
   59042             :         {
   59043             :                 .name = discard_const_p(char, "out_flags"),
   59044             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_flags,
   59045             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_flags,
   59046             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   59047             :         },
   59048             :         {
   59049             :                 .name = discard_const_p(char, "result"),
   59050             :                 .get = py_netr_LogonSamLogonWithFlags_get_result,
   59051             :                 .set = py_netr_LogonSamLogonWithFlags_set_result,
   59052             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   59053             :         },
   59054             :         { .name = NULL }
   59055             : };
   59056             : 
   59057           0 : static PyObject *py_netr_LogonSamLogonWithFlags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   59058             : {
   59059           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogonWithFlags, type);
   59060           0 :         struct netr_LogonSamLogonWithFlags *_self = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(self);
   59061           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   59062           0 :         _self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
   59063           0 :         _self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
   59064           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   59065           0 :         _self->in.flags = talloc_zero(mem_ctx, uint32_t);
   59066           0 :         _self->out.flags = talloc_zero(mem_ctx, uint32_t);
   59067           0 :         return self;
   59068             : }
   59069             : 
   59070           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   59071             : {
   59072             : 
   59073             : 
   59074           0 :         return PyLong_FromLong(45);
   59075             : }
   59076             : 
   59077           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   59078             : {
   59079           0 :         const struct ndr_interface_call *call = NULL;
   59080           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   59081           0 :         PyObject *ret = NULL;
   59082           0 :         struct ndr_push *push = NULL;
   59083           0 :         DATA_BLOB blob;
   59084           0 :         enum ndr_err_code err;
   59085             : 
   59086           0 :         if (ndr_table_netlogon.num_calls < 46) {
   59087           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_pack");
   59088           0 :                 return NULL;
   59089             :         }
   59090           0 :         call = &ndr_table_netlogon.calls[45];
   59091             : 
   59092           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   59093           0 :         if (push == NULL) {
   59094           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   59095           0 :                 return NULL;
   59096             :         }
   59097             : 
   59098           0 :         push->flags |= ndr_push_flags;
   59099             : 
   59100           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   59101           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59102           0 :                 TALLOC_FREE(push);
   59103           0 :                 PyErr_SetNdrError(err);
   59104           0 :                 return NULL;
   59105             :         }
   59106           0 :         blob = ndr_push_blob(push);
   59107           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   59108           0 :         TALLOC_FREE(push);
   59109           0 :         return ret;
   59110             : }
   59111             : 
   59112           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59113             : {
   59114           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59115           0 :         PyObject *bigendian_obj = NULL;
   59116           0 :         PyObject *ndr64_obj = NULL;
   59117           0 :         libndr_flags ndr_push_flags = 0;
   59118             : 
   59119           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   59120             :                 discard_const_p(char *, kwnames),
   59121             :                 &bigendian_obj,
   59122             :                 &ndr64_obj)) {
   59123           0 :                 return NULL;
   59124             :         }
   59125             : 
   59126           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59127           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59128             :         }
   59129           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59130           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59131             :         }
   59132             : 
   59133           0 :         return py_netr_LogonSamLogonWithFlags_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   59134             : }
   59135             : 
   59136           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59137             : {
   59138           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59139           0 :         PyObject *bigendian_obj = NULL;
   59140           0 :         PyObject *ndr64_obj = NULL;
   59141           0 :         libndr_flags ndr_push_flags = 0;
   59142             : 
   59143           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   59144             :                 discard_const_p(char *, kwnames),
   59145             :                 &bigendian_obj,
   59146             :                 &ndr64_obj)) {
   59147           0 :                 return NULL;
   59148             :         }
   59149             : 
   59150           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59151           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59152             :         }
   59153           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59154           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59155             :         }
   59156             : 
   59157           0 :         return py_netr_LogonSamLogonWithFlags_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   59158             : }
   59159             : 
   59160           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   59161             : {
   59162           0 :         const struct ndr_interface_call *call = NULL;
   59163           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   59164           0 :         struct ndr_pull *pull = NULL;
   59165           0 :         enum ndr_err_code err;
   59166             : 
   59167           0 :         if (ndr_table_netlogon.num_calls < 46) {
   59168           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_unpack");
   59169           0 :                 return NULL;
   59170             :         }
   59171           0 :         call = &ndr_table_netlogon.calls[45];
   59172             : 
   59173           0 :         pull = ndr_pull_init_blob(blob, object);
   59174           0 :         if (pull == NULL) {
   59175           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   59176           0 :                 return NULL;
   59177             :         }
   59178             : 
   59179           0 :         pull->flags |= ndr_pull_flags;
   59180             : 
   59181           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   59182           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59183           0 :                 TALLOC_FREE(pull);
   59184           0 :                 PyErr_SetNdrError(err);
   59185           0 :                 return NULL;
   59186             :         }
   59187           0 :         if (!allow_remaining) {
   59188           0 :                 uint32_t highest_ofs;
   59189             : 
   59190           0 :                 if (pull->offset > pull->relative_highest_offset) {
   59191           0 :                         highest_ofs = pull->offset;
   59192             :                 } else {
   59193           0 :                         highest_ofs = pull->relative_highest_offset;
   59194             :                 }
   59195           0 :                 if (highest_ofs < pull->data_size) {
   59196           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   59197             :                                 "not all bytes consumed ofs[%u] size[%u]",
   59198             :                                 highest_ofs, pull->data_size);
   59199           0 :                         TALLOC_FREE(pull);
   59200           0 :                         PyErr_SetNdrError(err);
   59201           0 :                         return NULL;
   59202             :                 }
   59203             :         }
   59204             : 
   59205           0 :         TALLOC_FREE(pull);
   59206           0 :         Py_RETURN_NONE;
   59207             : }
   59208             : 
   59209           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59210             : {
   59211           0 :         DATA_BLOB blob;
   59212           0 :         Py_ssize_t blob_length = 0;
   59213           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59214           0 :         PyObject *bigendian_obj = NULL;
   59215           0 :         PyObject *ndr64_obj = NULL;
   59216           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59217           0 :         PyObject *allow_remaining_obj = NULL;
   59218           0 :         bool allow_remaining = false;
   59219             : 
   59220           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   59221             :                 discard_const_p(char *, kwnames),
   59222             :                 &blob.data, &blob_length,
   59223             :                 &bigendian_obj,
   59224             :                 &ndr64_obj,
   59225             :                 &allow_remaining_obj)) {
   59226           0 :                 return NULL;
   59227             :         }
   59228           0 :         blob.length = blob_length;
   59229             : 
   59230           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59231           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59232             :         }
   59233           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59234           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59235             :         }
   59236             : 
   59237           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59238           0 :                 allow_remaining = true;
   59239             :         }
   59240             : 
   59241           0 :         return py_netr_LogonSamLogonWithFlags_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   59242             : }
   59243             : 
   59244           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59245             : {
   59246           0 :         DATA_BLOB blob;
   59247           0 :         Py_ssize_t blob_length = 0;
   59248           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59249           0 :         PyObject *bigendian_obj = NULL;
   59250           0 :         PyObject *ndr64_obj = NULL;
   59251           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59252           0 :         PyObject *allow_remaining_obj = NULL;
   59253           0 :         bool allow_remaining = false;
   59254             : 
   59255           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   59256             :                 discard_const_p(char *, kwnames),
   59257             :                 &blob.data, &blob_length,
   59258             :                 &bigendian_obj,
   59259             :                 &ndr64_obj,
   59260             :                 &allow_remaining_obj)) {
   59261           0 :                 return NULL;
   59262             :         }
   59263           0 :         blob.length = blob_length;
   59264             : 
   59265           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59266           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59267             :         }
   59268           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59269           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59270             :         }
   59271             : 
   59272           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59273           0 :                 allow_remaining = true;
   59274             :         }
   59275             : 
   59276           0 :         return py_netr_LogonSamLogonWithFlags_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   59277             : }
   59278             : 
   59279           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   59280             : {
   59281           0 :         const struct ndr_interface_call *call = NULL;
   59282           0 :         struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
   59283           0 :         PyObject *ret;
   59284           0 :         char *retstr;
   59285             : 
   59286           0 :         if (ndr_table_netlogon.num_calls < 46) {
   59287           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_print");
   59288           0 :                 return NULL;
   59289             :         }
   59290           0 :         call = &ndr_table_netlogon.calls[45];
   59291             : 
   59292           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   59293           0 :         ret = PyUnicode_FromString(retstr);
   59294           0 :         TALLOC_FREE(retstr);
   59295             : 
   59296           0 :         return ret;
   59297             : }
   59298             : 
   59299           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59300             : {
   59301           0 :         return py_netr_LogonSamLogonWithFlags_ndr_print(py_obj, "netr_LogonSamLogonWithFlags_in", NDR_IN);
   59302             : }
   59303             : 
   59304           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59305             : {
   59306           0 :         return py_netr_LogonSamLogonWithFlags_ndr_print(py_obj, "netr_LogonSamLogonWithFlags_out", NDR_OUT);
   59307             : }
   59308             : 
   59309             : static PyMethodDef py_netr_LogonSamLogonWithFlags_methods[] = {
   59310             :         { "opnum", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_opnum, METH_NOARGS|METH_CLASS,
   59311             :                 "netlogon.netr_LogonSamLogonWithFlags.opnum() -> 45 (0x2d) " },
   59312             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   59313             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   59314             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   59315             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   59316             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   59317             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   59318             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   59319             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   59320             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   59321             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   59322             :         { NULL, NULL, 0, NULL }
   59323             : };
   59324             : 
   59325             : 
   59326             : static PyTypeObject netr_LogonSamLogonWithFlags_Type = {
   59327             :         PyVarObject_HEAD_INIT(NULL, 0)
   59328             :         .tp_name = "netlogon.netr_LogonSamLogonWithFlags",
   59329             :         .tp_getset = py_netr_LogonSamLogonWithFlags_getsetters,
   59330             :         .tp_methods = py_netr_LogonSamLogonWithFlags_methods,
   59331             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   59332             :         .tp_new = py_netr_LogonSamLogonWithFlags_new,
   59333             : };
   59334             : 
   59335           4 : static bool pack_py_netr_LogonSamLogonWithFlags_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogonWithFlags *r)
   59336             : {
   59337           0 :         PyObject *py_server_name;
   59338           0 :         PyObject *py_computer_name;
   59339           0 :         PyObject *py_credential;
   59340           0 :         PyObject *py_return_authenticator;
   59341           0 :         PyObject *py_logon_level;
   59342           0 :         PyObject *py_logon;
   59343           0 :         PyObject *py_validation_level;
   59344           0 :         PyObject *py_flags;
   59345           4 :         const char *kwnames[] = {
   59346             :                 "server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", "validation_level", "flags", NULL
   59347             :         };
   59348             : 
   59349           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)) {
   59350           0 :                 return false;
   59351             :         }
   59352             : 
   59353           4 :         if (py_server_name == NULL) {
   59354           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   59355           0 :                 return false;
   59356             :         }
   59357           4 :         if (py_server_name == Py_None) {
   59358           0 :                 r->in.server_name = NULL;
   59359             :         } else {
   59360           4 :                 r->in.server_name = NULL;
   59361             :                 {
   59362           0 :                         const char *test_str;
   59363           0 :                         const char *talloc_str;
   59364           4 :                         PyObject *unicode = NULL;
   59365           4 :                         if (PyUnicode_Check(py_server_name)) {
   59366           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   59367           4 :                                 if (unicode == NULL) {
   59368           0 :                                         return false;
   59369             :                                 }
   59370           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   59371           0 :                         } else if (PyBytes_Check(py_server_name)) {
   59372           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   59373             :                         } else {
   59374           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   59375           0 :                                 return false;
   59376             :                         }
   59377           4 :                         talloc_str = talloc_strdup(r, test_str);
   59378           4 :                         if (unicode != NULL) {
   59379           4 :                                 Py_DECREF(unicode);
   59380             :                         }
   59381           4 :                         if (talloc_str == NULL) {
   59382           0 :                                 PyErr_NoMemory();
   59383           0 :                                 return false;
   59384             :                         }
   59385           4 :                         r->in.server_name = talloc_str;
   59386             :                 }
   59387             :         }
   59388           4 :         if (py_computer_name == NULL) {
   59389           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   59390           0 :                 return false;
   59391             :         }
   59392           4 :         if (py_computer_name == Py_None) {
   59393           0 :                 r->in.computer_name = NULL;
   59394             :         } else {
   59395           4 :                 r->in.computer_name = NULL;
   59396             :                 {
   59397           0 :                         const char *test_str;
   59398           0 :                         const char *talloc_str;
   59399           4 :                         PyObject *unicode = NULL;
   59400           4 :                         if (PyUnicode_Check(py_computer_name)) {
   59401           4 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   59402           4 :                                 if (unicode == NULL) {
   59403           0 :                                         return false;
   59404             :                                 }
   59405           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   59406           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   59407           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   59408             :                         } else {
   59409           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   59410           0 :                                 return false;
   59411             :                         }
   59412           4 :                         talloc_str = talloc_strdup(r, test_str);
   59413           4 :                         if (unicode != NULL) {
   59414           4 :                                 Py_DECREF(unicode);
   59415             :                         }
   59416           4 :                         if (talloc_str == NULL) {
   59417           0 :                                 PyErr_NoMemory();
   59418           0 :                                 return false;
   59419             :                         }
   59420           4 :                         r->in.computer_name = talloc_str;
   59421             :                 }
   59422             :         }
   59423           4 :         if (py_credential == NULL) {
   59424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   59425           0 :                 return false;
   59426             :         }
   59427           4 :         if (py_credential == Py_None) {
   59428           0 :                 r->in.credential = NULL;
   59429             :         } else {
   59430           4 :                 r->in.credential = NULL;
   59431           4 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   59432           4 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   59433           0 :                         PyErr_NoMemory();
   59434           0 :                         return false;
   59435             :                 }
   59436           4 :                 r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   59437             :         }
   59438           4 :         if (py_return_authenticator == NULL) {
   59439           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
   59440           0 :                 return false;
   59441             :         }
   59442           4 :         if (py_return_authenticator == Py_None) {
   59443           0 :                 r->in.return_authenticator = NULL;
   59444             :         } else {
   59445           4 :                 r->in.return_authenticator = NULL;
   59446           4 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   59447           4 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   59448           0 :                         PyErr_NoMemory();
   59449           0 :                         return false;
   59450             :                 }
   59451           4 :                 r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   59452             :         }
   59453           4 :         if (py_logon_level == NULL) {
   59454           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_level");
   59455           0 :                 return false;
   59456             :         }
   59457             :         {
   59458           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   59459           4 :                 if (PyLong_Check(py_logon_level)) {
   59460           0 :                         unsigned long long test_var;
   59461           4 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   59462           4 :                         if (PyErr_Occurred() != NULL) {
   59463           0 :                                 return false;
   59464             :                         }
   59465           4 :                         if (test_var > uint_max) {
   59466           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59467             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59468           0 :                                 return false;
   59469             :                         }
   59470           4 :                         r->in.logon_level = test_var;
   59471             :                 } else {
   59472           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59473             :                           PyLong_Type.tp_name);
   59474           0 :                         return false;
   59475             :                 }
   59476             :         }
   59477           4 :         if (py_logon == NULL) {
   59478           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon");
   59479           0 :                 return false;
   59480             :         }
   59481           4 :         r->in.logon = talloc_ptrtype(r, r->in.logon);
   59482           4 :         if (r->in.logon == NULL) {
   59483           0 :                 PyErr_NoMemory();
   59484           0 :                 return false;
   59485             :         }
   59486             :         {
   59487           0 :                 union netr_LogonLevel *logon_switch_1;
   59488           4 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   59489           4 :                 if (logon_switch_1 == NULL) {
   59490           0 :                         return false;
   59491             :                 }
   59492           4 :                 r->in.logon = logon_switch_1;
   59493             :         }
   59494           4 :         if (py_validation_level == NULL) {
   59495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.validation_level");
   59496           0 :                 return false;
   59497             :         }
   59498             :         {
   59499           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   59500           4 :                 if (PyLong_Check(py_validation_level)) {
   59501           0 :                         unsigned long long test_var;
   59502           4 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   59503           4 :                         if (PyErr_Occurred() != NULL) {
   59504           0 :                                 return false;
   59505             :                         }
   59506           4 :                         if (test_var > uint_max) {
   59507           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59508             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59509           0 :                                 return false;
   59510             :                         }
   59511           4 :                         r->in.validation_level = test_var;
   59512             :                 } else {
   59513           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59514             :                           PyLong_Type.tp_name);
   59515           0 :                         return false;
   59516             :                 }
   59517             :         }
   59518           4 :         if (py_flags == NULL) {
   59519           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
   59520           0 :                 return false;
   59521             :         }
   59522           4 :         r->in.flags = talloc_ptrtype(r, r->in.flags);
   59523           4 :         if (r->in.flags == NULL) {
   59524           0 :                 PyErr_NoMemory();
   59525           0 :                 return false;
   59526             :         }
   59527             :         {
   59528           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.flags));
   59529           4 :                 if (PyLong_Check(py_flags)) {
   59530           0 :                         unsigned long long test_var;
   59531           4 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   59532           4 :                         if (PyErr_Occurred() != NULL) {
   59533           0 :                                 return false;
   59534             :                         }
   59535           4 :                         if (test_var > uint_max) {
   59536           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59537             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59538           0 :                                 return false;
   59539             :                         }
   59540           4 :                         *r->in.flags = test_var;
   59541             :                 } else {
   59542           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59543             :                           PyLong_Type.tp_name);
   59544           0 :                         return false;
   59545             :                 }
   59546             :         }
   59547           4 :         return true;
   59548             : }
   59549             : 
   59550           4 : static PyObject *unpack_py_netr_LogonSamLogonWithFlags_args_out(struct netr_LogonSamLogonWithFlags *r)
   59551             : {
   59552           0 :         PyObject *result;
   59553           0 :         PyObject *py_return_authenticator;
   59554           0 :         PyObject *py_validation;
   59555           0 :         PyObject *py_authoritative;
   59556           0 :         PyObject *py_flags;
   59557           4 :         result = PyTuple_New(4);
   59558           4 :         if (r->out.return_authenticator == NULL) {
   59559           0 :                 py_return_authenticator = Py_None;
   59560           0 :                 Py_INCREF(py_return_authenticator);
   59561             :         } else {
   59562           4 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   59563             :         }
   59564           4 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   59565           4 :         py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
   59566           4 :         if (py_validation == NULL) {
   59567           0 :                 return NULL;
   59568             :         }
   59569           4 :         PyTuple_SetItem(result, 1, py_validation);
   59570           4 :         py_authoritative = PyLong_FromLong((uint16_t)(*r->out.authoritative));
   59571           4 :         PyTuple_SetItem(result, 2, py_authoritative);
   59572           4 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.flags));
   59573           4 :         PyTuple_SetItem(result, 3, py_flags);
   59574           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   59575           0 :                 PyErr_SetNTSTATUS(r->out.result);
   59576           0 :                 return NULL;
   59577             :         }
   59578             : 
   59579           4 :         return result;
   59580             : }
   59581             : 
   59582             : 
   59583           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_server_name(PyObject *obj, void *closure)
   59584             : {
   59585           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59586           0 :         PyObject *py_server_name;
   59587           0 :         if (object->in.server_name == NULL) {
   59588           0 :                 Py_RETURN_NONE;
   59589             :         }
   59590           0 :         if (object->in.server_name == NULL) {
   59591           0 :                 py_server_name = Py_None;
   59592           0 :                 Py_INCREF(py_server_name);
   59593             :         } else {
   59594           0 :                 if (object->in.server_name == NULL) {
   59595           0 :                         py_server_name = Py_None;
   59596           0 :                         Py_INCREF(py_server_name);
   59597             :                 } else {
   59598           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   59599             :                 }
   59600             :         }
   59601           0 :         return py_server_name;
   59602             : }
   59603             : 
   59604           0 : static int py_netr_ServerGetTrustInfo_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   59605             : {
   59606           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59607           0 :         if (value == NULL) {
   59608           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   59609           0 :                 return -1;
   59610             :         }
   59611           0 :         if (value == Py_None) {
   59612           0 :                 object->in.server_name = NULL;
   59613             :         } else {
   59614           0 :                 object->in.server_name = NULL;
   59615             :                 {
   59616           0 :                         const char *test_str;
   59617           0 :                         const char *talloc_str;
   59618           0 :                         PyObject *unicode = NULL;
   59619           0 :                         if (PyUnicode_Check(value)) {
   59620           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   59621           0 :                                 if (unicode == NULL) {
   59622           0 :                                         return -1;
   59623             :                                 }
   59624           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   59625           0 :                         } else if (PyBytes_Check(value)) {
   59626           0 :                                 test_str = PyBytes_AS_STRING(value);
   59627             :                         } else {
   59628           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   59629           0 :                                 return -1;
   59630             :                         }
   59631           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   59632           0 :                         if (unicode != NULL) {
   59633           0 :                                 Py_DECREF(unicode);
   59634             :                         }
   59635           0 :                         if (talloc_str == NULL) {
   59636           0 :                                 PyErr_NoMemory();
   59637           0 :                                 return -1;
   59638             :                         }
   59639           0 :                         object->in.server_name = talloc_str;
   59640             :                 }
   59641             :         }
   59642           0 :         return 0;
   59643             : }
   59644             : 
   59645           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_account_name(PyObject *obj, void *closure)
   59646             : {
   59647           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59648           0 :         PyObject *py_account_name;
   59649           0 :         if (object->in.account_name == NULL) {
   59650           0 :                 Py_RETURN_NONE;
   59651             :         }
   59652           0 :         if (object->in.account_name == NULL) {
   59653           0 :                 py_account_name = Py_None;
   59654           0 :                 Py_INCREF(py_account_name);
   59655             :         } else {
   59656           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   59657             :         }
   59658           0 :         return py_account_name;
   59659             : }
   59660             : 
   59661           0 : static int py_netr_ServerGetTrustInfo_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   59662             : {
   59663           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59664           0 :         if (value == NULL) {
   59665           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
   59666           0 :                 return -1;
   59667             :         }
   59668           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   59669           0 :         if (object->in.account_name == NULL) {
   59670           0 :                 PyErr_NoMemory();
   59671           0 :                 return -1;
   59672             :         }
   59673             :         {
   59674           0 :                 const char *test_str;
   59675           0 :                 const char *talloc_str;
   59676           0 :                 PyObject *unicode = NULL;
   59677           0 :                 if (PyUnicode_Check(value)) {
   59678           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   59679           0 :                         if (unicode == NULL) {
   59680           0 :                                 return -1;
   59681             :                         }
   59682           0 :                         test_str = PyBytes_AS_STRING(unicode);
   59683           0 :                 } else if (PyBytes_Check(value)) {
   59684           0 :                         test_str = PyBytes_AS_STRING(value);
   59685             :                 } else {
   59686           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   59687           0 :                         return -1;
   59688             :                 }
   59689           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   59690           0 :                 if (unicode != NULL) {
   59691           0 :                         Py_DECREF(unicode);
   59692             :                 }
   59693           0 :                 if (talloc_str == NULL) {
   59694           0 :                         PyErr_NoMemory();
   59695           0 :                         return -1;
   59696             :                 }
   59697           0 :                 object->in.account_name = talloc_str;
   59698             :         }
   59699           0 :         return 0;
   59700             : }
   59701             : 
   59702           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_secure_channel_type(PyObject *obj, void *closure)
   59703             : {
   59704           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59705           0 :         PyObject *py_secure_channel_type;
   59706           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
   59707           0 :         return py_secure_channel_type;
   59708             : }
   59709             : 
   59710           0 : static int py_netr_ServerGetTrustInfo_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   59711             : {
   59712           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59713           0 :         if (value == NULL) {
   59714           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
   59715           0 :                 return -1;
   59716             :         }
   59717             :         {
   59718           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   59719           0 :                 if (PyLong_Check(value)) {
   59720           0 :                         unsigned long long test_var;
   59721           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   59722           0 :                         if (PyErr_Occurred() != NULL) {
   59723           0 :                                 return -1;
   59724             :                         }
   59725           0 :                         if (test_var > uint_max) {
   59726           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59727             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59728           0 :                                 return -1;
   59729             :                         }
   59730           0 :                         object->in.secure_channel_type = test_var;
   59731             :                 } else {
   59732           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59733             :                           PyLong_Type.tp_name);
   59734           0 :                         return -1;
   59735             :                 }
   59736             :         }
   59737           0 :         return 0;
   59738             : }
   59739             : 
   59740           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_computer_name(PyObject *obj, void *closure)
   59741             : {
   59742           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59743           0 :         PyObject *py_computer_name;
   59744           0 :         if (object->in.computer_name == NULL) {
   59745           0 :                 Py_RETURN_NONE;
   59746             :         }
   59747           0 :         if (object->in.computer_name == NULL) {
   59748           0 :                 py_computer_name = Py_None;
   59749           0 :                 Py_INCREF(py_computer_name);
   59750             :         } else {
   59751           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   59752             :         }
   59753           0 :         return py_computer_name;
   59754             : }
   59755             : 
   59756           0 : static int py_netr_ServerGetTrustInfo_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   59757             : {
   59758           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59759           0 :         if (value == NULL) {
   59760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   59761           0 :                 return -1;
   59762             :         }
   59763           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   59764           0 :         if (object->in.computer_name == NULL) {
   59765           0 :                 PyErr_NoMemory();
   59766           0 :                 return -1;
   59767             :         }
   59768             :         {
   59769           0 :                 const char *test_str;
   59770           0 :                 const char *talloc_str;
   59771           0 :                 PyObject *unicode = NULL;
   59772           0 :                 if (PyUnicode_Check(value)) {
   59773           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   59774           0 :                         if (unicode == NULL) {
   59775           0 :                                 return -1;
   59776             :                         }
   59777           0 :                         test_str = PyBytes_AS_STRING(unicode);
   59778           0 :                 } else if (PyBytes_Check(value)) {
   59779           0 :                         test_str = PyBytes_AS_STRING(value);
   59780             :                 } else {
   59781           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   59782           0 :                         return -1;
   59783             :                 }
   59784           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   59785           0 :                 if (unicode != NULL) {
   59786           0 :                         Py_DECREF(unicode);
   59787             :                 }
   59788           0 :                 if (talloc_str == NULL) {
   59789           0 :                         PyErr_NoMemory();
   59790           0 :                         return -1;
   59791             :                 }
   59792           0 :                 object->in.computer_name = talloc_str;
   59793             :         }
   59794           0 :         return 0;
   59795             : }
   59796             : 
   59797           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_credential(PyObject *obj, void *closure)
   59798             : {
   59799           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59800           0 :         PyObject *py_credential;
   59801           0 :         if (object->in.credential == NULL) {
   59802           0 :                 Py_RETURN_NONE;
   59803             :         }
   59804           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   59805           0 :         return py_credential;
   59806             : }
   59807             : 
   59808           0 : static int py_netr_ServerGetTrustInfo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   59809             : {
   59810           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59811           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   59812           0 :         if (value == NULL) {
   59813           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   59814           0 :                 return -1;
   59815             :         }
   59816           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   59817           0 :         if (object->in.credential == NULL) {
   59818           0 :                 PyErr_NoMemory();
   59819           0 :                 return -1;
   59820             :         }
   59821           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   59822           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59823           0 :                 PyErr_NoMemory();
   59824           0 :                 return -1;
   59825             :         }
   59826           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   59827           0 :         return 0;
   59828             : }
   59829             : 
   59830           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_return_authenticator(PyObject *obj, void *closure)
   59831             : {
   59832           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59833           0 :         PyObject *py_return_authenticator;
   59834           0 :         if (object->out.return_authenticator == NULL) {
   59835           0 :                 Py_RETURN_NONE;
   59836             :         }
   59837           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   59838           0 :         return py_return_authenticator;
   59839             : }
   59840             : 
   59841           0 : static int py_netr_ServerGetTrustInfo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   59842             : {
   59843           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59844           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   59845           0 :         if (value == NULL) {
   59846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   59847           0 :                 return -1;
   59848             :         }
   59849           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   59850           0 :         if (object->out.return_authenticator == NULL) {
   59851           0 :                 PyErr_NoMemory();
   59852           0 :                 return -1;
   59853             :         }
   59854           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   59855           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59856           0 :                 PyErr_NoMemory();
   59857           0 :                 return -1;
   59858             :         }
   59859           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   59860           0 :         return 0;
   59861             : }
   59862             : 
   59863           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_new_owf_password(PyObject *obj, void *closure)
   59864             : {
   59865           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59866           0 :         PyObject *py_new_owf_password;
   59867           0 :         if (object->out.new_owf_password == NULL) {
   59868           0 :                 Py_RETURN_NONE;
   59869             :         }
   59870           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.new_owf_password, object->out.new_owf_password);
   59871           0 :         return py_new_owf_password;
   59872             : }
   59873             : 
   59874           0 : static int py_netr_ServerGetTrustInfo_out_set_new_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   59875             : {
   59876           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59877           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.new_owf_password));
   59878           0 :         if (value == NULL) {
   59879           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.new_owf_password");
   59880           0 :                 return -1;
   59881             :         }
   59882           0 :         object->out.new_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.new_owf_password);
   59883           0 :         if (object->out.new_owf_password == NULL) {
   59884           0 :                 PyErr_NoMemory();
   59885           0 :                 return -1;
   59886             :         }
   59887           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   59888           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59889           0 :                 PyErr_NoMemory();
   59890           0 :                 return -1;
   59891             :         }
   59892           0 :         object->out.new_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   59893           0 :         return 0;
   59894             : }
   59895             : 
   59896           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_old_owf_password(PyObject *obj, void *closure)
   59897             : {
   59898           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59899           0 :         PyObject *py_old_owf_password;
   59900           0 :         if (object->out.old_owf_password == NULL) {
   59901           0 :                 Py_RETURN_NONE;
   59902             :         }
   59903           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.old_owf_password, object->out.old_owf_password);
   59904           0 :         return py_old_owf_password;
   59905             : }
   59906             : 
   59907           0 : static int py_netr_ServerGetTrustInfo_out_set_old_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   59908             : {
   59909           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59910           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.old_owf_password));
   59911           0 :         if (value == NULL) {
   59912           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.old_owf_password");
   59913           0 :                 return -1;
   59914             :         }
   59915           0 :         object->out.old_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.old_owf_password);
   59916           0 :         if (object->out.old_owf_password == NULL) {
   59917           0 :                 PyErr_NoMemory();
   59918           0 :                 return -1;
   59919             :         }
   59920           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   59921           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59922           0 :                 PyErr_NoMemory();
   59923           0 :                 return -1;
   59924             :         }
   59925           0 :         object->out.old_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   59926           0 :         return 0;
   59927             : }
   59928             : 
   59929           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_trust_info(PyObject *obj, void *closure)
   59930             : {
   59931           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59932           0 :         PyObject *py_trust_info;
   59933           0 :         if (object->out.trust_info == NULL) {
   59934           0 :                 Py_RETURN_NONE;
   59935             :         }
   59936           0 :         if (*object->out.trust_info == NULL) {
   59937           0 :                 py_trust_info = Py_None;
   59938           0 :                 Py_INCREF(py_trust_info);
   59939             :         } else {
   59940           0 :                 py_trust_info = pytalloc_reference_ex(&netr_TrustInfo_Type, *object->out.trust_info, *object->out.trust_info);
   59941             :         }
   59942           0 :         return py_trust_info;
   59943             : }
   59944             : 
   59945           0 : static int py_netr_ServerGetTrustInfo_out_set_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   59946             : {
   59947           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59948           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trust_info));
   59949           0 :         if (value == NULL) {
   59950           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.trust_info");
   59951           0 :                 return -1;
   59952             :         }
   59953           0 :         object->out.trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trust_info);
   59954           0 :         if (object->out.trust_info == NULL) {
   59955           0 :                 PyErr_NoMemory();
   59956           0 :                 return -1;
   59957             :         }
   59958           0 :         if (value == Py_None) {
   59959           0 :                 *object->out.trust_info = NULL;
   59960             :         } else {
   59961           0 :                 *object->out.trust_info = NULL;
   59962           0 :                 PY_CHECK_TYPE(&netr_TrustInfo_Type, value, return -1;);
   59963           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59964           0 :                         PyErr_NoMemory();
   59965           0 :                         return -1;
   59966             :                 }
   59967           0 :                 *object->out.trust_info = (struct netr_TrustInfo *)pytalloc_get_ptr(value);
   59968             :         }
   59969           0 :         return 0;
   59970             : }
   59971             : 
   59972           0 : static PyObject *py_netr_ServerGetTrustInfo_get_result(PyObject *obj, void *closure)
   59973             : {
   59974           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
   59975           0 :         PyObject *py_result;
   59976           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   59977           0 :         return py_result;
   59978             : }
   59979             : 
   59980           0 : static int py_netr_ServerGetTrustInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   59981             : {
   59982           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   59983           0 :         if (value == NULL) {
   59984           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   59985           0 :                 return -1;
   59986             :         }
   59987           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   59988           0 :         return 0;
   59989             : }
   59990             : 
   59991             : static PyGetSetDef py_netr_ServerGetTrustInfo_getsetters[] = {
   59992             :         {
   59993             :                 .name = discard_const_p(char, "in_server_name"),
   59994             :                 .get = py_netr_ServerGetTrustInfo_in_get_server_name,
   59995             :                 .set = py_netr_ServerGetTrustInfo_in_set_server_name,
   59996             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59997             :         },
   59998             :         {
   59999             :                 .name = discard_const_p(char, "in_account_name"),
   60000             :                 .get = py_netr_ServerGetTrustInfo_in_get_account_name,
   60001             :                 .set = py_netr_ServerGetTrustInfo_in_set_account_name,
   60002             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   60003             :         },
   60004             :         {
   60005             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   60006             :                 .get = py_netr_ServerGetTrustInfo_in_get_secure_channel_type,
   60007             :                 .set = py_netr_ServerGetTrustInfo_in_set_secure_channel_type,
   60008             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   60009             :         },
   60010             :         {
   60011             :                 .name = discard_const_p(char, "in_computer_name"),
   60012             :                 .get = py_netr_ServerGetTrustInfo_in_get_computer_name,
   60013             :                 .set = py_netr_ServerGetTrustInfo_in_set_computer_name,
   60014             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   60015             :         },
   60016             :         {
   60017             :                 .name = discard_const_p(char, "in_credential"),
   60018             :                 .get = py_netr_ServerGetTrustInfo_in_get_credential,
   60019             :                 .set = py_netr_ServerGetTrustInfo_in_set_credential,
   60020             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   60021             :         },
   60022             :         {
   60023             :                 .name = discard_const_p(char, "out_return_authenticator"),
   60024             :                 .get = py_netr_ServerGetTrustInfo_out_get_return_authenticator,
   60025             :                 .set = py_netr_ServerGetTrustInfo_out_set_return_authenticator,
   60026             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   60027             :         },
   60028             :         {
   60029             :                 .name = discard_const_p(char, "out_new_owf_password"),
   60030             :                 .get = py_netr_ServerGetTrustInfo_out_get_new_owf_password,
   60031             :                 .set = py_netr_ServerGetTrustInfo_out_set_new_owf_password,
   60032             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   60033             :         },
   60034             :         {
   60035             :                 .name = discard_const_p(char, "out_old_owf_password"),
   60036             :                 .get = py_netr_ServerGetTrustInfo_out_get_old_owf_password,
   60037             :                 .set = py_netr_ServerGetTrustInfo_out_set_old_owf_password,
   60038             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   60039             :         },
   60040             :         {
   60041             :                 .name = discard_const_p(char, "out_trust_info"),
   60042             :                 .get = py_netr_ServerGetTrustInfo_out_get_trust_info,
   60043             :                 .set = py_netr_ServerGetTrustInfo_out_set_trust_info,
   60044             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustInfo")
   60045             :         },
   60046             :         {
   60047             :                 .name = discard_const_p(char, "result"),
   60048             :                 .get = py_netr_ServerGetTrustInfo_get_result,
   60049             :                 .set = py_netr_ServerGetTrustInfo_set_result,
   60050             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   60051             :         },
   60052             :         { .name = NULL }
   60053             : };
   60054             : 
   60055           0 : static PyObject *py_netr_ServerGetTrustInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   60056             : {
   60057           0 :         PyObject *self = pytalloc_new(struct netr_ServerGetTrustInfo, type);
   60058           0 :         struct netr_ServerGetTrustInfo *_self = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(self);
   60059           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   60060           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   60061           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   60062           0 :         _self->out.new_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   60063           0 :         _self->out.old_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   60064             :         /* a pointer to a NULL pointer */
   60065           0 :         _self->out.trust_info = talloc_zero(mem_ctx, struct netr_TrustInfo *);
   60066           0 :         return self;
   60067             : }
   60068             : 
   60069           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   60070             : {
   60071             : 
   60072             : 
   60073           0 :         return PyLong_FromLong(46);
   60074             : }
   60075             : 
   60076           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   60077             : {
   60078           0 :         const struct ndr_interface_call *call = NULL;
   60079           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   60080           0 :         PyObject *ret = NULL;
   60081           0 :         struct ndr_push *push = NULL;
   60082           0 :         DATA_BLOB blob;
   60083           0 :         enum ndr_err_code err;
   60084             : 
   60085           0 :         if (ndr_table_netlogon.num_calls < 47) {
   60086           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_pack");
   60087           0 :                 return NULL;
   60088             :         }
   60089           0 :         call = &ndr_table_netlogon.calls[46];
   60090             : 
   60091           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   60092           0 :         if (push == NULL) {
   60093           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60094           0 :                 return NULL;
   60095             :         }
   60096             : 
   60097           0 :         push->flags |= ndr_push_flags;
   60098             : 
   60099           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   60100           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60101           0 :                 TALLOC_FREE(push);
   60102           0 :                 PyErr_SetNdrError(err);
   60103           0 :                 return NULL;
   60104             :         }
   60105           0 :         blob = ndr_push_blob(push);
   60106           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   60107           0 :         TALLOC_FREE(push);
   60108           0 :         return ret;
   60109             : }
   60110             : 
   60111           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60112             : {
   60113           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60114           0 :         PyObject *bigendian_obj = NULL;
   60115           0 :         PyObject *ndr64_obj = NULL;
   60116           0 :         libndr_flags ndr_push_flags = 0;
   60117             : 
   60118           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   60119             :                 discard_const_p(char *, kwnames),
   60120             :                 &bigendian_obj,
   60121             :                 &ndr64_obj)) {
   60122           0 :                 return NULL;
   60123             :         }
   60124             : 
   60125           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60126           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60127             :         }
   60128           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60129           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60130             :         }
   60131             : 
   60132           0 :         return py_netr_ServerGetTrustInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   60133             : }
   60134             : 
   60135           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60136             : {
   60137           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60138           0 :         PyObject *bigendian_obj = NULL;
   60139           0 :         PyObject *ndr64_obj = NULL;
   60140           0 :         libndr_flags ndr_push_flags = 0;
   60141             : 
   60142           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   60143             :                 discard_const_p(char *, kwnames),
   60144             :                 &bigendian_obj,
   60145             :                 &ndr64_obj)) {
   60146           0 :                 return NULL;
   60147             :         }
   60148             : 
   60149           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60150           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60151             :         }
   60152           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60153           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60154             :         }
   60155             : 
   60156           0 :         return py_netr_ServerGetTrustInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   60157             : }
   60158             : 
   60159           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   60160             : {
   60161           0 :         const struct ndr_interface_call *call = NULL;
   60162           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   60163           0 :         struct ndr_pull *pull = NULL;
   60164           0 :         enum ndr_err_code err;
   60165             : 
   60166           0 :         if (ndr_table_netlogon.num_calls < 47) {
   60167           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_unpack");
   60168           0 :                 return NULL;
   60169             :         }
   60170           0 :         call = &ndr_table_netlogon.calls[46];
   60171             : 
   60172           0 :         pull = ndr_pull_init_blob(blob, object);
   60173           0 :         if (pull == NULL) {
   60174           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60175           0 :                 return NULL;
   60176             :         }
   60177             : 
   60178           0 :         pull->flags |= ndr_pull_flags;
   60179             : 
   60180           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   60181           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60182           0 :                 TALLOC_FREE(pull);
   60183           0 :                 PyErr_SetNdrError(err);
   60184           0 :                 return NULL;
   60185             :         }
   60186           0 :         if (!allow_remaining) {
   60187           0 :                 uint32_t highest_ofs;
   60188             : 
   60189           0 :                 if (pull->offset > pull->relative_highest_offset) {
   60190           0 :                         highest_ofs = pull->offset;
   60191             :                 } else {
   60192           0 :                         highest_ofs = pull->relative_highest_offset;
   60193             :                 }
   60194           0 :                 if (highest_ofs < pull->data_size) {
   60195           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   60196             :                                 "not all bytes consumed ofs[%u] size[%u]",
   60197             :                                 highest_ofs, pull->data_size);
   60198           0 :                         TALLOC_FREE(pull);
   60199           0 :                         PyErr_SetNdrError(err);
   60200           0 :                         return NULL;
   60201             :                 }
   60202             :         }
   60203             : 
   60204           0 :         TALLOC_FREE(pull);
   60205           0 :         Py_RETURN_NONE;
   60206             : }
   60207             : 
   60208           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60209             : {
   60210           0 :         DATA_BLOB blob;
   60211           0 :         Py_ssize_t blob_length = 0;
   60212           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60213           0 :         PyObject *bigendian_obj = NULL;
   60214           0 :         PyObject *ndr64_obj = NULL;
   60215           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60216           0 :         PyObject *allow_remaining_obj = NULL;
   60217           0 :         bool allow_remaining = false;
   60218             : 
   60219           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   60220             :                 discard_const_p(char *, kwnames),
   60221             :                 &blob.data, &blob_length,
   60222             :                 &bigendian_obj,
   60223             :                 &ndr64_obj,
   60224             :                 &allow_remaining_obj)) {
   60225           0 :                 return NULL;
   60226             :         }
   60227           0 :         blob.length = blob_length;
   60228             : 
   60229           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60230           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60231             :         }
   60232           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60233           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60234             :         }
   60235             : 
   60236           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60237           0 :                 allow_remaining = true;
   60238             :         }
   60239             : 
   60240           0 :         return py_netr_ServerGetTrustInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   60241             : }
   60242             : 
   60243           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60244             : {
   60245           0 :         DATA_BLOB blob;
   60246           0 :         Py_ssize_t blob_length = 0;
   60247           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60248           0 :         PyObject *bigendian_obj = NULL;
   60249           0 :         PyObject *ndr64_obj = NULL;
   60250           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60251           0 :         PyObject *allow_remaining_obj = NULL;
   60252           0 :         bool allow_remaining = false;
   60253             : 
   60254           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   60255             :                 discard_const_p(char *, kwnames),
   60256             :                 &blob.data, &blob_length,
   60257             :                 &bigendian_obj,
   60258             :                 &ndr64_obj,
   60259             :                 &allow_remaining_obj)) {
   60260           0 :                 return NULL;
   60261             :         }
   60262           0 :         blob.length = blob_length;
   60263             : 
   60264           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60265           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60266             :         }
   60267           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60268           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60269             :         }
   60270             : 
   60271           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60272           0 :                 allow_remaining = true;
   60273             :         }
   60274             : 
   60275           0 :         return py_netr_ServerGetTrustInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   60276             : }
   60277             : 
   60278           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   60279             : {
   60280           0 :         const struct ndr_interface_call *call = NULL;
   60281           0 :         struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
   60282           0 :         PyObject *ret;
   60283           0 :         char *retstr;
   60284             : 
   60285           0 :         if (ndr_table_netlogon.num_calls < 47) {
   60286           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_print");
   60287           0 :                 return NULL;
   60288             :         }
   60289           0 :         call = &ndr_table_netlogon.calls[46];
   60290             : 
   60291           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   60292           0 :         ret = PyUnicode_FromString(retstr);
   60293           0 :         TALLOC_FREE(retstr);
   60294             : 
   60295           0 :         return ret;
   60296             : }
   60297             : 
   60298           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60299             : {
   60300           0 :         return py_netr_ServerGetTrustInfo_ndr_print(py_obj, "netr_ServerGetTrustInfo_in", NDR_IN);
   60301             : }
   60302             : 
   60303           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60304             : {
   60305           0 :         return py_netr_ServerGetTrustInfo_ndr_print(py_obj, "netr_ServerGetTrustInfo_out", NDR_OUT);
   60306             : }
   60307             : 
   60308             : static PyMethodDef py_netr_ServerGetTrustInfo_methods[] = {
   60309             :         { "opnum", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   60310             :                 "netlogon.netr_ServerGetTrustInfo.opnum() -> 46 (0x2e) " },
   60311             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   60312             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   60313             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   60314             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   60315             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   60316             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   60317             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   60318             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   60319             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   60320             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   60321             :         { NULL, NULL, 0, NULL }
   60322             : };
   60323             : 
   60324             : 
   60325             : static PyTypeObject netr_ServerGetTrustInfo_Type = {
   60326             :         PyVarObject_HEAD_INIT(NULL, 0)
   60327             :         .tp_name = "netlogon.netr_ServerGetTrustInfo",
   60328             :         .tp_getset = py_netr_ServerGetTrustInfo_getsetters,
   60329             :         .tp_methods = py_netr_ServerGetTrustInfo_methods,
   60330             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   60331             :         .tp_new = py_netr_ServerGetTrustInfo_new,
   60332             : };
   60333             : 
   60334           0 : static bool pack_py_netr_ServerGetTrustInfo_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerGetTrustInfo *r)
   60335             : {
   60336           0 :         PyObject *py_server_name;
   60337           0 :         PyObject *py_account_name;
   60338           0 :         PyObject *py_secure_channel_type;
   60339           0 :         PyObject *py_computer_name;
   60340           0 :         PyObject *py_credential;
   60341           0 :         const char *kwnames[] = {
   60342             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
   60343             :         };
   60344             : 
   60345           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)) {
   60346           0 :                 return false;
   60347             :         }
   60348             : 
   60349           0 :         if (py_server_name == NULL) {
   60350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   60351           0 :                 return false;
   60352             :         }
   60353           0 :         if (py_server_name == Py_None) {
   60354           0 :                 r->in.server_name = NULL;
   60355             :         } else {
   60356           0 :                 r->in.server_name = NULL;
   60357             :                 {
   60358           0 :                         const char *test_str;
   60359           0 :                         const char *talloc_str;
   60360           0 :                         PyObject *unicode = NULL;
   60361           0 :                         if (PyUnicode_Check(py_server_name)) {
   60362           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   60363           0 :                                 if (unicode == NULL) {
   60364           0 :                                         return false;
   60365             :                                 }
   60366           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   60367           0 :                         } else if (PyBytes_Check(py_server_name)) {
   60368           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   60369             :                         } else {
   60370           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   60371           0 :                                 return false;
   60372             :                         }
   60373           0 :                         talloc_str = talloc_strdup(r, test_str);
   60374           0 :                         if (unicode != NULL) {
   60375           0 :                                 Py_DECREF(unicode);
   60376             :                         }
   60377           0 :                         if (talloc_str == NULL) {
   60378           0 :                                 PyErr_NoMemory();
   60379           0 :                                 return false;
   60380             :                         }
   60381           0 :                         r->in.server_name = talloc_str;
   60382             :                 }
   60383             :         }
   60384           0 :         if (py_account_name == NULL) {
   60385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
   60386           0 :                 return false;
   60387             :         }
   60388           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   60389           0 :         if (r->in.account_name == NULL) {
   60390           0 :                 PyErr_NoMemory();
   60391           0 :                 return false;
   60392             :         }
   60393             :         {
   60394           0 :                 const char *test_str;
   60395           0 :                 const char *talloc_str;
   60396           0 :                 PyObject *unicode = NULL;
   60397           0 :                 if (PyUnicode_Check(py_account_name)) {
   60398           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   60399           0 :                         if (unicode == NULL) {
   60400           0 :                                 return false;
   60401             :                         }
   60402           0 :                         test_str = PyBytes_AS_STRING(unicode);
   60403           0 :                 } else if (PyBytes_Check(py_account_name)) {
   60404           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   60405             :                 } else {
   60406           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   60407           0 :                         return false;
   60408             :                 }
   60409           0 :                 talloc_str = talloc_strdup(r, test_str);
   60410           0 :                 if (unicode != NULL) {
   60411           0 :                         Py_DECREF(unicode);
   60412             :                 }
   60413           0 :                 if (talloc_str == NULL) {
   60414           0 :                         PyErr_NoMemory();
   60415           0 :                         return false;
   60416             :                 }
   60417           0 :                 r->in.account_name = talloc_str;
   60418             :         }
   60419           0 :         if (py_secure_channel_type == NULL) {
   60420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
   60421           0 :                 return false;
   60422             :         }
   60423             :         {
   60424           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   60425           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   60426           0 :                         unsigned long long test_var;
   60427           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   60428           0 :                         if (PyErr_Occurred() != NULL) {
   60429           0 :                                 return false;
   60430             :                         }
   60431           0 :                         if (test_var > uint_max) {
   60432           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   60433             :                                   PyLong_Type.tp_name, uint_max, test_var);
   60434           0 :                                 return false;
   60435             :                         }
   60436           0 :                         r->in.secure_channel_type = test_var;
   60437             :                 } else {
   60438           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   60439             :                           PyLong_Type.tp_name);
   60440           0 :                         return false;
   60441             :                 }
   60442             :         }
   60443           0 :         if (py_computer_name == NULL) {
   60444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   60445           0 :                 return false;
   60446             :         }
   60447           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   60448           0 :         if (r->in.computer_name == NULL) {
   60449           0 :                 PyErr_NoMemory();
   60450           0 :                 return false;
   60451             :         }
   60452             :         {
   60453           0 :                 const char *test_str;
   60454           0 :                 const char *talloc_str;
   60455           0 :                 PyObject *unicode = NULL;
   60456           0 :                 if (PyUnicode_Check(py_computer_name)) {
   60457           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   60458           0 :                         if (unicode == NULL) {
   60459           0 :                                 return false;
   60460             :                         }
   60461           0 :                         test_str = PyBytes_AS_STRING(unicode);
   60462           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   60463           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   60464             :                 } else {
   60465           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   60466           0 :                         return false;
   60467             :                 }
   60468           0 :                 talloc_str = talloc_strdup(r, test_str);
   60469           0 :                 if (unicode != NULL) {
   60470           0 :                         Py_DECREF(unicode);
   60471             :                 }
   60472           0 :                 if (talloc_str == NULL) {
   60473           0 :                         PyErr_NoMemory();
   60474           0 :                         return false;
   60475             :                 }
   60476           0 :                 r->in.computer_name = talloc_str;
   60477             :         }
   60478           0 :         if (py_credential == NULL) {
   60479           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   60480           0 :                 return false;
   60481             :         }
   60482           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   60483           0 :         if (r->in.credential == NULL) {
   60484           0 :                 PyErr_NoMemory();
   60485           0 :                 return false;
   60486             :         }
   60487           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   60488           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   60489           0 :                 PyErr_NoMemory();
   60490           0 :                 return false;
   60491             :         }
   60492           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   60493           0 :         return true;
   60494             : }
   60495             : 
   60496           0 : static PyObject *unpack_py_netr_ServerGetTrustInfo_args_out(struct netr_ServerGetTrustInfo *r)
   60497             : {
   60498           0 :         PyObject *result;
   60499           0 :         PyObject *py_return_authenticator;
   60500           0 :         PyObject *py_new_owf_password;
   60501           0 :         PyObject *py_old_owf_password;
   60502           0 :         PyObject *py_trust_info;
   60503           0 :         result = PyTuple_New(4);
   60504           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   60505           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   60506           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.new_owf_password, r->out.new_owf_password);
   60507           0 :         PyTuple_SetItem(result, 1, py_new_owf_password);
   60508           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.old_owf_password, r->out.old_owf_password);
   60509           0 :         PyTuple_SetItem(result, 2, py_old_owf_password);
   60510           0 :         if (*r->out.trust_info == NULL) {
   60511           0 :                 py_trust_info = Py_None;
   60512           0 :                 Py_INCREF(py_trust_info);
   60513             :         } else {
   60514           0 :                 py_trust_info = pytalloc_reference_ex(&netr_TrustInfo_Type, *r->out.trust_info, *r->out.trust_info);
   60515             :         }
   60516           0 :         PyTuple_SetItem(result, 3, py_trust_info);
   60517           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   60518           0 :                 PyErr_SetNTSTATUS(r->out.result);
   60519           0 :                 return NULL;
   60520             :         }
   60521             : 
   60522           0 :         return result;
   60523             : }
   60524             : 
   60525             : 
   60526           0 : static PyObject *py_netr_Unused47_get_result(PyObject *obj, void *closure)
   60527             : {
   60528           0 :         struct netr_Unused47 *object = pytalloc_get_ptr(obj);
   60529           0 :         PyObject *py_result;
   60530           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   60531           0 :         return py_result;
   60532             : }
   60533             : 
   60534           0 : static int py_netr_Unused47_set_result(PyObject *py_obj, PyObject *value, void *closure)
   60535             : {
   60536           0 :         struct netr_Unused47 *object = pytalloc_get_ptr(py_obj);
   60537           0 :         if (value == NULL) {
   60538           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   60539           0 :                 return -1;
   60540             :         }
   60541           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   60542           0 :         return 0;
   60543             : }
   60544             : 
   60545             : static PyGetSetDef py_netr_Unused47_getsetters[] = {
   60546             :         {
   60547             :                 .name = discard_const_p(char, "result"),
   60548             :                 .get = py_netr_Unused47_get_result,
   60549             :                 .set = py_netr_Unused47_set_result,
   60550             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   60551             :         },
   60552             :         { .name = NULL }
   60553             : };
   60554             : 
   60555           0 : static PyObject *py_netr_Unused47_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   60556             : {
   60557           0 :         PyObject *self = pytalloc_new(struct netr_Unused47, type);
   60558           0 :         return self;
   60559             : }
   60560             : 
   60561           0 : static PyObject *py_netr_Unused47_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   60562             : {
   60563             : 
   60564             : 
   60565           0 :         return PyLong_FromLong(47);
   60566             : }
   60567             : 
   60568           0 : static PyObject *py_netr_Unused47_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   60569             : {
   60570           0 :         const struct ndr_interface_call *call = NULL;
   60571           0 :         struct netr_Unused47 *object = pytalloc_get_ptr(py_obj);
   60572           0 :         PyObject *ret = NULL;
   60573           0 :         struct ndr_push *push = NULL;
   60574           0 :         DATA_BLOB blob;
   60575           0 :         enum ndr_err_code err;
   60576             : 
   60577           0 :         if (ndr_table_netlogon.num_calls < 48) {
   60578           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_pack");
   60579           0 :                 return NULL;
   60580             :         }
   60581           0 :         call = &ndr_table_netlogon.calls[47];
   60582             : 
   60583           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   60584           0 :         if (push == NULL) {
   60585           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60586           0 :                 return NULL;
   60587             :         }
   60588             : 
   60589           0 :         push->flags |= ndr_push_flags;
   60590             : 
   60591           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   60592           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60593           0 :                 TALLOC_FREE(push);
   60594           0 :                 PyErr_SetNdrError(err);
   60595           0 :                 return NULL;
   60596             :         }
   60597           0 :         blob = ndr_push_blob(push);
   60598           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   60599           0 :         TALLOC_FREE(push);
   60600           0 :         return ret;
   60601             : }
   60602             : 
   60603           0 : static PyObject *py_netr_Unused47_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60604             : {
   60605           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60606           0 :         PyObject *bigendian_obj = NULL;
   60607           0 :         PyObject *ndr64_obj = NULL;
   60608           0 :         libndr_flags ndr_push_flags = 0;
   60609             : 
   60610           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   60611             :                 discard_const_p(char *, kwnames),
   60612             :                 &bigendian_obj,
   60613             :                 &ndr64_obj)) {
   60614           0 :                 return NULL;
   60615             :         }
   60616             : 
   60617           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60618           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60619             :         }
   60620           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60621           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60622             :         }
   60623             : 
   60624           0 :         return py_netr_Unused47_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   60625             : }
   60626             : 
   60627           0 : static PyObject *py_netr_Unused47_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60628             : {
   60629           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60630           0 :         PyObject *bigendian_obj = NULL;
   60631           0 :         PyObject *ndr64_obj = NULL;
   60632           0 :         libndr_flags ndr_push_flags = 0;
   60633             : 
   60634           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   60635             :                 discard_const_p(char *, kwnames),
   60636             :                 &bigendian_obj,
   60637             :                 &ndr64_obj)) {
   60638           0 :                 return NULL;
   60639             :         }
   60640             : 
   60641           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60642           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60643             :         }
   60644           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60645           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60646             :         }
   60647             : 
   60648           0 :         return py_netr_Unused47_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   60649             : }
   60650             : 
   60651           0 : static PyObject *py_netr_Unused47_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   60652             : {
   60653           0 :         const struct ndr_interface_call *call = NULL;
   60654           0 :         struct netr_Unused47 *object = pytalloc_get_ptr(py_obj);
   60655           0 :         struct ndr_pull *pull = NULL;
   60656           0 :         enum ndr_err_code err;
   60657             : 
   60658           0 :         if (ndr_table_netlogon.num_calls < 48) {
   60659           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_unpack");
   60660           0 :                 return NULL;
   60661             :         }
   60662           0 :         call = &ndr_table_netlogon.calls[47];
   60663             : 
   60664           0 :         pull = ndr_pull_init_blob(blob, object);
   60665           0 :         if (pull == NULL) {
   60666           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60667           0 :                 return NULL;
   60668             :         }
   60669             : 
   60670           0 :         pull->flags |= ndr_pull_flags;
   60671             : 
   60672           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   60673           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60674           0 :                 TALLOC_FREE(pull);
   60675           0 :                 PyErr_SetNdrError(err);
   60676           0 :                 return NULL;
   60677             :         }
   60678           0 :         if (!allow_remaining) {
   60679           0 :                 uint32_t highest_ofs;
   60680             : 
   60681           0 :                 if (pull->offset > pull->relative_highest_offset) {
   60682           0 :                         highest_ofs = pull->offset;
   60683             :                 } else {
   60684           0 :                         highest_ofs = pull->relative_highest_offset;
   60685             :                 }
   60686           0 :                 if (highest_ofs < pull->data_size) {
   60687           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   60688             :                                 "not all bytes consumed ofs[%u] size[%u]",
   60689             :                                 highest_ofs, pull->data_size);
   60690           0 :                         TALLOC_FREE(pull);
   60691           0 :                         PyErr_SetNdrError(err);
   60692           0 :                         return NULL;
   60693             :                 }
   60694             :         }
   60695             : 
   60696           0 :         TALLOC_FREE(pull);
   60697           0 :         Py_RETURN_NONE;
   60698             : }
   60699             : 
   60700           0 : static PyObject *py_netr_Unused47_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60701             : {
   60702           0 :         DATA_BLOB blob;
   60703           0 :         Py_ssize_t blob_length = 0;
   60704           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60705           0 :         PyObject *bigendian_obj = NULL;
   60706           0 :         PyObject *ndr64_obj = NULL;
   60707           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60708           0 :         PyObject *allow_remaining_obj = NULL;
   60709           0 :         bool allow_remaining = false;
   60710             : 
   60711           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   60712             :                 discard_const_p(char *, kwnames),
   60713             :                 &blob.data, &blob_length,
   60714             :                 &bigendian_obj,
   60715             :                 &ndr64_obj,
   60716             :                 &allow_remaining_obj)) {
   60717           0 :                 return NULL;
   60718             :         }
   60719           0 :         blob.length = blob_length;
   60720             : 
   60721           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60722           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60723             :         }
   60724           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60725           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60726             :         }
   60727             : 
   60728           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60729           0 :                 allow_remaining = true;
   60730             :         }
   60731             : 
   60732           0 :         return py_netr_Unused47_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   60733             : }
   60734             : 
   60735           0 : static PyObject *py_netr_Unused47_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60736             : {
   60737           0 :         DATA_BLOB blob;
   60738           0 :         Py_ssize_t blob_length = 0;
   60739           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60740           0 :         PyObject *bigendian_obj = NULL;
   60741           0 :         PyObject *ndr64_obj = NULL;
   60742           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60743           0 :         PyObject *allow_remaining_obj = NULL;
   60744           0 :         bool allow_remaining = false;
   60745             : 
   60746           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   60747             :                 discard_const_p(char *, kwnames),
   60748             :                 &blob.data, &blob_length,
   60749             :                 &bigendian_obj,
   60750             :                 &ndr64_obj,
   60751             :                 &allow_remaining_obj)) {
   60752           0 :                 return NULL;
   60753             :         }
   60754           0 :         blob.length = blob_length;
   60755             : 
   60756           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60757           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60758             :         }
   60759           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60760           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60761             :         }
   60762             : 
   60763           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60764           0 :                 allow_remaining = true;
   60765             :         }
   60766             : 
   60767           0 :         return py_netr_Unused47_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   60768             : }
   60769             : 
   60770           0 : static PyObject *py_netr_Unused47_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   60771             : {
   60772           0 :         const struct ndr_interface_call *call = NULL;
   60773           0 :         struct netr_Unused47 *object = pytalloc_get_ptr(py_obj);
   60774           0 :         PyObject *ret;
   60775           0 :         char *retstr;
   60776             : 
   60777           0 :         if (ndr_table_netlogon.num_calls < 48) {
   60778           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_print");
   60779           0 :                 return NULL;
   60780             :         }
   60781           0 :         call = &ndr_table_netlogon.calls[47];
   60782             : 
   60783           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   60784           0 :         ret = PyUnicode_FromString(retstr);
   60785           0 :         TALLOC_FREE(retstr);
   60786             : 
   60787           0 :         return ret;
   60788             : }
   60789             : 
   60790           0 : static PyObject *py_netr_Unused47_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60791             : {
   60792           0 :         return py_netr_Unused47_ndr_print(py_obj, "netr_Unused47_in", NDR_IN);
   60793             : }
   60794             : 
   60795           0 : static PyObject *py_netr_Unused47_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60796             : {
   60797           0 :         return py_netr_Unused47_ndr_print(py_obj, "netr_Unused47_out", NDR_OUT);
   60798             : }
   60799             : 
   60800             : static PyMethodDef py_netr_Unused47_methods[] = {
   60801             :         { "opnum", (PyCFunction)py_netr_Unused47_ndr_opnum, METH_NOARGS|METH_CLASS,
   60802             :                 "netlogon.netr_Unused47.opnum() -> 47 (0x2f) " },
   60803             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   60804             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   60805             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   60806             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   60807             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   60808             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   60809             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   60810             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   60811             :         { "__ndr_print_in__", (PyCFunction)py_netr_Unused47_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   60812             :         { "__ndr_print_out__", (PyCFunction)py_netr_Unused47_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   60813             :         { NULL, NULL, 0, NULL }
   60814             : };
   60815             : 
   60816             : 
   60817             : static PyTypeObject netr_Unused47_Type = {
   60818             :         PyVarObject_HEAD_INIT(NULL, 0)
   60819             :         .tp_name = "netlogon.netr_Unused47",
   60820             :         .tp_getset = py_netr_Unused47_getsetters,
   60821             :         .tp_methods = py_netr_Unused47_methods,
   60822             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   60823             :         .tp_new = py_netr_Unused47_new,
   60824             : };
   60825             : 
   60826           0 : static bool pack_py_netr_Unused47_args_in(PyObject *args, PyObject *kwargs, struct netr_Unused47 *r)
   60827             : {
   60828           0 :         const char *kwnames[] = {
   60829             :                 NULL
   60830             :         };
   60831             : 
   60832           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":netr_Unused47", discard_const_p(char *, kwnames))) {
   60833           0 :                 return false;
   60834             :         }
   60835             : 
   60836           0 :         return true;
   60837             : }
   60838             : 
   60839           0 : static PyObject *unpack_py_netr_Unused47_args_out(struct netr_Unused47 *r)
   60840             : {
   60841           0 :         PyObject *result;
   60842           0 :         result = Py_None;
   60843           0 :         Py_INCREF(result);
   60844           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   60845           0 :                 PyErr_SetNTSTATUS(r->out.result);
   60846           0 :                 return NULL;
   60847             :         }
   60848             : 
   60849           0 :         return result;
   60850             : }
   60851             : 
   60852             : 
   60853           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_server_name(PyObject *obj, void *closure)
   60854             : {
   60855           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
   60856           0 :         PyObject *py_server_name;
   60857           0 :         if (object->in.server_name == NULL) {
   60858           0 :                 Py_RETURN_NONE;
   60859             :         }
   60860           0 :         if (object->in.server_name == NULL) {
   60861           0 :                 py_server_name = Py_None;
   60862           0 :                 Py_INCREF(py_server_name);
   60863             :         } else {
   60864           0 :                 if (object->in.server_name == NULL) {
   60865           0 :                         py_server_name = Py_None;
   60866           0 :                         Py_INCREF(py_server_name);
   60867             :                 } else {
   60868           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   60869             :                 }
   60870             :         }
   60871           0 :         return py_server_name;
   60872             : }
   60873             : 
   60874           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   60875             : {
   60876           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   60877           0 :         if (value == NULL) {
   60878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
   60879           0 :                 return -1;
   60880             :         }
   60881           0 :         if (value == Py_None) {
   60882           0 :                 object->in.server_name = NULL;
   60883             :         } else {
   60884           0 :                 object->in.server_name = NULL;
   60885             :                 {
   60886           0 :                         const char *test_str;
   60887           0 :                         const char *talloc_str;
   60888           0 :                         PyObject *unicode = NULL;
   60889           0 :                         if (PyUnicode_Check(value)) {
   60890           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   60891           0 :                                 if (unicode == NULL) {
   60892           0 :                                         return -1;
   60893             :                                 }
   60894           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   60895           0 :                         } else if (PyBytes_Check(value)) {
   60896           0 :                                 test_str = PyBytes_AS_STRING(value);
   60897             :                         } else {
   60898           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   60899           0 :                                 return -1;
   60900             :                         }
   60901           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   60902           0 :                         if (unicode != NULL) {
   60903           0 :                                 Py_DECREF(unicode);
   60904             :                         }
   60905           0 :                         if (talloc_str == NULL) {
   60906           0 :                                 PyErr_NoMemory();
   60907           0 :                                 return -1;
   60908             :                         }
   60909           0 :                         object->in.server_name = talloc_str;
   60910             :                 }
   60911             :         }
   60912           0 :         return 0;
   60913             : }
   60914             : 
   60915           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_computer_name(PyObject *obj, void *closure)
   60916             : {
   60917           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
   60918           0 :         PyObject *py_computer_name;
   60919           0 :         if (object->in.computer_name == NULL) {
   60920           0 :                 Py_RETURN_NONE;
   60921             :         }
   60922           0 :         if (object->in.computer_name == NULL) {
   60923           0 :                 py_computer_name = Py_None;
   60924           0 :                 Py_INCREF(py_computer_name);
   60925             :         } else {
   60926           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   60927             :         }
   60928           0 :         return py_computer_name;
   60929             : }
   60930             : 
   60931           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   60932             : {
   60933           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   60934           0 :         if (value == NULL) {
   60935           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   60936           0 :                 return -1;
   60937             :         }
   60938           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   60939           0 :         if (object->in.computer_name == NULL) {
   60940           0 :                 PyErr_NoMemory();
   60941           0 :                 return -1;
   60942             :         }
   60943             :         {
   60944           0 :                 const char *test_str;
   60945           0 :                 const char *talloc_str;
   60946           0 :                 PyObject *unicode = NULL;
   60947           0 :                 if (PyUnicode_Check(value)) {
   60948           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   60949           0 :                         if (unicode == NULL) {
   60950           0 :                                 return -1;
   60951             :                         }
   60952           0 :                         test_str = PyBytes_AS_STRING(unicode);
   60953           0 :                 } else if (PyBytes_Check(value)) {
   60954           0 :                         test_str = PyBytes_AS_STRING(value);
   60955             :                 } else {
   60956           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   60957           0 :                         return -1;
   60958             :                 }
   60959           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   60960           0 :                 if (unicode != NULL) {
   60961           0 :                         Py_DECREF(unicode);
   60962             :                 }
   60963           0 :                 if (talloc_str == NULL) {
   60964           0 :                         PyErr_NoMemory();
   60965           0 :                         return -1;
   60966             :                 }
   60967           0 :                 object->in.computer_name = talloc_str;
   60968             :         }
   60969           0 :         return 0;
   60970             : }
   60971             : 
   60972           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_credential(PyObject *obj, void *closure)
   60973             : {
   60974           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
   60975           0 :         PyObject *py_credential;
   60976           0 :         if (object->in.credential == NULL) {
   60977           0 :                 Py_RETURN_NONE;
   60978             :         }
   60979           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   60980           0 :         return py_credential;
   60981             : }
   60982             : 
   60983           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   60984             : {
   60985           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   60986           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   60987           0 :         if (value == NULL) {
   60988           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
   60989           0 :                 return -1;
   60990             :         }
   60991           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   60992           0 :         if (object->in.credential == NULL) {
   60993           0 :                 PyErr_NoMemory();
   60994           0 :                 return -1;
   60995             :         }
   60996           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   60997           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   60998           0 :                 PyErr_NoMemory();
   60999           0 :                 return -1;
   61000             :         }
   61001           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   61002           0 :         return 0;
   61003             : }
   61004             : 
   61005           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_return_authenticator(PyObject *obj, void *closure)
   61006             : {
   61007           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
   61008           0 :         PyObject *py_return_authenticator;
   61009           0 :         if (object->out.return_authenticator == NULL) {
   61010           0 :                 Py_RETURN_NONE;
   61011             :         }
   61012           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   61013           0 :         return py_return_authenticator;
   61014             : }
   61015             : 
   61016           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   61017             : {
   61018           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   61019           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   61020           0 :         if (value == NULL) {
   61021           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
   61022           0 :                 return -1;
   61023             :         }
   61024           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   61025           0 :         if (object->out.return_authenticator == NULL) {
   61026           0 :                 PyErr_NoMemory();
   61027           0 :                 return -1;
   61028             :         }
   61029           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   61030           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   61031           0 :                 PyErr_NoMemory();
   61032           0 :                 return -1;
   61033             :         }
   61034           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   61035           0 :         return 0;
   61036             : }
   61037             : 
   61038           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name(PyObject *obj, void *closure)
   61039             : {
   61040           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
   61041           0 :         PyObject *py_site_name;
   61042           0 :         if (object->in.site_name == NULL) {
   61043           0 :                 Py_RETURN_NONE;
   61044             :         }
   61045           0 :         if (object->in.site_name == NULL) {
   61046           0 :                 py_site_name = Py_None;
   61047           0 :                 Py_INCREF(py_site_name);
   61048             :         } else {
   61049           0 :                 if (object->in.site_name == NULL) {
   61050           0 :                         py_site_name = Py_None;
   61051           0 :                         Py_INCREF(py_site_name);
   61052             :                 } else {
   61053           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   61054             :                 }
   61055             :         }
   61056           0 :         return py_site_name;
   61057             : }
   61058             : 
   61059           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   61060             : {
   61061           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   61062           0 :         if (value == NULL) {
   61063           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.site_name");
   61064           0 :                 return -1;
   61065             :         }
   61066           0 :         if (value == Py_None) {
   61067           0 :                 object->in.site_name = NULL;
   61068             :         } else {
   61069           0 :                 object->in.site_name = NULL;
   61070             :                 {
   61071           0 :                         const char *test_str;
   61072           0 :                         const char *talloc_str;
   61073           0 :                         PyObject *unicode = NULL;
   61074           0 :                         if (PyUnicode_Check(value)) {
   61075           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   61076           0 :                                 if (unicode == NULL) {
   61077           0 :                                         return -1;
   61078             :                                 }
   61079           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   61080           0 :                         } else if (PyBytes_Check(value)) {
   61081           0 :                                 test_str = PyBytes_AS_STRING(value);
   61082             :                         } else {
   61083           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   61084           0 :                                 return -1;
   61085             :                         }
   61086           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   61087           0 :                         if (unicode != NULL) {
   61088           0 :                                 Py_DECREF(unicode);
   61089             :                         }
   61090           0 :                         if (talloc_str == NULL) {
   61091           0 :                                 PyErr_NoMemory();
   61092           0 :                                 return -1;
   61093             :                         }
   61094           0 :                         object->in.site_name = talloc_str;
   61095             :                 }
   61096             :         }
   61097           0 :         return 0;
   61098             : }
   61099             : 
   61100           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl(PyObject *obj, void *closure)
   61101             : {
   61102           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
   61103           0 :         PyObject *py_dns_ttl;
   61104           0 :         py_dns_ttl = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dns_ttl));
   61105           0 :         return py_dns_ttl;
   61106             : }
   61107             : 
   61108           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl(PyObject *py_obj, PyObject *value, void *closure)
   61109             : {
   61110           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   61111           0 :         if (value == NULL) {
   61112           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dns_ttl");
   61113           0 :                 return -1;
   61114             :         }
   61115             :         {
   61116           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dns_ttl));
   61117           0 :                 if (PyLong_Check(value)) {
   61118           0 :                         unsigned long long test_var;
   61119           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   61120           0 :                         if (PyErr_Occurred() != NULL) {
   61121           0 :                                 return -1;
   61122             :                         }
   61123           0 :                         if (test_var > uint_max) {
   61124           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   61125             :                                   PyLong_Type.tp_name, uint_max, test_var);
   61126           0 :                                 return -1;
   61127             :                         }
   61128           0 :                         object->in.dns_ttl = test_var;
   61129             :                 } else {
   61130           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   61131             :                           PyLong_Type.tp_name);
   61132           0 :                         return -1;
   61133             :                 }
   61134             :         }
   61135           0 :         return 0;
   61136             : }
   61137             : 
   61138           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names(PyObject *obj, void *closure)
   61139             : {
   61140           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
   61141           0 :         PyObject *py_dns_names;
   61142           0 :         if (object->in.dns_names == NULL) {
   61143           0 :                 Py_RETURN_NONE;
   61144             :         }
   61145           0 :         py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, object->in.dns_names, object->in.dns_names);
   61146           0 :         return py_dns_names;
   61147             : }
   61148             : 
   61149           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   61150             : {
   61151           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   61152           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dns_names));
   61153           0 :         if (value == NULL) {
   61154           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dns_names");
   61155           0 :                 return -1;
   61156             :         }
   61157           0 :         object->in.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_names);
   61158           0 :         if (object->in.dns_names == NULL) {
   61159           0 :                 PyErr_NoMemory();
   61160           0 :                 return -1;
   61161             :         }
   61162           0 :         PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   61163           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   61164           0 :                 PyErr_NoMemory();
   61165           0 :                 return -1;
   61166             :         }
   61167           0 :         object->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   61168           0 :         return 0;
   61169             : }
   61170             : 
   61171           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names(PyObject *obj, void *closure)
   61172             : {
   61173           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
   61174           0 :         PyObject *py_dns_names;
   61175           0 :         if (object->out.dns_names == NULL) {
   61176           0 :                 Py_RETURN_NONE;
   61177             :         }
   61178           0 :         py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, object->out.dns_names, object->out.dns_names);
   61179           0 :         return py_dns_names;
   61180             : }
   61181             : 
   61182           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   61183             : {
   61184           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   61185           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dns_names));
   61186           0 :         if (value == NULL) {
   61187           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.dns_names");
   61188           0 :                 return -1;
   61189             :         }
   61190           0 :         object->out.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dns_names);
   61191           0 :         if (object->out.dns_names == NULL) {
   61192           0 :                 PyErr_NoMemory();
   61193           0 :                 return -1;
   61194             :         }
   61195           0 :         PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   61196           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   61197           0 :                 PyErr_NoMemory();
   61198           0 :                 return -1;
   61199             :         }
   61200           0 :         object->out.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   61201           0 :         return 0;
   61202             : }
   61203             : 
   61204           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_get_result(PyObject *obj, void *closure)
   61205             : {
   61206           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
   61207           0 :         PyObject *py_result;
   61208           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   61209           0 :         return py_result;
   61210             : }
   61211             : 
   61212           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
   61213             : {
   61214           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   61215           0 :         if (value == NULL) {
   61216           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   61217           0 :                 return -1;
   61218             :         }
   61219           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   61220           0 :         return 0;
   61221             : }
   61222             : 
   61223             : static PyGetSetDef py_netr_DsrUpdateReadOnlyServerDnsRecords_getsetters[] = {
   61224             :         {
   61225             :                 .name = discard_const_p(char, "in_server_name"),
   61226             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_server_name,
   61227             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_server_name,
   61228             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   61229             :         },
   61230             :         {
   61231             :                 .name = discard_const_p(char, "in_computer_name"),
   61232             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_computer_name,
   61233             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_computer_name,
   61234             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   61235             :         },
   61236             :         {
   61237             :                 .name = discard_const_p(char, "in_credential"),
   61238             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_credential,
   61239             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_credential,
   61240             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   61241             :         },
   61242             :         {
   61243             :                 .name = discard_const_p(char, "out_return_authenticator"),
   61244             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_return_authenticator,
   61245             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_return_authenticator,
   61246             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   61247             :         },
   61248             :         {
   61249             :                 .name = discard_const_p(char, "in_site_name"),
   61250             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name,
   61251             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name,
   61252             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   61253             :         },
   61254             :         {
   61255             :                 .name = discard_const_p(char, "in_dns_ttl"),
   61256             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl,
   61257             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl,
   61258             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   61259             :         },
   61260             :         {
   61261             :                 .name = discard_const_p(char, "in_dns_names"),
   61262             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names,
   61263             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names,
   61264             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   61265             :         },
   61266             :         {
   61267             :                 .name = discard_const_p(char, "out_dns_names"),
   61268             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names,
   61269             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names,
   61270             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   61271             :         },
   61272             :         {
   61273             :                 .name = discard_const_p(char, "result"),
   61274             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_get_result,
   61275             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_set_result,
   61276             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   61277             :         },
   61278             :         { .name = NULL }
   61279             : };
   61280             : 
   61281           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   61282             : {
   61283           0 :         PyObject *self = pytalloc_new(struct netr_DsrUpdateReadOnlyServerDnsRecords, type);
   61284           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *_self = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(self);
   61285           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   61286           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   61287           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   61288           0 :         _self->in.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   61289           0 :         _self->out.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   61290           0 :         return self;
   61291             : }
   61292             : 
   61293           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   61294             : {
   61295             : 
   61296             : 
   61297           0 :         return PyLong_FromLong(48);
   61298             : }
   61299             : 
   61300           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   61301             : {
   61302           0 :         const struct ndr_interface_call *call = NULL;
   61303           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   61304           0 :         PyObject *ret = NULL;
   61305           0 :         struct ndr_push *push = NULL;
   61306           0 :         DATA_BLOB blob;
   61307           0 :         enum ndr_err_code err;
   61308             : 
   61309           0 :         if (ndr_table_netlogon.num_calls < 49) {
   61310           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack");
   61311           0 :                 return NULL;
   61312             :         }
   61313           0 :         call = &ndr_table_netlogon.calls[48];
   61314             : 
   61315           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   61316           0 :         if (push == NULL) {
   61317           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   61318           0 :                 return NULL;
   61319             :         }
   61320             : 
   61321           0 :         push->flags |= ndr_push_flags;
   61322             : 
   61323           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   61324           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   61325           0 :                 TALLOC_FREE(push);
   61326           0 :                 PyErr_SetNdrError(err);
   61327           0 :                 return NULL;
   61328             :         }
   61329           0 :         blob = ndr_push_blob(push);
   61330           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   61331           0 :         TALLOC_FREE(push);
   61332           0 :         return ret;
   61333             : }
   61334             : 
   61335           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61336             : {
   61337           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   61338           0 :         PyObject *bigendian_obj = NULL;
   61339           0 :         PyObject *ndr64_obj = NULL;
   61340           0 :         libndr_flags ndr_push_flags = 0;
   61341             : 
   61342           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   61343             :                 discard_const_p(char *, kwnames),
   61344             :                 &bigendian_obj,
   61345             :                 &ndr64_obj)) {
   61346           0 :                 return NULL;
   61347             :         }
   61348             : 
   61349           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61350           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   61351             :         }
   61352           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61353           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   61354             :         }
   61355             : 
   61356           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   61357             : }
   61358             : 
   61359           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61360             : {
   61361           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   61362           0 :         PyObject *bigendian_obj = NULL;
   61363           0 :         PyObject *ndr64_obj = NULL;
   61364           0 :         libndr_flags ndr_push_flags = 0;
   61365             : 
   61366           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   61367             :                 discard_const_p(char *, kwnames),
   61368             :                 &bigendian_obj,
   61369             :                 &ndr64_obj)) {
   61370           0 :                 return NULL;
   61371             :         }
   61372             : 
   61373           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61374           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   61375             :         }
   61376           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61377           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   61378             :         }
   61379             : 
   61380           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   61381             : }
   61382             : 
   61383           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   61384             : {
   61385           0 :         const struct ndr_interface_call *call = NULL;
   61386           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   61387           0 :         struct ndr_pull *pull = NULL;
   61388           0 :         enum ndr_err_code err;
   61389             : 
   61390           0 :         if (ndr_table_netlogon.num_calls < 49) {
   61391           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack");
   61392           0 :                 return NULL;
   61393             :         }
   61394           0 :         call = &ndr_table_netlogon.calls[48];
   61395             : 
   61396           0 :         pull = ndr_pull_init_blob(blob, object);
   61397           0 :         if (pull == NULL) {
   61398           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   61399           0 :                 return NULL;
   61400             :         }
   61401             : 
   61402           0 :         pull->flags |= ndr_pull_flags;
   61403             : 
   61404           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   61405           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   61406           0 :                 TALLOC_FREE(pull);
   61407           0 :                 PyErr_SetNdrError(err);
   61408           0 :                 return NULL;
   61409             :         }
   61410           0 :         if (!allow_remaining) {
   61411           0 :                 uint32_t highest_ofs;
   61412             : 
   61413           0 :                 if (pull->offset > pull->relative_highest_offset) {
   61414           0 :                         highest_ofs = pull->offset;
   61415             :                 } else {
   61416           0 :                         highest_ofs = pull->relative_highest_offset;
   61417             :                 }
   61418           0 :                 if (highest_ofs < pull->data_size) {
   61419           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   61420             :                                 "not all bytes consumed ofs[%u] size[%u]",
   61421             :                                 highest_ofs, pull->data_size);
   61422           0 :                         TALLOC_FREE(pull);
   61423           0 :                         PyErr_SetNdrError(err);
   61424           0 :                         return NULL;
   61425             :                 }
   61426             :         }
   61427             : 
   61428           0 :         TALLOC_FREE(pull);
   61429           0 :         Py_RETURN_NONE;
   61430             : }
   61431             : 
   61432           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61433             : {
   61434           0 :         DATA_BLOB blob;
   61435           0 :         Py_ssize_t blob_length = 0;
   61436           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   61437           0 :         PyObject *bigendian_obj = NULL;
   61438           0 :         PyObject *ndr64_obj = NULL;
   61439           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   61440           0 :         PyObject *allow_remaining_obj = NULL;
   61441           0 :         bool allow_remaining = false;
   61442             : 
   61443           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   61444             :                 discard_const_p(char *, kwnames),
   61445             :                 &blob.data, &blob_length,
   61446             :                 &bigendian_obj,
   61447             :                 &ndr64_obj,
   61448             :                 &allow_remaining_obj)) {
   61449           0 :                 return NULL;
   61450             :         }
   61451           0 :         blob.length = blob_length;
   61452             : 
   61453           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61454           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   61455             :         }
   61456           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61457           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   61458             :         }
   61459             : 
   61460           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   61461           0 :                 allow_remaining = true;
   61462             :         }
   61463             : 
   61464           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   61465             : }
   61466             : 
   61467           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61468             : {
   61469           0 :         DATA_BLOB blob;
   61470           0 :         Py_ssize_t blob_length = 0;
   61471           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   61472           0 :         PyObject *bigendian_obj = NULL;
   61473           0 :         PyObject *ndr64_obj = NULL;
   61474           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   61475           0 :         PyObject *allow_remaining_obj = NULL;
   61476           0 :         bool allow_remaining = false;
   61477             : 
   61478           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   61479             :                 discard_const_p(char *, kwnames),
   61480             :                 &blob.data, &blob_length,
   61481             :                 &bigendian_obj,
   61482             :                 &ndr64_obj,
   61483             :                 &allow_remaining_obj)) {
   61484           0 :                 return NULL;
   61485             :         }
   61486           0 :         blob.length = blob_length;
   61487             : 
   61488           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61489           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   61490             :         }
   61491           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61492           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   61493             :         }
   61494             : 
   61495           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   61496           0 :                 allow_remaining = true;
   61497             :         }
   61498             : 
   61499           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   61500             : }
   61501             : 
   61502           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   61503             : {
   61504           0 :         const struct ndr_interface_call *call = NULL;
   61505           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
   61506           0 :         PyObject *ret;
   61507           0 :         char *retstr;
   61508             : 
   61509           0 :         if (ndr_table_netlogon.num_calls < 49) {
   61510           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print");
   61511           0 :                 return NULL;
   61512             :         }
   61513           0 :         call = &ndr_table_netlogon.calls[48];
   61514             : 
   61515           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   61516           0 :         ret = PyUnicode_FromString(retstr);
   61517           0 :         TALLOC_FREE(retstr);
   61518             : 
   61519           0 :         return ret;
   61520             : }
   61521             : 
   61522           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   61523             : {
   61524           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "netr_DsrUpdateReadOnlyServerDnsRecords_in", NDR_IN);
   61525             : }
   61526             : 
   61527           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   61528             : {
   61529           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "netr_DsrUpdateReadOnlyServerDnsRecords_out", NDR_OUT);
   61530             : }
   61531             : 
   61532             : static PyMethodDef py_netr_DsrUpdateReadOnlyServerDnsRecords_methods[] = {
   61533             :         { "opnum", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
   61534             :                 "netlogon.netr_DsrUpdateReadOnlyServerDnsRecords.opnum() -> 48 (0x30) " },
   61535             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   61536             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   61537             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   61538             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   61539             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   61540             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   61541             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   61542             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   61543             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   61544             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   61545             :         { NULL, NULL, 0, NULL }
   61546             : };
   61547             : 
   61548             : 
   61549             : static PyTypeObject netr_DsrUpdateReadOnlyServerDnsRecords_Type = {
   61550             :         PyVarObject_HEAD_INIT(NULL, 0)
   61551             :         .tp_name = "netlogon.netr_DsrUpdateReadOnlyServerDnsRecords",
   61552             :         .tp_getset = py_netr_DsrUpdateReadOnlyServerDnsRecords_getsetters,
   61553             :         .tp_methods = py_netr_DsrUpdateReadOnlyServerDnsRecords_methods,
   61554             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   61555             :         .tp_new = py_netr_DsrUpdateReadOnlyServerDnsRecords_new,
   61556             : };
   61557             : 
   61558           0 : static bool pack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
   61559             : {
   61560           0 :         PyObject *py_server_name;
   61561           0 :         PyObject *py_computer_name;
   61562           0 :         PyObject *py_credential;
   61563           0 :         PyObject *py_site_name;
   61564           0 :         PyObject *py_dns_ttl;
   61565           0 :         PyObject *py_dns_names;
   61566           0 :         const char *kwnames[] = {
   61567             :                 "server_name", "computer_name", "credential", "site_name", "dns_ttl", "dns_names", NULL
   61568             :         };
   61569             : 
   61570           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)) {
   61571           0 :                 return false;
   61572             :         }
   61573             : 
   61574           0 :         if (py_server_name == NULL) {
   61575           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
   61576           0 :                 return false;
   61577             :         }
   61578           0 :         if (py_server_name == Py_None) {
   61579           0 :                 r->in.server_name = NULL;
   61580             :         } else {
   61581           0 :                 r->in.server_name = NULL;
   61582             :                 {
   61583           0 :                         const char *test_str;
   61584           0 :                         const char *talloc_str;
   61585           0 :                         PyObject *unicode = NULL;
   61586           0 :                         if (PyUnicode_Check(py_server_name)) {
   61587           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   61588           0 :                                 if (unicode == NULL) {
   61589           0 :                                         return false;
   61590             :                                 }
   61591           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   61592           0 :                         } else if (PyBytes_Check(py_server_name)) {
   61593           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   61594             :                         } else {
   61595           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   61596           0 :                                 return false;
   61597             :                         }
   61598           0 :                         talloc_str = talloc_strdup(r, test_str);
   61599           0 :                         if (unicode != NULL) {
   61600           0 :                                 Py_DECREF(unicode);
   61601             :                         }
   61602           0 :                         if (talloc_str == NULL) {
   61603           0 :                                 PyErr_NoMemory();
   61604           0 :                                 return false;
   61605             :                         }
   61606           0 :                         r->in.server_name = talloc_str;
   61607             :                 }
   61608             :         }
   61609           0 :         if (py_computer_name == NULL) {
   61610           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   61611           0 :                 return false;
   61612             :         }
   61613           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   61614           0 :         if (r->in.computer_name == NULL) {
   61615           0 :                 PyErr_NoMemory();
   61616           0 :                 return false;
   61617             :         }
   61618             :         {
   61619           0 :                 const char *test_str;
   61620           0 :                 const char *talloc_str;
   61621           0 :                 PyObject *unicode = NULL;
   61622           0 :                 if (PyUnicode_Check(py_computer_name)) {
   61623           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   61624           0 :                         if (unicode == NULL) {
   61625           0 :                                 return false;
   61626             :                         }
   61627           0 :                         test_str = PyBytes_AS_STRING(unicode);
   61628           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   61629           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   61630             :                 } else {
   61631           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   61632           0 :                         return false;
   61633             :                 }
   61634           0 :                 talloc_str = talloc_strdup(r, test_str);
   61635           0 :                 if (unicode != NULL) {
   61636           0 :                         Py_DECREF(unicode);
   61637             :                 }
   61638           0 :                 if (talloc_str == NULL) {
   61639           0 :                         PyErr_NoMemory();
   61640           0 :                         return false;
   61641             :                 }
   61642           0 :                 r->in.computer_name = talloc_str;
   61643             :         }
   61644           0 :         if (py_credential == NULL) {
   61645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
   61646           0 :                 return false;
   61647             :         }
   61648           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   61649           0 :         if (r->in.credential == NULL) {
   61650           0 :                 PyErr_NoMemory();
   61651           0 :                 return false;
   61652             :         }
   61653           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   61654           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   61655           0 :                 PyErr_NoMemory();
   61656           0 :                 return false;
   61657             :         }
   61658           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   61659           0 :         if (py_site_name == NULL) {
   61660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.site_name");
   61661           0 :                 return false;
   61662             :         }
   61663           0 :         if (py_site_name == Py_None) {
   61664           0 :                 r->in.site_name = NULL;
   61665             :         } else {
   61666           0 :                 r->in.site_name = NULL;
   61667             :                 {
   61668           0 :                         const char *test_str;
   61669           0 :                         const char *talloc_str;
   61670           0 :                         PyObject *unicode = NULL;
   61671           0 :                         if (PyUnicode_Check(py_site_name)) {
   61672           0 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   61673           0 :                                 if (unicode == NULL) {
   61674           0 :                                         return false;
   61675             :                                 }
   61676           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   61677           0 :                         } else if (PyBytes_Check(py_site_name)) {
   61678           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   61679             :                         } else {
   61680           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   61681           0 :                                 return false;
   61682             :                         }
   61683           0 :                         talloc_str = talloc_strdup(r, test_str);
   61684           0 :                         if (unicode != NULL) {
   61685           0 :                                 Py_DECREF(unicode);
   61686             :                         }
   61687           0 :                         if (talloc_str == NULL) {
   61688           0 :                                 PyErr_NoMemory();
   61689           0 :                                 return false;
   61690             :                         }
   61691           0 :                         r->in.site_name = talloc_str;
   61692             :                 }
   61693             :         }
   61694           0 :         if (py_dns_ttl == NULL) {
   61695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dns_ttl");
   61696           0 :                 return false;
   61697             :         }
   61698             :         {
   61699           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dns_ttl));
   61700           0 :                 if (PyLong_Check(py_dns_ttl)) {
   61701           0 :                         unsigned long long test_var;
   61702           0 :                         test_var = PyLong_AsUnsignedLongLong(py_dns_ttl);
   61703           0 :                         if (PyErr_Occurred() != NULL) {
   61704           0 :                                 return false;
   61705             :                         }
   61706           0 :                         if (test_var > uint_max) {
   61707           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   61708             :                                   PyLong_Type.tp_name, uint_max, test_var);
   61709           0 :                                 return false;
   61710             :                         }
   61711           0 :                         r->in.dns_ttl = test_var;
   61712             :                 } else {
   61713           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   61714             :                           PyLong_Type.tp_name);
   61715           0 :                         return false;
   61716             :                 }
   61717             :         }
   61718           0 :         if (py_dns_names == NULL) {
   61719           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dns_names");
   61720           0 :                 return false;
   61721             :         }
   61722           0 :         r->in.dns_names = talloc_ptrtype(r, r->in.dns_names);
   61723           0 :         if (r->in.dns_names == NULL) {
   61724           0 :                 PyErr_NoMemory();
   61725           0 :                 return false;
   61726             :         }
   61727           0 :         PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, py_dns_names, return false;);
   61728           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_dns_names)) == NULL) {
   61729           0 :                 PyErr_NoMemory();
   61730           0 :                 return false;
   61731             :         }
   61732           0 :         r->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_dns_names);
   61733           0 :         return true;
   61734             : }
   61735             : 
   61736           0 : static PyObject *unpack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_out(struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
   61737             : {
   61738           0 :         PyObject *result;
   61739           0 :         PyObject *py_return_authenticator;
   61740           0 :         PyObject *py_dns_names;
   61741           0 :         result = PyTuple_New(2);
   61742           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   61743           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   61744           0 :         py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, r->out.dns_names, r->out.dns_names);
   61745           0 :         PyTuple_SetItem(result, 1, py_dns_names);
   61746           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   61747           0 :                 PyErr_SetNTSTATUS(r->out.result);
   61748           0 :                 return NULL;
   61749             :         }
   61750             : 
   61751           0 :         return result;
   61752             : }
   61753             : 
   61754             : const struct PyNdrRpcMethodDef py_ndr_netlogon_methods[] = {
   61755             :         { "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 },
   61756             :         { "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 },
   61757             :         { "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 },
   61758             :         { "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 },
   61759             :         { "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 },
   61760             :         { "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 },
   61761             :         { "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 },
   61762             :         { "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 },
   61763             :         { "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 },
   61764             :         { "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 },
   61765             :         { "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 },
   61766             :         { "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 },
   61767             :         { "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 },
   61768             :         { "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 },
   61769             :         { "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 },
   61770             :         { "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 },
   61771             :         { "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 },
   61772             :         { "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 },
   61773             :         { "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 },
   61774             :         { "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 },
   61775             :         { "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 },
   61776             :         { "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 },
   61777             :         { "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 },
   61778             :         { "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 },
   61779             :         { "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 },
   61780             :         { "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 },
   61781             :         { "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 },
   61782             :         { "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 },
   61783             :         { "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 },
   61784             :         { "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 },
   61785             :         { "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 },
   61786             :         { "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 },
   61787             :         { "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 },
   61788             :         { "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 },
   61789             :         { "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 },
   61790             :         { "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 },
   61791             :         { "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 },
   61792             :         { "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 },
   61793             :         { "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 },
   61794             :         { "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 },
   61795             :         { "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 },
   61796             :         { "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 },
   61797             :         { "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 },
   61798             :         { "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 },
   61799             :         { "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 },
   61800             :         {0}
   61801             : };
   61802             : 
   61803         478 : static PyObject *interface_netlogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   61804             : {
   61805         478 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_netlogon);
   61806             : }
   61807             : 
   61808             : static PyTypeObject netlogon_InterfaceType = {
   61809             :         PyVarObject_HEAD_INIT(NULL, 0)
   61810             :         .tp_name = "netlogon.netlogon",
   61811             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
   61812             :         .tp_doc = "netlogon(binding, lp_ctx=None, credentials=None) -> connection\n"
   61813             : "\n"
   61814             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
   61815             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
   61816             : "credentials should be a credentials.Credentials object.\n\n",
   61817             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   61818             :         .tp_new = interface_netlogon_new,
   61819             : };
   61820             : 
   61821          48 : static PyObject *syntax_netlogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   61822             : {
   61823          48 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_netlogon.syntax_id);
   61824             : }
   61825             : 
   61826             : static PyTypeObject netlogon_SyntaxType = {
   61827             :         PyVarObject_HEAD_INIT(NULL, 0)
   61828             :         .tp_name = "netlogon.netlogon_abstract_syntax",
   61829             :         .tp_doc = "netlogon_abstract_syntax()\n",
   61830             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   61831             :         .tp_new = syntax_netlogon_new,
   61832             : };
   61833             : 
   61834             : static PyMethodDef netlogon_methods[] = {
   61835             :         { NULL, NULL, 0, NULL }
   61836             : };
   61837             : 
   61838             : static struct PyModuleDef moduledef = {
   61839             :         PyModuleDef_HEAD_INIT,
   61840             :         .m_name = "netlogon",
   61841             :         .m_doc = "netlogon DCE/RPC",
   61842             :         .m_size = -1,
   61843             :         .m_methods = netlogon_methods,
   61844             : };
   61845        4256 : MODULE_INIT_FUNC(netlogon)
   61846             : {
   61847        4256 :         PyObject *m = NULL;
   61848        4256 :         PyObject *dep_samba_dcerpc_misc = NULL;
   61849        4256 :         PyObject *dep_samba_dcerpc_lsa = NULL;
   61850        4256 :         PyObject *dep_samba_dcerpc_samr = NULL;
   61851        4256 :         PyObject *dep_samba_dcerpc_security = NULL;
   61852        4256 :         PyObject *dep_samba_dcerpc_nbt = NULL;
   61853        4256 :         PyObject *dep_talloc = NULL;
   61854        4256 :         PyObject *dep_samba_dcerpc_base = NULL;
   61855             : 
   61856        4256 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   61857        4256 :         if (dep_samba_dcerpc_misc == NULL)
   61858           0 :                 goto out;
   61859             : 
   61860        4256 :         dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
   61861        4256 :         if (dep_samba_dcerpc_lsa == NULL)
   61862           0 :                 goto out;
   61863             : 
   61864        4256 :         dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
   61865        4256 :         if (dep_samba_dcerpc_samr == NULL)
   61866           0 :                 goto out;
   61867             : 
   61868        4256 :         dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
   61869        4256 :         if (dep_samba_dcerpc_security == NULL)
   61870           0 :                 goto out;
   61871             : 
   61872        4256 :         dep_samba_dcerpc_nbt = PyImport_ImportModule("samba.dcerpc.nbt");
   61873        4256 :         if (dep_samba_dcerpc_nbt == NULL)
   61874           0 :                 goto out;
   61875             : 
   61876        4256 :         dep_talloc = PyImport_ImportModule("talloc");
   61877        4256 :         if (dep_talloc == NULL)
   61878           0 :                 goto out;
   61879             : 
   61880        4256 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
   61881        4256 :         if (dep_samba_dcerpc_base == NULL)
   61882           0 :                 goto out;
   61883             : 
   61884        4256 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   61885        4256 :         if (BaseObject_Type == NULL)
   61886           0 :                 goto out;
   61887             : 
   61888        4256 :         lsa_String_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "String");
   61889        4256 :         if (lsa_String_Type == NULL)
   61890           0 :                 goto out;
   61891             : 
   61892        4256 :         samr_Password_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "Password");
   61893        4256 :         if (samr_Password_Type == NULL)
   61894           0 :                 goto out;
   61895             : 
   61896        4256 :         samr_RidWithAttributeArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "RidWithAttributeArray");
   61897        4256 :         if (samr_RidWithAttributeArray_Type == NULL)
   61898           0 :                 goto out;
   61899             : 
   61900        4256 :         lsa_StringLarge_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "StringLarge");
   61901        4256 :         if (lsa_StringLarge_Type == NULL)
   61902           0 :                 goto out;
   61903             : 
   61904        4256 :         dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
   61905        4256 :         if (dom_sid_Type == NULL)
   61906           0 :                 goto out;
   61907             : 
   61908        4256 :         samr_LogonHours_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "LogonHours");
   61909        4256 :         if (samr_LogonHours_Type == NULL)
   61910           0 :                 goto out;
   61911             : 
   61912        4256 :         lsa_BinaryString_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "BinaryString");
   61913        4256 :         if (lsa_BinaryString_Type == NULL)
   61914           0 :                 goto out;
   61915             : 
   61916        4256 :         sec_desc_buf_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "sec_desc_buf");
   61917        4256 :         if (sec_desc_buf_Type == NULL)
   61918           0 :                 goto out;
   61919             : 
   61920        4256 :         lsa_SidArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "SidArray");
   61921        4256 :         if (lsa_SidArray_Type == NULL)
   61922           0 :                 goto out;
   61923             : 
   61924        4256 :         GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
   61925        4256 :         if (GUID_Type == NULL)
   61926           0 :                 goto out;
   61927             : 
   61928        4256 :         lsa_ForestTrustInformation_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "ForestTrustInformation");
   61929        4256 :         if (lsa_ForestTrustInformation_Type == NULL)
   61930           0 :                 goto out;
   61931             : 
   61932        4256 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
   61933        4256 :         if (ClientConnection_Type == NULL)
   61934           0 :                 goto out;
   61935             : 
   61936        4256 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   61937        4256 :         if (ndr_syntax_id_Type == NULL)
   61938           0 :                 goto out;
   61939             : 
   61940        4256 :         netr_UasInfo_Type.tp_base = BaseObject_Type;
   61941        4256 :         netr_UasInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61942             : 
   61943        4256 :         netr_UasLogoffInfo_Type.tp_base = BaseObject_Type;
   61944        4256 :         netr_UasLogoffInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61945             : 
   61946        4256 :         netr_AcctLockStr_Type.tp_base = BaseObject_Type;
   61947        4256 :         netr_AcctLockStr_Type.tp_basicsize = pytalloc_BaseObject_size();
   61948             : 
   61949        4256 :         netr_IdentityInfo_Type.tp_base = BaseObject_Type;
   61950        4256 :         netr_IdentityInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61951             : 
   61952        4256 :         netr_PasswordInfo_Type.tp_base = BaseObject_Type;
   61953        4256 :         netr_PasswordInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61954             : 
   61955        4256 :         netr_ChallengeResponse_Type.tp_base = BaseObject_Type;
   61956        4256 :         netr_ChallengeResponse_Type.tp_basicsize = pytalloc_BaseObject_size();
   61957             : 
   61958        4256 :         netr_NetworkInfo_Type.tp_base = BaseObject_Type;
   61959        4256 :         netr_NetworkInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61960             : 
   61961        4256 :         netr_GenericInfo_Type.tp_base = BaseObject_Type;
   61962        4256 :         netr_GenericInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61963             : 
   61964        4256 :         netr_LogonLevel_Type.tp_base = BaseObject_Type;
   61965        4256 :         netr_LogonLevel_Type.tp_basicsize = pytalloc_BaseObject_size();
   61966             : 
   61967        4256 :         netr_UserSessionKey_Type.tp_base = BaseObject_Type;
   61968        4256 :         netr_UserSessionKey_Type.tp_basicsize = pytalloc_BaseObject_size();
   61969             : 
   61970        4256 :         netr_LMSessionKey_Type.tp_base = BaseObject_Type;
   61971        4256 :         netr_LMSessionKey_Type.tp_basicsize = pytalloc_BaseObject_size();
   61972             : 
   61973        4256 :         netr_SamBaseInfo_Type.tp_base = BaseObject_Type;
   61974        4256 :         netr_SamBaseInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61975             : 
   61976        4256 :         netr_SamInfo2_Type.tp_base = BaseObject_Type;
   61977        4256 :         netr_SamInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   61978             : 
   61979        4256 :         netr_SidAttr_Type.tp_base = BaseObject_Type;
   61980        4256 :         netr_SidAttr_Type.tp_basicsize = pytalloc_BaseObject_size();
   61981             : 
   61982        4256 :         netr_SamInfo3_Type.tp_base = BaseObject_Type;
   61983        4256 :         netr_SamInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
   61984             : 
   61985        4256 :         netr_SamInfo6_Type.tp_base = BaseObject_Type;
   61986        4256 :         netr_SamInfo6_Type.tp_basicsize = pytalloc_BaseObject_size();
   61987             : 
   61988        4256 :         netr_PacInfo_Type.tp_base = BaseObject_Type;
   61989        4256 :         netr_PacInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61990             : 
   61991        4256 :         netr_GenericInfo2_Type.tp_base = BaseObject_Type;
   61992        4256 :         netr_GenericInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   61993             : 
   61994        4256 :         netr_Validation_Type.tp_base = BaseObject_Type;
   61995        4256 :         netr_Validation_Type.tp_basicsize = pytalloc_BaseObject_size();
   61996             : 
   61997        4256 :         netr_Credential_Type.tp_base = BaseObject_Type;
   61998        4256 :         netr_Credential_Type.tp_basicsize = pytalloc_BaseObject_size();
   61999             : 
   62000        4256 :         netlogon_server_pipe_state_Type.tp_base = BaseObject_Type;
   62001        4256 :         netlogon_server_pipe_state_Type.tp_basicsize = pytalloc_BaseObject_size();
   62002             : 
   62003        4256 :         netr_Authenticator_Type.tp_base = BaseObject_Type;
   62004        4256 :         netr_Authenticator_Type.tp_basicsize = pytalloc_BaseObject_size();
   62005             : 
   62006        4256 :         netr_DELTA_DELETE_USER_Type.tp_base = BaseObject_Type;
   62007        4256 :         netr_DELTA_DELETE_USER_Type.tp_basicsize = pytalloc_BaseObject_size();
   62008             : 
   62009        4256 :         netr_USER_KEY16_Type.tp_base = BaseObject_Type;
   62010        4256 :         netr_USER_KEY16_Type.tp_basicsize = pytalloc_BaseObject_size();
   62011             : 
   62012        4256 :         netr_PasswordHistory_Type.tp_base = BaseObject_Type;
   62013        4256 :         netr_PasswordHistory_Type.tp_basicsize = pytalloc_BaseObject_size();
   62014             : 
   62015        4256 :         netr_USER_KEYS2_Type.tp_base = BaseObject_Type;
   62016        4256 :         netr_USER_KEYS2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62017             : 
   62018        4256 :         netr_USER_KEY_UNION_Type.tp_base = BaseObject_Type;
   62019        4256 :         netr_USER_KEY_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62020             : 
   62021        4256 :         netr_USER_KEYS_Type.tp_base = BaseObject_Type;
   62022        4256 :         netr_USER_KEYS_Type.tp_basicsize = pytalloc_BaseObject_size();
   62023             : 
   62024        4256 :         netr_USER_PRIVATE_INFO_Type.tp_base = BaseObject_Type;
   62025        4256 :         netr_USER_PRIVATE_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
   62026             : 
   62027        4256 :         netr_DELTA_USER_Type.tp_base = BaseObject_Type;
   62028        4256 :         netr_DELTA_USER_Type.tp_basicsize = pytalloc_BaseObject_size();
   62029             : 
   62030        4256 :         netr_DELTA_DOMAIN_Type.tp_base = BaseObject_Type;
   62031        4256 :         netr_DELTA_DOMAIN_Type.tp_basicsize = pytalloc_BaseObject_size();
   62032             : 
   62033        4256 :         netr_DELTA_GROUP_Type.tp_base = BaseObject_Type;
   62034        4256 :         netr_DELTA_GROUP_Type.tp_basicsize = pytalloc_BaseObject_size();
   62035             : 
   62036        4256 :         netr_DELTA_RENAME_Type.tp_base = BaseObject_Type;
   62037        4256 :         netr_DELTA_RENAME_Type.tp_basicsize = pytalloc_BaseObject_size();
   62038             : 
   62039        4256 :         netr_DELTA_GROUP_MEMBER_Type.tp_base = BaseObject_Type;
   62040        4256 :         netr_DELTA_GROUP_MEMBER_Type.tp_basicsize = pytalloc_BaseObject_size();
   62041             : 
   62042        4256 :         netr_DELTA_ALIAS_Type.tp_base = BaseObject_Type;
   62043        4256 :         netr_DELTA_ALIAS_Type.tp_basicsize = pytalloc_BaseObject_size();
   62044             : 
   62045        4256 :         netr_DELTA_ALIAS_MEMBER_Type.tp_base = BaseObject_Type;
   62046        4256 :         netr_DELTA_ALIAS_MEMBER_Type.tp_basicsize = pytalloc_BaseObject_size();
   62047             : 
   62048        4256 :         netr_QUOTA_LIMITS_Type.tp_base = BaseObject_Type;
   62049        4256 :         netr_QUOTA_LIMITS_Type.tp_basicsize = pytalloc_BaseObject_size();
   62050             : 
   62051        4256 :         netr_DELTA_POLICY_Type.tp_base = BaseObject_Type;
   62052        4256 :         netr_DELTA_POLICY_Type.tp_basicsize = pytalloc_BaseObject_size();
   62053             : 
   62054        4256 :         netr_DELTA_TRUSTED_DOMAIN_Type.tp_base = BaseObject_Type;
   62055        4256 :         netr_DELTA_TRUSTED_DOMAIN_Type.tp_basicsize = pytalloc_BaseObject_size();
   62056             : 
   62057        4256 :         netr_DELTA_ACCOUNT_Type.tp_base = BaseObject_Type;
   62058        4256 :         netr_DELTA_ACCOUNT_Type.tp_basicsize = pytalloc_BaseObject_size();
   62059             : 
   62060        4256 :         netr_CIPHER_VALUE_Type.tp_base = BaseObject_Type;
   62061        4256 :         netr_CIPHER_VALUE_Type.tp_basicsize = pytalloc_BaseObject_size();
   62062             : 
   62063        4256 :         netr_DELTA_SECRET_Type.tp_base = BaseObject_Type;
   62064        4256 :         netr_DELTA_SECRET_Type.tp_basicsize = pytalloc_BaseObject_size();
   62065             : 
   62066        4256 :         netr_DELTA_UNION_Type.tp_base = BaseObject_Type;
   62067        4256 :         netr_DELTA_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62068             : 
   62069        4256 :         netr_DELTA_ID_UNION_Type.tp_base = BaseObject_Type;
   62070        4256 :         netr_DELTA_ID_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62071             : 
   62072        4256 :         netr_DELTA_ENUM_Type.tp_base = BaseObject_Type;
   62073        4256 :         netr_DELTA_ENUM_Type.tp_basicsize = pytalloc_BaseObject_size();
   62074             : 
   62075        4256 :         netr_DELTA_ENUM_ARRAY_Type.tp_base = BaseObject_Type;
   62076        4256 :         netr_DELTA_ENUM_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
   62077             : 
   62078        4256 :         netr_UAS_INFO_0_Type.tp_base = BaseObject_Type;
   62079        4256 :         netr_UAS_INFO_0_Type.tp_basicsize = pytalloc_BaseObject_size();
   62080             : 
   62081        4256 :         netr_AccountBuffer_Type.tp_base = BaseObject_Type;
   62082        4256 :         netr_AccountBuffer_Type.tp_basicsize = pytalloc_BaseObject_size();
   62083             : 
   62084        4256 :         netr_NETLOGON_INFO_1_Type.tp_base = BaseObject_Type;
   62085        4256 :         netr_NETLOGON_INFO_1_Type.tp_basicsize = pytalloc_BaseObject_size();
   62086             : 
   62087        4256 :         netr_NETLOGON_INFO_2_Type.tp_base = BaseObject_Type;
   62088        4256 :         netr_NETLOGON_INFO_2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62089             : 
   62090        4256 :         netr_NETLOGON_INFO_3_Type.tp_base = BaseObject_Type;
   62091        4256 :         netr_NETLOGON_INFO_3_Type.tp_basicsize = pytalloc_BaseObject_size();
   62092             : 
   62093        4256 :         netr_NETLOGON_INFO_4_Type.tp_base = BaseObject_Type;
   62094        4256 :         netr_NETLOGON_INFO_4_Type.tp_basicsize = pytalloc_BaseObject_size();
   62095             : 
   62096        4256 :         netr_CONTROL_QUERY_INFORMATION_Type.tp_base = BaseObject_Type;
   62097        4256 :         netr_CONTROL_QUERY_INFORMATION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62098             : 
   62099        4256 :         netr_CONTROL_DATA_INFORMATION_Type.tp_base = BaseObject_Type;
   62100        4256 :         netr_CONTROL_DATA_INFORMATION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62101             : 
   62102        4256 :         netr_ChangeLogObject_Type.tp_base = BaseObject_Type;
   62103        4256 :         netr_ChangeLogObject_Type.tp_basicsize = pytalloc_BaseObject_size();
   62104             : 
   62105        4256 :         netr_ChangeLogEntry_Type.tp_base = BaseObject_Type;
   62106        4256 :         netr_ChangeLogEntry_Type.tp_basicsize = pytalloc_BaseObject_size();
   62107             : 
   62108        4256 :         netr_Blob_Type.tp_base = BaseObject_Type;
   62109        4256 :         netr_Blob_Type.tp_basicsize = pytalloc_BaseObject_size();
   62110             : 
   62111        4256 :         netr_DsRGetDCNameInfo_Type.tp_base = BaseObject_Type;
   62112        4256 :         netr_DsRGetDCNameInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62113             : 
   62114        4256 :         netr_Capabilities_Type.tp_base = BaseObject_Type;
   62115        4256 :         netr_Capabilities_Type.tp_basicsize = pytalloc_BaseObject_size();
   62116             : 
   62117        4256 :         netr_LsaPolicyInformation_Type.tp_base = BaseObject_Type;
   62118        4256 :         netr_LsaPolicyInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62119             : 
   62120        4256 :         netr_OsVersionInfoEx_Type.tp_base = BaseObject_Type;
   62121        4256 :         netr_OsVersionInfoEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62122             : 
   62123        4256 :         netr_OsVersion_Type.tp_base = BaseObject_Type;
   62124        4256 :         netr_OsVersion_Type.tp_basicsize = pytalloc_BaseObject_size();
   62125             : 
   62126        4256 :         netr_OsVersionContainer_Type.tp_base = BaseObject_Type;
   62127        4256 :         netr_OsVersionContainer_Type.tp_basicsize = pytalloc_BaseObject_size();
   62128             : 
   62129        4256 :         netr_WorkstationInformation_Type.tp_base = BaseObject_Type;
   62130        4256 :         netr_WorkstationInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62131             : 
   62132        4256 :         netr_WorkstationInfo_Type.tp_base = BaseObject_Type;
   62133        4256 :         netr_WorkstationInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62134             : 
   62135        4256 :         netr_trust_extension_info_Type.tp_base = BaseObject_Type;
   62136        4256 :         netr_trust_extension_info_Type.tp_basicsize = pytalloc_BaseObject_size();
   62137             : 
   62138        4256 :         netr_trust_extension_Type.tp_base = BaseObject_Type;
   62139        4256 :         netr_trust_extension_Type.tp_basicsize = pytalloc_BaseObject_size();
   62140             : 
   62141        4256 :         netr_trust_extension_container_Type.tp_base = BaseObject_Type;
   62142        4256 :         netr_trust_extension_container_Type.tp_basicsize = pytalloc_BaseObject_size();
   62143             : 
   62144        4256 :         netr_OneDomainInfo_Type.tp_base = BaseObject_Type;
   62145        4256 :         netr_OneDomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62146             : 
   62147        4256 :         netr_DomainInformation_Type.tp_base = BaseObject_Type;
   62148        4256 :         netr_DomainInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62149             : 
   62150        4256 :         netr_DomainInfo_Type.tp_base = BaseObject_Type;
   62151        4256 :         netr_DomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62152             : 
   62153        4256 :         NL_PASSWORD_VERSION_Type.tp_base = BaseObject_Type;
   62154        4256 :         NL_PASSWORD_VERSION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62155             : 
   62156        4256 :         netr_CryptPassword_Type.tp_base = BaseObject_Type;
   62157        4256 :         netr_CryptPassword_Type.tp_basicsize = pytalloc_BaseObject_size();
   62158             : 
   62159        4256 :         netr_SendToSamResetBadPasswordCount_Type.tp_base = BaseObject_Type;
   62160        4256 :         netr_SendToSamResetBadPasswordCount_Type.tp_basicsize = pytalloc_BaseObject_size();
   62161             : 
   62162        4256 :         netr_SendToSamMessage_Type.tp_base = BaseObject_Type;
   62163        4256 :         netr_SendToSamMessage_Type.tp_basicsize = pytalloc_BaseObject_size();
   62164             : 
   62165        4256 :         netr_SendToSamBase_Type.tp_base = BaseObject_Type;
   62166        4256 :         netr_SendToSamBase_Type.tp_basicsize = pytalloc_BaseObject_size();
   62167             : 
   62168        4256 :         netr_DsRAddressToSitenamesWCtr_Type.tp_base = BaseObject_Type;
   62169        4256 :         netr_DsRAddressToSitenamesWCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62170             : 
   62171        4256 :         netr_DsRAddress_Type.tp_base = BaseObject_Type;
   62172        4256 :         netr_DsRAddress_Type.tp_basicsize = pytalloc_BaseObject_size();
   62173             : 
   62174        4256 :         netr_DomainTrust_Type.tp_base = BaseObject_Type;
   62175        4256 :         netr_DomainTrust_Type.tp_basicsize = pytalloc_BaseObject_size();
   62176             : 
   62177        4256 :         netr_DomainTrustList_Type.tp_base = BaseObject_Type;
   62178        4256 :         netr_DomainTrustList_Type.tp_basicsize = pytalloc_BaseObject_size();
   62179             : 
   62180        4256 :         netr_DsRAddressToSitenamesExWCtr_Type.tp_base = BaseObject_Type;
   62181        4256 :         netr_DsRAddressToSitenamesExWCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62182             : 
   62183        4256 :         DcSitesCtr_Type.tp_base = BaseObject_Type;
   62184        4256 :         DcSitesCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62185             : 
   62186        4256 :         netr_TrustInfo_Type.tp_base = BaseObject_Type;
   62187        4256 :         netr_TrustInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62188             : 
   62189        4256 :         NL_DNS_NAME_INFO_Type.tp_base = BaseObject_Type;
   62190        4256 :         NL_DNS_NAME_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
   62191             : 
   62192        4256 :         NL_DNS_NAME_INFO_ARRAY_Type.tp_base = BaseObject_Type;
   62193        4256 :         NL_DNS_NAME_INFO_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
   62194             : 
   62195        4256 :         netr_LogonUasLogon_Type.tp_base = BaseObject_Type;
   62196        4256 :         netr_LogonUasLogon_Type.tp_basicsize = pytalloc_BaseObject_size();
   62197             : 
   62198        4256 :         netr_LogonUasLogoff_Type.tp_base = BaseObject_Type;
   62199        4256 :         netr_LogonUasLogoff_Type.tp_basicsize = pytalloc_BaseObject_size();
   62200             : 
   62201        4256 :         netr_LogonSamLogon_Type.tp_base = BaseObject_Type;
   62202        4256 :         netr_LogonSamLogon_Type.tp_basicsize = pytalloc_BaseObject_size();
   62203             : 
   62204        4256 :         netr_LogonSamLogoff_Type.tp_base = BaseObject_Type;
   62205        4256 :         netr_LogonSamLogoff_Type.tp_basicsize = pytalloc_BaseObject_size();
   62206             : 
   62207        4256 :         netr_ServerReqChallenge_Type.tp_base = BaseObject_Type;
   62208        4256 :         netr_ServerReqChallenge_Type.tp_basicsize = pytalloc_BaseObject_size();
   62209             : 
   62210        4256 :         netr_ServerAuthenticate_Type.tp_base = BaseObject_Type;
   62211        4256 :         netr_ServerAuthenticate_Type.tp_basicsize = pytalloc_BaseObject_size();
   62212             : 
   62213        4256 :         netr_ServerPasswordSet_Type.tp_base = BaseObject_Type;
   62214        4256 :         netr_ServerPasswordSet_Type.tp_basicsize = pytalloc_BaseObject_size();
   62215             : 
   62216        4256 :         netr_DatabaseDeltas_Type.tp_base = BaseObject_Type;
   62217        4256 :         netr_DatabaseDeltas_Type.tp_basicsize = pytalloc_BaseObject_size();
   62218             : 
   62219        4256 :         netr_DatabaseSync_Type.tp_base = BaseObject_Type;
   62220        4256 :         netr_DatabaseSync_Type.tp_basicsize = pytalloc_BaseObject_size();
   62221             : 
   62222        4256 :         netr_AccountDeltas_Type.tp_base = BaseObject_Type;
   62223        4256 :         netr_AccountDeltas_Type.tp_basicsize = pytalloc_BaseObject_size();
   62224             : 
   62225        4256 :         netr_AccountSync_Type.tp_base = BaseObject_Type;
   62226        4256 :         netr_AccountSync_Type.tp_basicsize = pytalloc_BaseObject_size();
   62227             : 
   62228        4256 :         netr_GetDcName_Type.tp_base = BaseObject_Type;
   62229        4256 :         netr_GetDcName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62230             : 
   62231        4256 :         netr_LogonControl_Type.tp_base = BaseObject_Type;
   62232        4256 :         netr_LogonControl_Type.tp_basicsize = pytalloc_BaseObject_size();
   62233             : 
   62234        4256 :         netr_GetAnyDCName_Type.tp_base = BaseObject_Type;
   62235        4256 :         netr_GetAnyDCName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62236             : 
   62237        4256 :         netr_LogonControl2_Type.tp_base = BaseObject_Type;
   62238        4256 :         netr_LogonControl2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62239             : 
   62240        4256 :         netr_ServerAuthenticate2_Type.tp_base = BaseObject_Type;
   62241        4256 :         netr_ServerAuthenticate2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62242             : 
   62243        4256 :         netr_DatabaseSync2_Type.tp_base = BaseObject_Type;
   62244        4256 :         netr_DatabaseSync2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62245             : 
   62246        4256 :         netr_DatabaseRedo_Type.tp_base = BaseObject_Type;
   62247        4256 :         netr_DatabaseRedo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62248             : 
   62249        4256 :         netr_LogonControl2Ex_Type.tp_base = BaseObject_Type;
   62250        4256 :         netr_LogonControl2Ex_Type.tp_basicsize = pytalloc_BaseObject_size();
   62251             : 
   62252        4256 :         netr_NetrEnumerateTrustedDomains_Type.tp_base = BaseObject_Type;
   62253        4256 :         netr_NetrEnumerateTrustedDomains_Type.tp_basicsize = pytalloc_BaseObject_size();
   62254             : 
   62255        4256 :         netr_DsRGetDCName_Type.tp_base = BaseObject_Type;
   62256        4256 :         netr_DsRGetDCName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62257             : 
   62258        4256 :         netr_LogonGetCapabilities_Type.tp_base = BaseObject_Type;
   62259        4256 :         netr_LogonGetCapabilities_Type.tp_basicsize = pytalloc_BaseObject_size();
   62260             : 
   62261        4256 :         netr_LogonGetTrustRid_Type.tp_base = BaseObject_Type;
   62262        4256 :         netr_LogonGetTrustRid_Type.tp_basicsize = pytalloc_BaseObject_size();
   62263             : 
   62264        4256 :         netr_ServerAuthenticate3_Type.tp_base = BaseObject_Type;
   62265        4256 :         netr_ServerAuthenticate3_Type.tp_basicsize = pytalloc_BaseObject_size();
   62266             : 
   62267        4256 :         netr_DsRGetDCNameEx_Type.tp_base = BaseObject_Type;
   62268        4256 :         netr_DsRGetDCNameEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62269             : 
   62270        4256 :         netr_DsRGetSiteName_Type.tp_base = BaseObject_Type;
   62271        4256 :         netr_DsRGetSiteName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62272             : 
   62273        4256 :         netr_LogonGetDomainInfo_Type.tp_base = BaseObject_Type;
   62274        4256 :         netr_LogonGetDomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62275             : 
   62276        4256 :         netr_ServerPasswordSet2_Type.tp_base = BaseObject_Type;
   62277        4256 :         netr_ServerPasswordSet2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62278             : 
   62279        4256 :         netr_ServerPasswordGet_Type.tp_base = BaseObject_Type;
   62280        4256 :         netr_ServerPasswordGet_Type.tp_basicsize = pytalloc_BaseObject_size();
   62281             : 
   62282        4256 :         netr_NetrLogonSendToSam_Type.tp_base = BaseObject_Type;
   62283        4256 :         netr_NetrLogonSendToSam_Type.tp_basicsize = pytalloc_BaseObject_size();
   62284             : 
   62285        4256 :         netr_DsRAddressToSitenamesW_Type.tp_base = BaseObject_Type;
   62286        4256 :         netr_DsRAddressToSitenamesW_Type.tp_basicsize = pytalloc_BaseObject_size();
   62287             : 
   62288        4256 :         netr_DsRGetDCNameEx2_Type.tp_base = BaseObject_Type;
   62289        4256 :         netr_DsRGetDCNameEx2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62290             : 
   62291        4256 :         netr_NetrEnumerateTrustedDomainsEx_Type.tp_base = BaseObject_Type;
   62292        4256 :         netr_NetrEnumerateTrustedDomainsEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62293             : 
   62294        4256 :         netr_DsRAddressToSitenamesExW_Type.tp_base = BaseObject_Type;
   62295        4256 :         netr_DsRAddressToSitenamesExW_Type.tp_basicsize = pytalloc_BaseObject_size();
   62296             : 
   62297        4256 :         netr_DsrGetDcSiteCoverageW_Type.tp_base = BaseObject_Type;
   62298        4256 :         netr_DsrGetDcSiteCoverageW_Type.tp_basicsize = pytalloc_BaseObject_size();
   62299             : 
   62300        4256 :         netr_LogonSamLogonEx_Type.tp_base = BaseObject_Type;
   62301        4256 :         netr_LogonSamLogonEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62302             : 
   62303        4256 :         netr_DsrEnumerateDomainTrusts_Type.tp_base = BaseObject_Type;
   62304        4256 :         netr_DsrEnumerateDomainTrusts_Type.tp_basicsize = pytalloc_BaseObject_size();
   62305             : 
   62306        4256 :         netr_DsrDeregisterDNSHostRecords_Type.tp_base = BaseObject_Type;
   62307        4256 :         netr_DsrDeregisterDNSHostRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
   62308             : 
   62309        4256 :         netr_ServerTrustPasswordsGet_Type.tp_base = BaseObject_Type;
   62310        4256 :         netr_ServerTrustPasswordsGet_Type.tp_basicsize = pytalloc_BaseObject_size();
   62311             : 
   62312        4256 :         netr_DsRGetForestTrustInformation_Type.tp_base = BaseObject_Type;
   62313        4256 :         netr_DsRGetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62314             : 
   62315        4256 :         netr_GetForestTrustInformation_Type.tp_base = BaseObject_Type;
   62316        4256 :         netr_GetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62317             : 
   62318        4256 :         netr_LogonSamLogonWithFlags_Type.tp_base = BaseObject_Type;
   62319        4256 :         netr_LogonSamLogonWithFlags_Type.tp_basicsize = pytalloc_BaseObject_size();
   62320             : 
   62321        4256 :         netr_ServerGetTrustInfo_Type.tp_base = BaseObject_Type;
   62322        4256 :         netr_ServerGetTrustInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62323             : 
   62324        4256 :         netr_Unused47_Type.tp_base = BaseObject_Type;
   62325        4256 :         netr_Unused47_Type.tp_basicsize = pytalloc_BaseObject_size();
   62326             : 
   62327        4256 :         netr_DsrUpdateReadOnlyServerDnsRecords_Type.tp_base = BaseObject_Type;
   62328        4256 :         netr_DsrUpdateReadOnlyServerDnsRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
   62329             : 
   62330        4256 :         netlogon_InterfaceType.tp_base = ClientConnection_Type;
   62331             : 
   62332        4256 :         netlogon_SyntaxType.tp_base = ndr_syntax_id_Type;
   62333        4256 :         netlogon_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
   62334             : 
   62335        4256 :         if (PyType_Ready(&netr_UasInfo_Type) < 0)
   62336           0 :                 goto out;
   62337        4256 :         if (PyType_Ready(&netr_UasLogoffInfo_Type) < 0)
   62338           0 :                 goto out;
   62339        4256 :         if (PyType_Ready(&netr_AcctLockStr_Type) < 0)
   62340           0 :                 goto out;
   62341        4256 :         if (PyType_Ready(&netr_IdentityInfo_Type) < 0)
   62342           0 :                 goto out;
   62343        4256 :         if (PyType_Ready(&netr_PasswordInfo_Type) < 0)
   62344           0 :                 goto out;
   62345        4256 :         if (PyType_Ready(&netr_ChallengeResponse_Type) < 0)
   62346           0 :                 goto out;
   62347        4256 :         if (PyType_Ready(&netr_NetworkInfo_Type) < 0)
   62348           0 :                 goto out;
   62349        4256 :         if (PyType_Ready(&netr_GenericInfo_Type) < 0)
   62350           0 :                 goto out;
   62351        4256 :         if (PyType_Ready(&netr_LogonLevel_Type) < 0)
   62352           0 :                 goto out;
   62353        4256 :         if (PyType_Ready(&netr_UserSessionKey_Type) < 0)
   62354           0 :                 goto out;
   62355        4256 :         if (PyType_Ready(&netr_LMSessionKey_Type) < 0)
   62356           0 :                 goto out;
   62357        4256 :         if (PyType_Ready(&netr_SamBaseInfo_Type) < 0)
   62358           0 :                 goto out;
   62359        4256 :         if (PyType_Ready(&netr_SamInfo2_Type) < 0)
   62360           0 :                 goto out;
   62361        4256 :         if (PyType_Ready(&netr_SidAttr_Type) < 0)
   62362           0 :                 goto out;
   62363        4256 :         if (PyType_Ready(&netr_SamInfo3_Type) < 0)
   62364           0 :                 goto out;
   62365        4256 :         if (PyType_Ready(&netr_SamInfo6_Type) < 0)
   62366           0 :                 goto out;
   62367        4256 :         if (PyType_Ready(&netr_PacInfo_Type) < 0)
   62368           0 :                 goto out;
   62369        4256 :         if (PyType_Ready(&netr_GenericInfo2_Type) < 0)
   62370           0 :                 goto out;
   62371        4256 :         if (PyType_Ready(&netr_Validation_Type) < 0)
   62372           0 :                 goto out;
   62373        4256 :         if (PyType_Ready(&netr_Credential_Type) < 0)
   62374           0 :                 goto out;
   62375        4256 :         if (PyType_Ready(&netlogon_server_pipe_state_Type) < 0)
   62376           0 :                 goto out;
   62377        4256 :         if (PyType_Ready(&netr_Authenticator_Type) < 0)
   62378           0 :                 goto out;
   62379        4256 :         if (PyType_Ready(&netr_DELTA_DELETE_USER_Type) < 0)
   62380           0 :                 goto out;
   62381        4256 :         if (PyType_Ready(&netr_USER_KEY16_Type) < 0)
   62382           0 :                 goto out;
   62383        4256 :         if (PyType_Ready(&netr_PasswordHistory_Type) < 0)
   62384           0 :                 goto out;
   62385        4256 :         if (PyType_Ready(&netr_USER_KEYS2_Type) < 0)
   62386           0 :                 goto out;
   62387        4256 :         if (PyType_Ready(&netr_USER_KEY_UNION_Type) < 0)
   62388           0 :                 goto out;
   62389        4256 :         if (PyType_Ready(&netr_USER_KEYS_Type) < 0)
   62390           0 :                 goto out;
   62391        4256 :         if (PyType_Ready(&netr_USER_PRIVATE_INFO_Type) < 0)
   62392           0 :                 goto out;
   62393        4256 :         if (PyType_Ready(&netr_DELTA_USER_Type) < 0)
   62394           0 :                 goto out;
   62395        4256 :         if (PyType_Ready(&netr_DELTA_DOMAIN_Type) < 0)
   62396           0 :                 goto out;
   62397        4256 :         if (PyType_Ready(&netr_DELTA_GROUP_Type) < 0)
   62398           0 :                 goto out;
   62399        4256 :         if (PyType_Ready(&netr_DELTA_RENAME_Type) < 0)
   62400           0 :                 goto out;
   62401        4256 :         if (PyType_Ready(&netr_DELTA_GROUP_MEMBER_Type) < 0)
   62402           0 :                 goto out;
   62403        4256 :         if (PyType_Ready(&netr_DELTA_ALIAS_Type) < 0)
   62404           0 :                 goto out;
   62405        4256 :         if (PyType_Ready(&netr_DELTA_ALIAS_MEMBER_Type) < 0)
   62406           0 :                 goto out;
   62407        4256 :         if (PyType_Ready(&netr_QUOTA_LIMITS_Type) < 0)
   62408           0 :                 goto out;
   62409        4256 :         if (PyType_Ready(&netr_DELTA_POLICY_Type) < 0)
   62410           0 :                 goto out;
   62411        4256 :         if (PyType_Ready(&netr_DELTA_TRUSTED_DOMAIN_Type) < 0)
   62412           0 :                 goto out;
   62413        4256 :         if (PyType_Ready(&netr_DELTA_ACCOUNT_Type) < 0)
   62414           0 :                 goto out;
   62415        4256 :         if (PyType_Ready(&netr_CIPHER_VALUE_Type) < 0)
   62416           0 :                 goto out;
   62417        4256 :         if (PyType_Ready(&netr_DELTA_SECRET_Type) < 0)
   62418           0 :                 goto out;
   62419        4256 :         if (PyType_Ready(&netr_DELTA_UNION_Type) < 0)
   62420           0 :                 goto out;
   62421        4256 :         if (PyType_Ready(&netr_DELTA_ID_UNION_Type) < 0)
   62422           0 :                 goto out;
   62423        4256 :         if (PyType_Ready(&netr_DELTA_ENUM_Type) < 0)
   62424           0 :                 goto out;
   62425        4256 :         if (PyType_Ready(&netr_DELTA_ENUM_ARRAY_Type) < 0)
   62426           0 :                 goto out;
   62427        4256 :         if (PyType_Ready(&netr_UAS_INFO_0_Type) < 0)
   62428           0 :                 goto out;
   62429        4256 :         if (PyType_Ready(&netr_AccountBuffer_Type) < 0)
   62430           0 :                 goto out;
   62431        4256 :         if (PyType_Ready(&netr_NETLOGON_INFO_1_Type) < 0)
   62432           0 :                 goto out;
   62433        4256 :         if (PyType_Ready(&netr_NETLOGON_INFO_2_Type) < 0)
   62434           0 :                 goto out;
   62435        4256 :         if (PyType_Ready(&netr_NETLOGON_INFO_3_Type) < 0)
   62436           0 :                 goto out;
   62437        4256 :         if (PyType_Ready(&netr_NETLOGON_INFO_4_Type) < 0)
   62438           0 :                 goto out;
   62439        4256 :         if (PyType_Ready(&netr_CONTROL_QUERY_INFORMATION_Type) < 0)
   62440           0 :                 goto out;
   62441        4256 :         if (PyType_Ready(&netr_CONTROL_DATA_INFORMATION_Type) < 0)
   62442           0 :                 goto out;
   62443        4256 :         if (PyType_Ready(&netr_ChangeLogObject_Type) < 0)
   62444           0 :                 goto out;
   62445        4256 :         if (PyType_Ready(&netr_ChangeLogEntry_Type) < 0)
   62446           0 :                 goto out;
   62447        4256 :         if (PyType_Ready(&netr_Blob_Type) < 0)
   62448           0 :                 goto out;
   62449        4256 :         if (PyType_Ready(&netr_DsRGetDCNameInfo_Type) < 0)
   62450           0 :                 goto out;
   62451        4256 :         if (PyType_Ready(&netr_Capabilities_Type) < 0)
   62452           0 :                 goto out;
   62453        4256 :         if (PyType_Ready(&netr_LsaPolicyInformation_Type) < 0)
   62454           0 :                 goto out;
   62455        4256 :         if (PyType_Ready(&netr_OsVersionInfoEx_Type) < 0)
   62456           0 :                 goto out;
   62457        4256 :         if (PyType_Ready(&netr_OsVersion_Type) < 0)
   62458           0 :                 goto out;
   62459        4256 :         if (PyType_Ready(&netr_OsVersionContainer_Type) < 0)
   62460           0 :                 goto out;
   62461        4256 :         if (PyType_Ready(&netr_WorkstationInformation_Type) < 0)
   62462           0 :                 goto out;
   62463        4256 :         if (PyType_Ready(&netr_WorkstationInfo_Type) < 0)
   62464           0 :                 goto out;
   62465        4256 :         if (PyType_Ready(&netr_trust_extension_info_Type) < 0)
   62466           0 :                 goto out;
   62467        4256 :         if (PyType_Ready(&netr_trust_extension_Type) < 0)
   62468           0 :                 goto out;
   62469        4256 :         if (PyType_Ready(&netr_trust_extension_container_Type) < 0)
   62470           0 :                 goto out;
   62471        4256 :         if (PyType_Ready(&netr_OneDomainInfo_Type) < 0)
   62472           0 :                 goto out;
   62473        4256 :         if (PyType_Ready(&netr_DomainInformation_Type) < 0)
   62474           0 :                 goto out;
   62475        4256 :         if (PyType_Ready(&netr_DomainInfo_Type) < 0)
   62476           0 :                 goto out;
   62477        4256 :         if (PyType_Ready(&NL_PASSWORD_VERSION_Type) < 0)
   62478           0 :                 goto out;
   62479        4256 :         if (PyType_Ready(&netr_CryptPassword_Type) < 0)
   62480           0 :                 goto out;
   62481        4256 :         if (PyType_Ready(&netr_SendToSamResetBadPasswordCount_Type) < 0)
   62482           0 :                 goto out;
   62483        4256 :         if (PyType_Ready(&netr_SendToSamMessage_Type) < 0)
   62484           0 :                 goto out;
   62485        4256 :         if (PyType_Ready(&netr_SendToSamBase_Type) < 0)
   62486           0 :                 goto out;
   62487        4256 :         if (PyType_Ready(&netr_DsRAddressToSitenamesWCtr_Type) < 0)
   62488           0 :                 goto out;
   62489        4256 :         if (PyType_Ready(&netr_DsRAddress_Type) < 0)
   62490           0 :                 goto out;
   62491        4256 :         if (PyType_Ready(&netr_DomainTrust_Type) < 0)
   62492           0 :                 goto out;
   62493        4256 :         if (PyType_Ready(&netr_DomainTrustList_Type) < 0)
   62494           0 :                 goto out;
   62495        4256 :         if (PyType_Ready(&netr_DsRAddressToSitenamesExWCtr_Type) < 0)
   62496           0 :                 goto out;
   62497        4256 :         if (PyType_Ready(&DcSitesCtr_Type) < 0)
   62498           0 :                 goto out;
   62499        4256 :         if (PyType_Ready(&netr_TrustInfo_Type) < 0)
   62500           0 :                 goto out;
   62501        4256 :         if (PyType_Ready(&NL_DNS_NAME_INFO_Type) < 0)
   62502           0 :                 goto out;
   62503        4256 :         if (PyType_Ready(&NL_DNS_NAME_INFO_ARRAY_Type) < 0)
   62504           0 :                 goto out;
   62505        4256 :         if (PyType_Ready(&netr_LogonUasLogon_Type) < 0)
   62506           0 :                 goto out;
   62507        4256 :         if (PyType_Ready(&netr_LogonUasLogoff_Type) < 0)
   62508           0 :                 goto out;
   62509        4256 :         if (PyType_Ready(&netr_LogonSamLogon_Type) < 0)
   62510           0 :                 goto out;
   62511        4256 :         if (PyType_Ready(&netr_LogonSamLogoff_Type) < 0)
   62512           0 :                 goto out;
   62513        4256 :         if (PyType_Ready(&netr_ServerReqChallenge_Type) < 0)
   62514           0 :                 goto out;
   62515        4256 :         if (PyType_Ready(&netr_ServerAuthenticate_Type) < 0)
   62516           0 :                 goto out;
   62517        4256 :         if (PyType_Ready(&netr_ServerPasswordSet_Type) < 0)
   62518           0 :                 goto out;
   62519        4256 :         if (PyType_Ready(&netr_DatabaseDeltas_Type) < 0)
   62520           0 :                 goto out;
   62521        4256 :         if (PyType_Ready(&netr_DatabaseSync_Type) < 0)
   62522           0 :                 goto out;
   62523        4256 :         if (PyType_Ready(&netr_AccountDeltas_Type) < 0)
   62524           0 :                 goto out;
   62525        4256 :         if (PyType_Ready(&netr_AccountSync_Type) < 0)
   62526           0 :                 goto out;
   62527        4256 :         if (PyType_Ready(&netr_GetDcName_Type) < 0)
   62528           0 :                 goto out;
   62529        4256 :         if (PyType_Ready(&netr_LogonControl_Type) < 0)
   62530           0 :                 goto out;
   62531        4256 :         if (PyType_Ready(&netr_GetAnyDCName_Type) < 0)
   62532           0 :                 goto out;
   62533        4256 :         if (PyType_Ready(&netr_LogonControl2_Type) < 0)
   62534           0 :                 goto out;
   62535        4256 :         if (PyType_Ready(&netr_ServerAuthenticate2_Type) < 0)
   62536           0 :                 goto out;
   62537        4256 :         if (PyType_Ready(&netr_DatabaseSync2_Type) < 0)
   62538           0 :                 goto out;
   62539        4256 :         if (PyType_Ready(&netr_DatabaseRedo_Type) < 0)
   62540           0 :                 goto out;
   62541        4256 :         if (PyType_Ready(&netr_LogonControl2Ex_Type) < 0)
   62542           0 :                 goto out;
   62543        4256 :         if (PyType_Ready(&netr_NetrEnumerateTrustedDomains_Type) < 0)
   62544           0 :                 goto out;
   62545        4256 :         if (PyType_Ready(&netr_DsRGetDCName_Type) < 0)
   62546           0 :                 goto out;
   62547        4256 :         if (PyType_Ready(&netr_LogonGetCapabilities_Type) < 0)
   62548           0 :                 goto out;
   62549        4256 :         if (PyType_Ready(&netr_LogonGetTrustRid_Type) < 0)
   62550           0 :                 goto out;
   62551        4256 :         if (PyType_Ready(&netr_ServerAuthenticate3_Type) < 0)
   62552           0 :                 goto out;
   62553        4256 :         if (PyType_Ready(&netr_DsRGetDCNameEx_Type) < 0)
   62554           0 :                 goto out;
   62555        4256 :         if (PyType_Ready(&netr_DsRGetSiteName_Type) < 0)
   62556           0 :                 goto out;
   62557        4256 :         if (PyType_Ready(&netr_LogonGetDomainInfo_Type) < 0)
   62558           0 :                 goto out;
   62559        4256 :         if (PyType_Ready(&netr_ServerPasswordSet2_Type) < 0)
   62560           0 :                 goto out;
   62561        4256 :         if (PyType_Ready(&netr_ServerPasswordGet_Type) < 0)
   62562           0 :                 goto out;
   62563        4256 :         if (PyType_Ready(&netr_NetrLogonSendToSam_Type) < 0)
   62564           0 :                 goto out;
   62565        4256 :         if (PyType_Ready(&netr_DsRAddressToSitenamesW_Type) < 0)
   62566           0 :                 goto out;
   62567        4256 :         if (PyType_Ready(&netr_DsRGetDCNameEx2_Type) < 0)
   62568           0 :                 goto out;
   62569        4256 :         if (PyType_Ready(&netr_NetrEnumerateTrustedDomainsEx_Type) < 0)
   62570           0 :                 goto out;
   62571        4256 :         if (PyType_Ready(&netr_DsRAddressToSitenamesExW_Type) < 0)
   62572           0 :                 goto out;
   62573        4256 :         if (PyType_Ready(&netr_DsrGetDcSiteCoverageW_Type) < 0)
   62574           0 :                 goto out;
   62575        4256 :         if (PyType_Ready(&netr_LogonSamLogonEx_Type) < 0)
   62576           0 :                 goto out;
   62577        4256 :         if (PyType_Ready(&netr_DsrEnumerateDomainTrusts_Type) < 0)
   62578           0 :                 goto out;
   62579        4256 :         if (PyType_Ready(&netr_DsrDeregisterDNSHostRecords_Type) < 0)
   62580           0 :                 goto out;
   62581        4256 :         if (PyType_Ready(&netr_ServerTrustPasswordsGet_Type) < 0)
   62582           0 :                 goto out;
   62583        4256 :         if (PyType_Ready(&netr_DsRGetForestTrustInformation_Type) < 0)
   62584           0 :                 goto out;
   62585        4256 :         if (PyType_Ready(&netr_GetForestTrustInformation_Type) < 0)
   62586           0 :                 goto out;
   62587        4256 :         if (PyType_Ready(&netr_LogonSamLogonWithFlags_Type) < 0)
   62588           0 :                 goto out;
   62589        4256 :         if (PyType_Ready(&netr_ServerGetTrustInfo_Type) < 0)
   62590           0 :                 goto out;
   62591        4256 :         if (PyType_Ready(&netr_Unused47_Type) < 0)
   62592           0 :                 goto out;
   62593        4256 :         if (PyType_Ready(&netr_DsrUpdateReadOnlyServerDnsRecords_Type) < 0)
   62594           0 :                 goto out;
   62595        4256 :         if (PyType_Ready(&netlogon_InterfaceType) < 0)
   62596           0 :                 goto out;
   62597        4256 :         if (PyType_Ready(&netlogon_SyntaxType) < 0)
   62598           0 :                 goto out;
   62599        4256 :         if (!PyInterface_AddNdrRpcMethods(&netlogon_InterfaceType, py_ndr_netlogon_methods))
   62600           0 :                 return NULL;
   62601             : 
   62602             : #ifdef PY_NETR_UASINFO_PATCH
   62603             :         PY_NETR_UASINFO_PATCH(&netr_UasInfo_Type);
   62604             : #endif
   62605             : #ifdef PY_NETR_UASLOGOFFINFO_PATCH
   62606             :         PY_NETR_UASLOGOFFINFO_PATCH(&netr_UasLogoffInfo_Type);
   62607             : #endif
   62608             : #ifdef PY_NETR_ACCTLOCKSTR_PATCH
   62609             :         PY_NETR_ACCTLOCKSTR_PATCH(&netr_AcctLockStr_Type);
   62610             : #endif
   62611             : #ifdef PY_NETR_IDENTITYINFO_PATCH
   62612             :         PY_NETR_IDENTITYINFO_PATCH(&netr_IdentityInfo_Type);
   62613             : #endif
   62614             : #ifdef PY_NETR_PASSWORDINFO_PATCH
   62615             :         PY_NETR_PASSWORDINFO_PATCH(&netr_PasswordInfo_Type);
   62616             : #endif
   62617             : #ifdef PY_NETR_CHALLENGERESPONSE_PATCH
   62618             :         PY_NETR_CHALLENGERESPONSE_PATCH(&netr_ChallengeResponse_Type);
   62619             : #endif
   62620             : #ifdef PY_NETR_NETWORKINFO_PATCH
   62621             :         PY_NETR_NETWORKINFO_PATCH(&netr_NetworkInfo_Type);
   62622             : #endif
   62623             : #ifdef PY_NETR_GENERICINFO_PATCH
   62624             :         PY_NETR_GENERICINFO_PATCH(&netr_GenericInfo_Type);
   62625             : #endif
   62626             : #ifdef PY_NETR_LOGONLEVEL_PATCH
   62627             :         PY_NETR_LOGONLEVEL_PATCH(&netr_LogonLevel_Type);
   62628             : #endif
   62629             : #ifdef PY_NETR_USERSESSIONKEY_PATCH
   62630             :         PY_NETR_USERSESSIONKEY_PATCH(&netr_UserSessionKey_Type);
   62631             : #endif
   62632             : #ifdef PY_NETR_LMSESSIONKEY_PATCH
   62633             :         PY_NETR_LMSESSIONKEY_PATCH(&netr_LMSessionKey_Type);
   62634             : #endif
   62635             : #ifdef PY_NETR_SAMBASEINFO_PATCH
   62636             :         PY_NETR_SAMBASEINFO_PATCH(&netr_SamBaseInfo_Type);
   62637             : #endif
   62638             : #ifdef PY_NETR_SAMINFO2_PATCH
   62639             :         PY_NETR_SAMINFO2_PATCH(&netr_SamInfo2_Type);
   62640             : #endif
   62641             : #ifdef PY_NETR_SIDATTR_PATCH
   62642             :         PY_NETR_SIDATTR_PATCH(&netr_SidAttr_Type);
   62643             : #endif
   62644             : #ifdef PY_NETR_SAMINFO3_PATCH
   62645             :         PY_NETR_SAMINFO3_PATCH(&netr_SamInfo3_Type);
   62646             : #endif
   62647             : #ifdef PY_NETR_SAMINFO6_PATCH
   62648             :         PY_NETR_SAMINFO6_PATCH(&netr_SamInfo6_Type);
   62649             : #endif
   62650             : #ifdef PY_NETR_PACINFO_PATCH
   62651             :         PY_NETR_PACINFO_PATCH(&netr_PacInfo_Type);
   62652             : #endif
   62653             : #ifdef PY_NETR_GENERICINFO2_PATCH
   62654             :         PY_NETR_GENERICINFO2_PATCH(&netr_GenericInfo2_Type);
   62655             : #endif
   62656             : #ifdef PY_NETR_VALIDATION_PATCH
   62657             :         PY_NETR_VALIDATION_PATCH(&netr_Validation_Type);
   62658             : #endif
   62659             : #ifdef PY_NETR_CREDENTIAL_PATCH
   62660             :         PY_NETR_CREDENTIAL_PATCH(&netr_Credential_Type);
   62661             : #endif
   62662             : #ifdef PY_SERVER_PIPE_STATE_PATCH
   62663             :         PY_SERVER_PIPE_STATE_PATCH(&netlogon_server_pipe_state_Type);
   62664             : #endif
   62665             : #ifdef PY_NETR_AUTHENTICATOR_PATCH
   62666             :         PY_NETR_AUTHENTICATOR_PATCH(&netr_Authenticator_Type);
   62667             : #endif
   62668             : #ifdef PY_NETR_DELTA_DELETE_USER_PATCH
   62669             :         PY_NETR_DELTA_DELETE_USER_PATCH(&netr_DELTA_DELETE_USER_Type);
   62670             : #endif
   62671             : #ifdef PY_NETR_USER_KEY16_PATCH
   62672             :         PY_NETR_USER_KEY16_PATCH(&netr_USER_KEY16_Type);
   62673             : #endif
   62674             : #ifdef PY_NETR_PASSWORDHISTORY_PATCH
   62675             :         PY_NETR_PASSWORDHISTORY_PATCH(&netr_PasswordHistory_Type);
   62676             : #endif
   62677             : #ifdef PY_NETR_USER_KEYS2_PATCH
   62678             :         PY_NETR_USER_KEYS2_PATCH(&netr_USER_KEYS2_Type);
   62679             : #endif
   62680             : #ifdef PY_NETR_USER_KEY_UNION_PATCH
   62681             :         PY_NETR_USER_KEY_UNION_PATCH(&netr_USER_KEY_UNION_Type);
   62682             : #endif
   62683             : #ifdef PY_NETR_USER_KEYS_PATCH
   62684             :         PY_NETR_USER_KEYS_PATCH(&netr_USER_KEYS_Type);
   62685             : #endif
   62686             : #ifdef PY_NETR_USER_PRIVATE_INFO_PATCH
   62687             :         PY_NETR_USER_PRIVATE_INFO_PATCH(&netr_USER_PRIVATE_INFO_Type);
   62688             : #endif
   62689             : #ifdef PY_NETR_DELTA_USER_PATCH
   62690             :         PY_NETR_DELTA_USER_PATCH(&netr_DELTA_USER_Type);
   62691             : #endif
   62692             : #ifdef PY_NETR_DELTA_DOMAIN_PATCH
   62693             :         PY_NETR_DELTA_DOMAIN_PATCH(&netr_DELTA_DOMAIN_Type);
   62694             : #endif
   62695             : #ifdef PY_NETR_DELTA_GROUP_PATCH
   62696             :         PY_NETR_DELTA_GROUP_PATCH(&netr_DELTA_GROUP_Type);
   62697             : #endif
   62698             : #ifdef PY_NETR_DELTA_RENAME_PATCH
   62699             :         PY_NETR_DELTA_RENAME_PATCH(&netr_DELTA_RENAME_Type);
   62700             : #endif
   62701             : #ifdef PY_NETR_DELTA_GROUP_MEMBER_PATCH
   62702             :         PY_NETR_DELTA_GROUP_MEMBER_PATCH(&netr_DELTA_GROUP_MEMBER_Type);
   62703             : #endif
   62704             : #ifdef PY_NETR_DELTA_ALIAS_PATCH
   62705             :         PY_NETR_DELTA_ALIAS_PATCH(&netr_DELTA_ALIAS_Type);
   62706             : #endif
   62707             : #ifdef PY_NETR_DELTA_ALIAS_MEMBER_PATCH
   62708             :         PY_NETR_DELTA_ALIAS_MEMBER_PATCH(&netr_DELTA_ALIAS_MEMBER_Type);
   62709             : #endif
   62710             : #ifdef PY_NETR_QUOTA_LIMITS_PATCH
   62711             :         PY_NETR_QUOTA_LIMITS_PATCH(&netr_QUOTA_LIMITS_Type);
   62712             : #endif
   62713             : #ifdef PY_NETR_DELTA_POLICY_PATCH
   62714             :         PY_NETR_DELTA_POLICY_PATCH(&netr_DELTA_POLICY_Type);
   62715             : #endif
   62716             : #ifdef PY_NETR_DELTA_TRUSTED_DOMAIN_PATCH
   62717             :         PY_NETR_DELTA_TRUSTED_DOMAIN_PATCH(&netr_DELTA_TRUSTED_DOMAIN_Type);
   62718             : #endif
   62719             : #ifdef PY_NETR_DELTA_ACCOUNT_PATCH
   62720             :         PY_NETR_DELTA_ACCOUNT_PATCH(&netr_DELTA_ACCOUNT_Type);
   62721             : #endif
   62722             : #ifdef PY_NETR_CIPHER_VALUE_PATCH
   62723             :         PY_NETR_CIPHER_VALUE_PATCH(&netr_CIPHER_VALUE_Type);
   62724             : #endif
   62725             : #ifdef PY_NETR_DELTA_SECRET_PATCH
   62726             :         PY_NETR_DELTA_SECRET_PATCH(&netr_DELTA_SECRET_Type);
   62727             : #endif
   62728             : #ifdef PY_NETR_DELTA_UNION_PATCH
   62729             :         PY_NETR_DELTA_UNION_PATCH(&netr_DELTA_UNION_Type);
   62730             : #endif
   62731             : #ifdef PY_NETR_DELTA_ID_UNION_PATCH
   62732             :         PY_NETR_DELTA_ID_UNION_PATCH(&netr_DELTA_ID_UNION_Type);
   62733             : #endif
   62734             : #ifdef PY_NETR_DELTA_ENUM_PATCH
   62735             :         PY_NETR_DELTA_ENUM_PATCH(&netr_DELTA_ENUM_Type);
   62736             : #endif
   62737             : #ifdef PY_NETR_DELTA_ENUM_ARRAY_PATCH
   62738             :         PY_NETR_DELTA_ENUM_ARRAY_PATCH(&netr_DELTA_ENUM_ARRAY_Type);
   62739             : #endif
   62740             : #ifdef PY_NETR_UAS_INFO_0_PATCH
   62741             :         PY_NETR_UAS_INFO_0_PATCH(&netr_UAS_INFO_0_Type);
   62742             : #endif
   62743             : #ifdef PY_NETR_ACCOUNTBUFFER_PATCH
   62744             :         PY_NETR_ACCOUNTBUFFER_PATCH(&netr_AccountBuffer_Type);
   62745             : #endif
   62746             : #ifdef PY_NETR_NETLOGON_INFO_1_PATCH
   62747             :         PY_NETR_NETLOGON_INFO_1_PATCH(&netr_NETLOGON_INFO_1_Type);
   62748             : #endif
   62749             : #ifdef PY_NETR_NETLOGON_INFO_2_PATCH
   62750             :         PY_NETR_NETLOGON_INFO_2_PATCH(&netr_NETLOGON_INFO_2_Type);
   62751             : #endif
   62752             : #ifdef PY_NETR_NETLOGON_INFO_3_PATCH
   62753             :         PY_NETR_NETLOGON_INFO_3_PATCH(&netr_NETLOGON_INFO_3_Type);
   62754             : #endif
   62755             : #ifdef PY_NETR_NETLOGON_INFO_4_PATCH
   62756             :         PY_NETR_NETLOGON_INFO_4_PATCH(&netr_NETLOGON_INFO_4_Type);
   62757             : #endif
   62758             : #ifdef PY_NETR_CONTROL_QUERY_INFORMATION_PATCH
   62759             :         PY_NETR_CONTROL_QUERY_INFORMATION_PATCH(&netr_CONTROL_QUERY_INFORMATION_Type);
   62760             : #endif
   62761             : #ifdef PY_NETR_CONTROL_DATA_INFORMATION_PATCH
   62762             :         PY_NETR_CONTROL_DATA_INFORMATION_PATCH(&netr_CONTROL_DATA_INFORMATION_Type);
   62763             : #endif
   62764             : #ifdef PY_NETR_CHANGELOGOBJECT_PATCH
   62765             :         PY_NETR_CHANGELOGOBJECT_PATCH(&netr_ChangeLogObject_Type);
   62766             : #endif
   62767             : #ifdef PY_NETR_CHANGELOGENTRY_PATCH
   62768             :         PY_NETR_CHANGELOGENTRY_PATCH(&netr_ChangeLogEntry_Type);
   62769             : #endif
   62770             : #ifdef PY_NETR_BLOB_PATCH
   62771             :         PY_NETR_BLOB_PATCH(&netr_Blob_Type);
   62772             : #endif
   62773             : #ifdef PY_NETR_DSRGETDCNAMEINFO_PATCH
   62774             :         PY_NETR_DSRGETDCNAMEINFO_PATCH(&netr_DsRGetDCNameInfo_Type);
   62775             : #endif
   62776             : #ifdef PY_NETR_CAPABILITIES_PATCH
   62777             :         PY_NETR_CAPABILITIES_PATCH(&netr_Capabilities_Type);
   62778             : #endif
   62779             : #ifdef PY_NETR_LSAPOLICYINFORMATION_PATCH
   62780             :         PY_NETR_LSAPOLICYINFORMATION_PATCH(&netr_LsaPolicyInformation_Type);
   62781             : #endif
   62782             : #ifdef PY_NETR_OSVERSIONINFOEX_PATCH
   62783             :         PY_NETR_OSVERSIONINFOEX_PATCH(&netr_OsVersionInfoEx_Type);
   62784             : #endif
   62785             : #ifdef PY_NETR_OSVERSION_PATCH
   62786             :         PY_NETR_OSVERSION_PATCH(&netr_OsVersion_Type);
   62787             : #endif
   62788             : #ifdef PY_NETR_OSVERSIONCONTAINER_PATCH
   62789             :         PY_NETR_OSVERSIONCONTAINER_PATCH(&netr_OsVersionContainer_Type);
   62790             : #endif
   62791             : #ifdef PY_NETR_WORKSTATIONINFORMATION_PATCH
   62792             :         PY_NETR_WORKSTATIONINFORMATION_PATCH(&netr_WorkstationInformation_Type);
   62793             : #endif
   62794             : #ifdef PY_NETR_WORKSTATIONINFO_PATCH
   62795             :         PY_NETR_WORKSTATIONINFO_PATCH(&netr_WorkstationInfo_Type);
   62796             : #endif
   62797             : #ifdef PY_NETR_TRUST_EXTENSION_INFO_PATCH
   62798             :         PY_NETR_TRUST_EXTENSION_INFO_PATCH(&netr_trust_extension_info_Type);
   62799             : #endif
   62800             : #ifdef PY_NETR_TRUST_EXTENSION_PATCH
   62801             :         PY_NETR_TRUST_EXTENSION_PATCH(&netr_trust_extension_Type);
   62802             : #endif
   62803             : #ifdef PY_NETR_TRUST_EXTENSION_CONTAINER_PATCH
   62804             :         PY_NETR_TRUST_EXTENSION_CONTAINER_PATCH(&netr_trust_extension_container_Type);
   62805             : #endif
   62806             : #ifdef PY_NETR_ONEDOMAININFO_PATCH
   62807             :         PY_NETR_ONEDOMAININFO_PATCH(&netr_OneDomainInfo_Type);
   62808             : #endif
   62809             : #ifdef PY_NETR_DOMAININFORMATION_PATCH
   62810             :         PY_NETR_DOMAININFORMATION_PATCH(&netr_DomainInformation_Type);
   62811             : #endif
   62812             : #ifdef PY_NETR_DOMAININFO_PATCH
   62813             :         PY_NETR_DOMAININFO_PATCH(&netr_DomainInfo_Type);
   62814             : #endif
   62815             : #ifdef PY_NL_PASSWORD_VERSION_PATCH
   62816             :         PY_NL_PASSWORD_VERSION_PATCH(&NL_PASSWORD_VERSION_Type);
   62817             : #endif
   62818             : #ifdef PY_NETR_CRYPTPASSWORD_PATCH
   62819             :         PY_NETR_CRYPTPASSWORD_PATCH(&netr_CryptPassword_Type);
   62820             : #endif
   62821             : #ifdef PY_NETR_SENDTOSAMRESETBADPASSWORDCOUNT_PATCH
   62822             :         PY_NETR_SENDTOSAMRESETBADPASSWORDCOUNT_PATCH(&netr_SendToSamResetBadPasswordCount_Type);
   62823             : #endif
   62824             : #ifdef PY_NETR_SENDTOSAMMESSAGE_PATCH
   62825             :         PY_NETR_SENDTOSAMMESSAGE_PATCH(&netr_SendToSamMessage_Type);
   62826             : #endif
   62827             : #ifdef PY_NETR_SENDTOSAMBASE_PATCH
   62828             :         PY_NETR_SENDTOSAMBASE_PATCH(&netr_SendToSamBase_Type);
   62829             : #endif
   62830             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESWCTR_PATCH
   62831             :         PY_NETR_DSRADDRESSTOSITENAMESWCTR_PATCH(&netr_DsRAddressToSitenamesWCtr_Type);
   62832             : #endif
   62833             : #ifdef PY_NETR_DSRADDRESS_PATCH
   62834             :         PY_NETR_DSRADDRESS_PATCH(&netr_DsRAddress_Type);
   62835             : #endif
   62836             : #ifdef PY_NETR_DOMAINTRUST_PATCH
   62837             :         PY_NETR_DOMAINTRUST_PATCH(&netr_DomainTrust_Type);
   62838             : #endif
   62839             : #ifdef PY_NETR_DOMAINTRUSTLIST_PATCH
   62840             :         PY_NETR_DOMAINTRUSTLIST_PATCH(&netr_DomainTrustList_Type);
   62841             : #endif
   62842             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESEXWCTR_PATCH
   62843             :         PY_NETR_DSRADDRESSTOSITENAMESEXWCTR_PATCH(&netr_DsRAddressToSitenamesExWCtr_Type);
   62844             : #endif
   62845             : #ifdef PY_DCSITESCTR_PATCH
   62846             :         PY_DCSITESCTR_PATCH(&DcSitesCtr_Type);
   62847             : #endif
   62848             : #ifdef PY_NETR_TRUSTINFO_PATCH
   62849             :         PY_NETR_TRUSTINFO_PATCH(&netr_TrustInfo_Type);
   62850             : #endif
   62851             : #ifdef PY_NL_DNS_NAME_INFO_PATCH
   62852             :         PY_NL_DNS_NAME_INFO_PATCH(&NL_DNS_NAME_INFO_Type);
   62853             : #endif
   62854             : #ifdef PY_NL_DNS_NAME_INFO_ARRAY_PATCH
   62855             :         PY_NL_DNS_NAME_INFO_ARRAY_PATCH(&NL_DNS_NAME_INFO_ARRAY_Type);
   62856             : #endif
   62857             : #ifdef PY_NETR_LOGONUASLOGON_PATCH
   62858             :         PY_NETR_LOGONUASLOGON_PATCH(&netr_LogonUasLogon_Type);
   62859             : #endif
   62860             : #ifdef PY_NETR_LOGONUASLOGOFF_PATCH
   62861             :         PY_NETR_LOGONUASLOGOFF_PATCH(&netr_LogonUasLogoff_Type);
   62862             : #endif
   62863             : #ifdef PY_NETR_LOGONSAMLOGON_PATCH
   62864             :         PY_NETR_LOGONSAMLOGON_PATCH(&netr_LogonSamLogon_Type);
   62865             : #endif
   62866             : #ifdef PY_NETR_LOGONSAMLOGOFF_PATCH
   62867             :         PY_NETR_LOGONSAMLOGOFF_PATCH(&netr_LogonSamLogoff_Type);
   62868             : #endif
   62869             : #ifdef PY_NETR_SERVERREQCHALLENGE_PATCH
   62870             :         PY_NETR_SERVERREQCHALLENGE_PATCH(&netr_ServerReqChallenge_Type);
   62871             : #endif
   62872             : #ifdef PY_NETR_SERVERAUTHENTICATE_PATCH
   62873             :         PY_NETR_SERVERAUTHENTICATE_PATCH(&netr_ServerAuthenticate_Type);
   62874             : #endif
   62875             : #ifdef PY_NETR_SERVERPASSWORDSET_PATCH
   62876             :         PY_NETR_SERVERPASSWORDSET_PATCH(&netr_ServerPasswordSet_Type);
   62877             : #endif
   62878             : #ifdef PY_NETR_DATABASEDELTAS_PATCH
   62879             :         PY_NETR_DATABASEDELTAS_PATCH(&netr_DatabaseDeltas_Type);
   62880             : #endif
   62881             : #ifdef PY_NETR_DATABASESYNC_PATCH
   62882             :         PY_NETR_DATABASESYNC_PATCH(&netr_DatabaseSync_Type);
   62883             : #endif
   62884             : #ifdef PY_NETR_ACCOUNTDELTAS_PATCH
   62885             :         PY_NETR_ACCOUNTDELTAS_PATCH(&netr_AccountDeltas_Type);
   62886             : #endif
   62887             : #ifdef PY_NETR_ACCOUNTSYNC_PATCH
   62888             :         PY_NETR_ACCOUNTSYNC_PATCH(&netr_AccountSync_Type);
   62889             : #endif
   62890             : #ifdef PY_NETR_GETDCNAME_PATCH
   62891             :         PY_NETR_GETDCNAME_PATCH(&netr_GetDcName_Type);
   62892             : #endif
   62893             : #ifdef PY_NETR_LOGONCONTROL_PATCH
   62894             :         PY_NETR_LOGONCONTROL_PATCH(&netr_LogonControl_Type);
   62895             : #endif
   62896             : #ifdef PY_NETR_GETANYDCNAME_PATCH
   62897             :         PY_NETR_GETANYDCNAME_PATCH(&netr_GetAnyDCName_Type);
   62898             : #endif
   62899             : #ifdef PY_NETR_LOGONCONTROL2_PATCH
   62900             :         PY_NETR_LOGONCONTROL2_PATCH(&netr_LogonControl2_Type);
   62901             : #endif
   62902             : #ifdef PY_NETR_SERVERAUTHENTICATE2_PATCH
   62903             :         PY_NETR_SERVERAUTHENTICATE2_PATCH(&netr_ServerAuthenticate2_Type);
   62904             : #endif
   62905             : #ifdef PY_NETR_DATABASESYNC2_PATCH
   62906             :         PY_NETR_DATABASESYNC2_PATCH(&netr_DatabaseSync2_Type);
   62907             : #endif
   62908             : #ifdef PY_NETR_DATABASEREDO_PATCH
   62909             :         PY_NETR_DATABASEREDO_PATCH(&netr_DatabaseRedo_Type);
   62910             : #endif
   62911             : #ifdef PY_NETR_LOGONCONTROL2EX_PATCH
   62912             :         PY_NETR_LOGONCONTROL2EX_PATCH(&netr_LogonControl2Ex_Type);
   62913             : #endif
   62914             : #ifdef PY_NETR_NETRENUMERATETRUSTEDDOMAINS_PATCH
   62915             :         PY_NETR_NETRENUMERATETRUSTEDDOMAINS_PATCH(&netr_NetrEnumerateTrustedDomains_Type);
   62916             : #endif
   62917             : #ifdef PY_NETR_DSRGETDCNAME_PATCH
   62918             :         PY_NETR_DSRGETDCNAME_PATCH(&netr_DsRGetDCName_Type);
   62919             : #endif
   62920             : #ifdef PY_NETR_LOGONGETCAPABILITIES_PATCH
   62921             :         PY_NETR_LOGONGETCAPABILITIES_PATCH(&netr_LogonGetCapabilities_Type);
   62922             : #endif
   62923             : #ifdef PY_NETR_LOGONGETTRUSTRID_PATCH
   62924             :         PY_NETR_LOGONGETTRUSTRID_PATCH(&netr_LogonGetTrustRid_Type);
   62925             : #endif
   62926             : #ifdef PY_NETR_SERVERAUTHENTICATE3_PATCH
   62927             :         PY_NETR_SERVERAUTHENTICATE3_PATCH(&netr_ServerAuthenticate3_Type);
   62928             : #endif
   62929             : #ifdef PY_NETR_DSRGETDCNAMEEX_PATCH
   62930             :         PY_NETR_DSRGETDCNAMEEX_PATCH(&netr_DsRGetDCNameEx_Type);
   62931             : #endif
   62932             : #ifdef PY_NETR_DSRGETSITENAME_PATCH
   62933             :         PY_NETR_DSRGETSITENAME_PATCH(&netr_DsRGetSiteName_Type);
   62934             : #endif
   62935             : #ifdef PY_NETR_LOGONGETDOMAININFO_PATCH
   62936             :         PY_NETR_LOGONGETDOMAININFO_PATCH(&netr_LogonGetDomainInfo_Type);
   62937             : #endif
   62938             : #ifdef PY_NETR_SERVERPASSWORDSET2_PATCH
   62939             :         PY_NETR_SERVERPASSWORDSET2_PATCH(&netr_ServerPasswordSet2_Type);
   62940             : #endif
   62941             : #ifdef PY_NETR_SERVERPASSWORDGET_PATCH
   62942             :         PY_NETR_SERVERPASSWORDGET_PATCH(&netr_ServerPasswordGet_Type);
   62943             : #endif
   62944             : #ifdef PY_NETR_NETRLOGONSENDTOSAM_PATCH
   62945             :         PY_NETR_NETRLOGONSENDTOSAM_PATCH(&netr_NetrLogonSendToSam_Type);
   62946             : #endif
   62947             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESW_PATCH
   62948             :         PY_NETR_DSRADDRESSTOSITENAMESW_PATCH(&netr_DsRAddressToSitenamesW_Type);
   62949             : #endif
   62950             : #ifdef PY_NETR_DSRGETDCNAMEEX2_PATCH
   62951             :         PY_NETR_DSRGETDCNAMEEX2_PATCH(&netr_DsRGetDCNameEx2_Type);
   62952             : #endif
   62953             : #ifdef PY_NETR_NETRENUMERATETRUSTEDDOMAINSEX_PATCH
   62954             :         PY_NETR_NETRENUMERATETRUSTEDDOMAINSEX_PATCH(&netr_NetrEnumerateTrustedDomainsEx_Type);
   62955             : #endif
   62956             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESEXW_PATCH
   62957             :         PY_NETR_DSRADDRESSTOSITENAMESEXW_PATCH(&netr_DsRAddressToSitenamesExW_Type);
   62958             : #endif
   62959             : #ifdef PY_NETR_DSRGETDCSITECOVERAGEW_PATCH
   62960             :         PY_NETR_DSRGETDCSITECOVERAGEW_PATCH(&netr_DsrGetDcSiteCoverageW_Type);
   62961             : #endif
   62962             : #ifdef PY_NETR_LOGONSAMLOGONEX_PATCH
   62963             :         PY_NETR_LOGONSAMLOGONEX_PATCH(&netr_LogonSamLogonEx_Type);
   62964             : #endif
   62965             : #ifdef PY_NETR_DSRENUMERATEDOMAINTRUSTS_PATCH
   62966             :         PY_NETR_DSRENUMERATEDOMAINTRUSTS_PATCH(&netr_DsrEnumerateDomainTrusts_Type);
   62967             : #endif
   62968             : #ifdef PY_NETR_DSRDEREGISTERDNSHOSTRECORDS_PATCH
   62969             :         PY_NETR_DSRDEREGISTERDNSHOSTRECORDS_PATCH(&netr_DsrDeregisterDNSHostRecords_Type);
   62970             : #endif
   62971             : #ifdef PY_NETR_SERVERTRUSTPASSWORDSGET_PATCH
   62972             :         PY_NETR_SERVERTRUSTPASSWORDSGET_PATCH(&netr_ServerTrustPasswordsGet_Type);
   62973             : #endif
   62974             : #ifdef PY_NETR_DSRGETFORESTTRUSTINFORMATION_PATCH
   62975             :         PY_NETR_DSRGETFORESTTRUSTINFORMATION_PATCH(&netr_DsRGetForestTrustInformation_Type);
   62976             : #endif
   62977             : #ifdef PY_NETR_GETFORESTTRUSTINFORMATION_PATCH
   62978             :         PY_NETR_GETFORESTTRUSTINFORMATION_PATCH(&netr_GetForestTrustInformation_Type);
   62979             : #endif
   62980             : #ifdef PY_NETR_LOGONSAMLOGONWITHFLAGS_PATCH
   62981             :         PY_NETR_LOGONSAMLOGONWITHFLAGS_PATCH(&netr_LogonSamLogonWithFlags_Type);
   62982             : #endif
   62983             : #ifdef PY_NETR_SERVERGETTRUSTINFO_PATCH
   62984             :         PY_NETR_SERVERGETTRUSTINFO_PATCH(&netr_ServerGetTrustInfo_Type);
   62985             : #endif
   62986             : #ifdef PY_NETR_UNUSED47_PATCH
   62987             :         PY_NETR_UNUSED47_PATCH(&netr_Unused47_Type);
   62988             : #endif
   62989             : #ifdef PY_NETR_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH
   62990             :         PY_NETR_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH(&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
   62991             : #endif
   62992             : #ifdef PY_NETLOGON_PATCH
   62993             :         PY_NETLOGON_PATCH(&netlogon_InterfaceType);
   62994             : #endif
   62995             : #ifdef PY_NETLOGON_ABSTRACT_SYNTAX_PATCH
   62996             :         PY_NETLOGON_ABSTRACT_SYNTAX_PATCH(&netlogon_SyntaxType);
   62997             : #endif
   62998             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
   62999             :         PY_ABSTRACT_SYNTAX_PATCH(&netlogon_SyntaxType);
   63000             : #endif
   63001             : 
   63002        4256 :         m = PyModule_Create(&moduledef);
   63003        4256 :         if (m == NULL)
   63004           0 :                 goto out;
   63005             : 
   63006        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_128BIT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_STRONG_KEYS)));
   63007        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_SCHANNEL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AUTHENTICATED_RPC)));
   63008        4256 :         PyModule_AddObject(m, "DSGETDC_VALID_FLAGS", PyLong_FromLong((DS_FORCE_REDISCOVERY|DS_DIRECTORY_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_PREFERRED|DS_GC_SERVER_REQUIRED|DS_PDC_REQUIRED|DS_BACKGROUND_ONLY|DS_IP_REQUIRED|DS_KDC_REQUIRED|DS_TIMESERV_REQUIRED|DS_WRITABLE_REQUIRED|DS_GOOD_TIMESERV_PREFERRED|DS_AVOID_SELF|DS_ONLY_LDAP_NEEDED|DS_IS_FLAT_NAME|DS_IS_DNS_NAME|DS_TRY_NEXTCLOSEST_SITE|DS_DIRECTORY_SERVICE_6_REQUIRED|DS_WEB_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_8_REQUIRED|DS_DIRECTORY_SERVICE_9_REQUIRED|DS_DIRECTORY_SERVICE_10_REQUIRED|DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME)));
   63009        4256 :         PyModule_AddObject(m, "NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT", PyLong_FromUnsignedLongLong(0x02231968));
   63010        4256 :         PyModule_AddObject(m, "DS_GFTI_UPDATE_TDO", PyLong_FromUnsignedLongLong(0x1));
   63011        4256 :         PyModule_AddObject(m, "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_CLEARTEXT_PASSWORD_ALLOWED)));
   63012        4256 :         PyModule_AddObject(m, "MSV1_0_UPDATE_LOGON_STATISTICS", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_UPDATE_LOGON_STATISTICS)));
   63013        4256 :         PyModule_AddObject(m, "MSV1_0_RETURN_USER_PARAMETERS", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_RETURN_USER_PARAMETERS)));
   63014        4256 :         PyModule_AddObject(m, "MSV1_0_DONT_TRY_GUEST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_DONT_TRY_GUEST_ACCOUNT)));
   63015        4256 :         PyModule_AddObject(m, "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT)));
   63016        4256 :         PyModule_AddObject(m, "MSV1_0_RETURN_PASSWORD_EXPIRY", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_RETURN_PASSWORD_EXPIRY)));
   63017        4256 :         PyModule_AddObject(m, "MSV1_0_USE_CLIENT_CHALLENGE", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_USE_CLIENT_CHALLENGE)));
   63018        4256 :         PyModule_AddObject(m, "MSV1_0_TRY_GUEST_ACCOUNT_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_TRY_GUEST_ACCOUNT_ONLY)));
   63019        4256 :         PyModule_AddObject(m, "MSV1_0_RETURN_PROFILE_PATH", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_RETURN_PROFILE_PATH)));
   63020        4256 :         PyModule_AddObject(m, "MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY)));
   63021        4256 :         PyModule_AddObject(m, "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT)));
   63022        4256 :         PyModule_AddObject(m, "MSV1_0_DISABLE_PERSONAL_FALLBACK", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_DISABLE_PERSONAL_FALLBACK)));
   63023        4256 :         PyModule_AddObject(m, "MSV1_0_ALLOW_FORCE_GUEST", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_ALLOW_FORCE_GUEST)));
   63024        4256 :         PyModule_AddObject(m, "MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED)));
   63025        4256 :         PyModule_AddObject(m, "MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY)));
   63026        4256 :         PyModule_AddObject(m, "MSV1_0_ALLOW_MSVCHAPV2", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_ALLOW_MSVCHAPV2)));
   63027        4256 :         PyModule_AddObject(m, "MSV1_0_S4U2SELF", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_S4U2SELF)));
   63028        4256 :         PyModule_AddObject(m, "MSV1_0_CHECK_LOGONHOURS_FOR_S4U", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_CHECK_LOGONHOURS_FOR_S4U)));
   63029        4256 :         PyModule_AddObject(m, "MSV1_0_SUBAUTHENTICATION_DLL_EX", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_SUBAUTHENTICATION_DLL_EX)));
   63030        4256 :         PyModule_AddObject(m, "NetlogonInteractiveInformation", PyLong_FromLong((uint16_t)(NetlogonInteractiveInformation)));
   63031        4256 :         PyModule_AddObject(m, "NetlogonNetworkInformation", PyLong_FromLong((uint16_t)(NetlogonNetworkInformation)));
   63032        4256 :         PyModule_AddObject(m, "NetlogonServiceInformation", PyLong_FromLong((uint16_t)(NetlogonServiceInformation)));
   63033        4256 :         PyModule_AddObject(m, "NetlogonGenericInformation", PyLong_FromLong((uint16_t)(NetlogonGenericInformation)));
   63034        4256 :         PyModule_AddObject(m, "NetlogonInteractiveTransitiveInformation", PyLong_FromLong((uint16_t)(NetlogonInteractiveTransitiveInformation)));
   63035        4256 :         PyModule_AddObject(m, "NetlogonNetworkTransitiveInformation", PyLong_FromLong((uint16_t)(NetlogonNetworkTransitiveInformation)));
   63036        4256 :         PyModule_AddObject(m, "NetlogonServiceTransitiveInformation", PyLong_FromLong((uint16_t)(NetlogonServiceTransitiveInformation)));
   63037        4256 :         PyModule_AddObject(m, "NETLOGON_GUEST", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_GUEST)));
   63038        4256 :         PyModule_AddObject(m, "NETLOGON_NOENCRYPTION", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NOENCRYPTION)));
   63039        4256 :         PyModule_AddObject(m, "NETLOGON_CACHED_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CACHED_ACCOUNT)));
   63040        4256 :         PyModule_AddObject(m, "NETLOGON_USED_LM_PASSWORD", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_USED_LM_PASSWORD)));
   63041        4256 :         PyModule_AddObject(m, "NETLOGON_EXTRA_SIDS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_EXTRA_SIDS)));
   63042        4256 :         PyModule_AddObject(m, "NETLOGON_SUBAUTH_SESSION_KEY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SUBAUTH_SESSION_KEY)));
   63043        4256 :         PyModule_AddObject(m, "NETLOGON_SERVER_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SERVER_TRUST_ACCOUNT)));
   63044        4256 :         PyModule_AddObject(m, "NETLOGON_NTLMV2_ENABLED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NTLMV2_ENABLED)));
   63045        4256 :         PyModule_AddObject(m, "NETLOGON_RESOURCE_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_RESOURCE_GROUPS)));
   63046        4256 :         PyModule_AddObject(m, "NETLOGON_PROFILE_PATH_RETURNED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_PROFILE_PATH_RETURNED)));
   63047        4256 :         PyModule_AddObject(m, "NETLOGON_GRACE_LOGON", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_GRACE_LOGON)));
   63048        4256 :         PyModule_AddObject(m, "NetlogonValidationUasInfo", PyLong_FromLong((uint16_t)(NetlogonValidationUasInfo)));
   63049        4256 :         PyModule_AddObject(m, "NetlogonValidationSamInfo", PyLong_FromLong((uint16_t)(NetlogonValidationSamInfo)));
   63050        4256 :         PyModule_AddObject(m, "NetlogonValidationSamInfo2", PyLong_FromLong((uint16_t)(NetlogonValidationSamInfo2)));
   63051        4256 :         PyModule_AddObject(m, "NetlogonValidationGenericInfo2", PyLong_FromLong((uint16_t)(NetlogonValidationGenericInfo2)));
   63052        4256 :         PyModule_AddObject(m, "NetlogonValidationSamInfo4", PyLong_FromLong((uint16_t)(NetlogonValidationSamInfo4)));
   63053        4256 :         PyModule_AddObject(m, "NETR_DELTA_DOMAIN", PyLong_FromLong((uint16_t)(NETR_DELTA_DOMAIN)));
   63054        4256 :         PyModule_AddObject(m, "NETR_DELTA_GROUP", PyLong_FromLong((uint16_t)(NETR_DELTA_GROUP)));
   63055        4256 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_GROUP", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_GROUP)));
   63056        4256 :         PyModule_AddObject(m, "NETR_DELTA_RENAME_GROUP", PyLong_FromLong((uint16_t)(NETR_DELTA_RENAME_GROUP)));
   63057        4256 :         PyModule_AddObject(m, "NETR_DELTA_USER", PyLong_FromLong((uint16_t)(NETR_DELTA_USER)));
   63058        4256 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_USER", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_USER)));
   63059        4256 :         PyModule_AddObject(m, "NETR_DELTA_RENAME_USER", PyLong_FromLong((uint16_t)(NETR_DELTA_RENAME_USER)));
   63060        4256 :         PyModule_AddObject(m, "NETR_DELTA_GROUP_MEMBER", PyLong_FromLong((uint16_t)(NETR_DELTA_GROUP_MEMBER)));
   63061        4256 :         PyModule_AddObject(m, "NETR_DELTA_ALIAS", PyLong_FromLong((uint16_t)(NETR_DELTA_ALIAS)));
   63062        4256 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_ALIAS", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_ALIAS)));
   63063        4256 :         PyModule_AddObject(m, "NETR_DELTA_RENAME_ALIAS", PyLong_FromLong((uint16_t)(NETR_DELTA_RENAME_ALIAS)));
   63064        4256 :         PyModule_AddObject(m, "NETR_DELTA_ALIAS_MEMBER", PyLong_FromLong((uint16_t)(NETR_DELTA_ALIAS_MEMBER)));
   63065        4256 :         PyModule_AddObject(m, "NETR_DELTA_POLICY", PyLong_FromLong((uint16_t)(NETR_DELTA_POLICY)));
   63066        4256 :         PyModule_AddObject(m, "NETR_DELTA_TRUSTED_DOMAIN", PyLong_FromLong((uint16_t)(NETR_DELTA_TRUSTED_DOMAIN)));
   63067        4256 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_TRUST", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_TRUST)));
   63068        4256 :         PyModule_AddObject(m, "NETR_DELTA_ACCOUNT", PyLong_FromLong((uint16_t)(NETR_DELTA_ACCOUNT)));
   63069        4256 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_ACCOUNT", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_ACCOUNT)));
   63070        4256 :         PyModule_AddObject(m, "NETR_DELTA_SECRET", PyLong_FromLong((uint16_t)(NETR_DELTA_SECRET)));
   63071        4256 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_SECRET", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_SECRET)));
   63072        4256 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_GROUP2", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_GROUP2)));
   63073        4256 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_USER2", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_USER2)));
   63074        4256 :         PyModule_AddObject(m, "NETR_DELTA_MODIFY_COUNT", PyLong_FromLong((uint16_t)(NETR_DELTA_MODIFY_COUNT)));
   63075        4256 :         PyModule_AddObject(m, "NETLOGON_REPLICATION_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_REPLICATION_NEEDED)));
   63076        4256 :         PyModule_AddObject(m, "NETLOGON_REPLICATION_IN_PROGRESS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_REPLICATION_IN_PROGRESS)));
   63077        4256 :         PyModule_AddObject(m, "NETLOGON_FULL_SYNC_REPLICATION", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_FULL_SYNC_REPLICATION)));
   63078        4256 :         PyModule_AddObject(m, "NETLOGON_REDO_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_REDO_NEEDED)));
   63079        4256 :         PyModule_AddObject(m, "NETLOGON_HAS_IP", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_HAS_IP)));
   63080        4256 :         PyModule_AddObject(m, "NETLOGON_HAS_TIMESERV", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_HAS_TIMESERV)));
   63081        4256 :         PyModule_AddObject(m, "NETLOGON_DNS_UPDATE_FAILURE", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_DNS_UPDATE_FAILURE)));
   63082        4256 :         PyModule_AddObject(m, "NETLOGON_VERIFY_STATUS_RETURNED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_VERIFY_STATUS_RETURNED)));
   63083        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_QUERY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_QUERY)));
   63084        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_REPLICATE", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_REPLICATE)));
   63085        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_SYNCHRONIZE", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_SYNCHRONIZE)));
   63086        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_PDC_REPLICATE", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_PDC_REPLICATE)));
   63087        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_REDISCOVER", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_REDISCOVER)));
   63088        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TC_QUERY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_TC_QUERY)));
   63089        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TRANSPORT_NOTIFY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_TRANSPORT_NOTIFY)));
   63090        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_FIND_USER", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_FIND_USER)));
   63091        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_CHANGE_PASSWORD", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_CHANGE_PASSWORD)));
   63092        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TC_VERIFY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_TC_VERIFY)));
   63093        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_FORCE_DNS_REG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_FORCE_DNS_REG)));
   63094        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_QUERY_DNS_REG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_QUERY_DNS_REG)));
   63095        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_BACKUP_CHANGE_LOG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_BACKUP_CHANGE_LOG)));
   63096        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TRUNCATE_LOG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_TRUNCATE_LOG)));
   63097        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_SET_DBFLAG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_SET_DBFLAG)));
   63098        4256 :         PyModule_AddObject(m, "NETLOGON_CONTROL_BREAKPOINT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_BREAKPOINT)));
   63099        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_ACCOUNT_LOCKOUT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_ACCOUNT_LOCKOUT)));
   63100        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_PERSISTENT_SAMREPL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_PERSISTENT_SAMREPL)));
   63101        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_ARCFOUR", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_ARCFOUR)));
   63102        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_PROMOTION_COUNT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_PROMOTION_COUNT)));
   63103        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_CHANGELOG_BDC", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_CHANGELOG_BDC)));
   63104        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_FULL_SYNC_REPL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_FULL_SYNC_REPL)));
   63105        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_MULTIPLE_SIDS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_MULTIPLE_SIDS)));
   63106        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_REDO", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_REDO)));
   63107        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL)));
   63108        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_SEND_PASSWORD_INFO_PDC", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_SEND_PASSWORD_INFO_PDC)));
   63109        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_GENERIC_PASSTHROUGH", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_GENERIC_PASSTHROUGH)));
   63110        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_CONCURRENT_RPC", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_CONCURRENT_RPC)));
   63111        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL)));
   63112        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL)));
   63113        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_STRONG_KEYS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_STRONG_KEYS)));
   63114        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_TRANSITIVE_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_TRANSITIVE_TRUSTS)));
   63115        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_DNS_DOMAIN_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_DNS_DOMAIN_TRUSTS)));
   63116        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_PASSWORD_SET2", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_PASSWORD_SET2)));
   63117        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_GETDOMAININFO", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_GETDOMAININFO)));
   63118        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_CROSS_FOREST_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_CROSS_FOREST_TRUSTS)));
   63119        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION)));
   63120        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_RODC_PASSTHROUGH", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_RODC_PASSTHROUGH)));
   63121        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_SUPPORTS_AES_SHA2", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_SUPPORTS_AES_SHA2)));
   63122        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_SUPPORTS_AES", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_SUPPORTS_AES)));
   63123        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_AUTHENTICATED_RPC_LSASS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AUTHENTICATED_RPC_LSASS)));
   63124        4256 :         PyModule_AddObject(m, "NETLOGON_NEG_AUTHENTICATED_RPC", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AUTHENTICATED_RPC)));
   63125        4256 :         PyModule_AddObject(m, "SYNCSTATE_NORMAL_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_NORMAL_STATE)));
   63126        4256 :         PyModule_AddObject(m, "SYNCSTATE_DOMAIN_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_DOMAIN_STATE)));
   63127        4256 :         PyModule_AddObject(m, "SYNCSTATE_GROUP_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_GROUP_STATE)));
   63128        4256 :         PyModule_AddObject(m, "SYNCSTATE_UAS_BUILT_IN_GROUP_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_UAS_BUILT_IN_GROUP_STATE)));
   63129        4256 :         PyModule_AddObject(m, "SYNCSTATE_USER_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_USER_STATE)));
   63130        4256 :         PyModule_AddObject(m, "SYNCSTATE_GROUP_MEMBER_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_GROUP_MEMBER_STATE)));
   63131        4256 :         PyModule_AddObject(m, "SYNCSTATE_ALIAS_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_ALIAS_STATE)));
   63132        4256 :         PyModule_AddObject(m, "SYNCSTATE_ALIAS_MEMBER_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_ALIAS_MEMBER_STATE)));
   63133        4256 :         PyModule_AddObject(m, "SYNCSTATE_SAM_DONE_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_SAM_DONE_STATE)));
   63134        4256 :         PyModule_AddObject(m, "NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED)));
   63135        4256 :         PyModule_AddObject(m, "NETR_CHANGELOG_CHANGED_PASSWORD", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_CHANGED_PASSWORD)));
   63136        4256 :         PyModule_AddObject(m, "NETR_CHANGELOG_SID_INCLUDED", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_SID_INCLUDED)));
   63137        4256 :         PyModule_AddObject(m, "NETR_CHANGELOG_NAME_INCLUDED", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_NAME_INCLUDED)));
   63138        4256 :         PyModule_AddObject(m, "NETR_CHANGELOG_FIRST_PROMOTION_OBJ", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_FIRST_PROMOTION_OBJ)));
   63139        4256 :         PyModule_AddObject(m, "DS_FORCE_REDISCOVERY", PyLong_FromUnsignedLongLong((uint32_t)(DS_FORCE_REDISCOVERY)));
   63140        4256 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_REQUIRED)));
   63141        4256 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_PREFERRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_PREFERRED)));
   63142        4256 :         PyModule_AddObject(m, "DS_GC_SERVER_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_GC_SERVER_REQUIRED)));
   63143        4256 :         PyModule_AddObject(m, "DS_PDC_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_PDC_REQUIRED)));
   63144        4256 :         PyModule_AddObject(m, "DS_BACKGROUND_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DS_BACKGROUND_ONLY)));
   63145        4256 :         PyModule_AddObject(m, "DS_IP_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_IP_REQUIRED)));
   63146        4256 :         PyModule_AddObject(m, "DS_KDC_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_KDC_REQUIRED)));
   63147        4256 :         PyModule_AddObject(m, "DS_TIMESERV_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_TIMESERV_REQUIRED)));
   63148        4256 :         PyModule_AddObject(m, "DS_WRITABLE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_WRITABLE_REQUIRED)));
   63149        4256 :         PyModule_AddObject(m, "DS_GOOD_TIMESERV_PREFERRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_GOOD_TIMESERV_PREFERRED)));
   63150        4256 :         PyModule_AddObject(m, "DS_AVOID_SELF", PyLong_FromUnsignedLongLong((uint32_t)(DS_AVOID_SELF)));
   63151        4256 :         PyModule_AddObject(m, "DS_ONLY_LDAP_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)(DS_ONLY_LDAP_NEEDED)));
   63152        4256 :         PyModule_AddObject(m, "DS_IS_FLAT_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DS_IS_FLAT_NAME)));
   63153        4256 :         PyModule_AddObject(m, "DS_IS_DNS_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DS_IS_DNS_NAME)));
   63154        4256 :         PyModule_AddObject(m, "DS_TRY_NEXTCLOSEST_SITE", PyLong_FromUnsignedLongLong((uint32_t)(DS_TRY_NEXTCLOSEST_SITE)));
   63155        4256 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_6_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_6_REQUIRED)));
   63156        4256 :         PyModule_AddObject(m, "DS_WEB_SERVICE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_WEB_SERVICE_REQUIRED)));
   63157        4256 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_8_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_8_REQUIRED)));
   63158        4256 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_9_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_9_REQUIRED)));
   63159        4256 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_10_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_10_REQUIRED)));
   63160        4256 :         PyModule_AddObject(m, "DS_RETURN_DNS_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DS_RETURN_DNS_NAME)));
   63161        4256 :         PyModule_AddObject(m, "DS_RETURN_FLAT_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DS_RETURN_FLAT_NAME)));
   63162        4256 :         PyModule_AddObject(m, "DS_ADDRESS_TYPE_INET", PyLong_FromUnsignedLongLong((uint32_t)(DS_ADDRESS_TYPE_INET)));
   63163        4256 :         PyModule_AddObject(m, "DS_ADDRESS_TYPE_NETBIOS", PyLong_FromUnsignedLongLong((uint32_t)(DS_ADDRESS_TYPE_NETBIOS)));
   63164        4256 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_IN_FOREST", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_IN_FOREST)));
   63165        4256 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_OUTBOUND", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_OUTBOUND)));
   63166        4256 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_TREEROOT", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_TREEROOT)));
   63167        4256 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_PRIMARY", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_PRIMARY)));
   63168        4256 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_NATIVE", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_NATIVE)));
   63169        4256 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_INBOUND", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_INBOUND)));
   63170        4256 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_MIT_KRB5", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_MIT_KRB5)));
   63171        4256 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_AES", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_AES)));
   63172        4256 :         PyModule_AddObject(m, "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)(NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS)));
   63173        4256 :         PyModule_AddObject(m, "NETR_WS_FLAG_HANDLES_SPN_UPDATE", PyLong_FromUnsignedLongLong((uint32_t)(NETR_WS_FLAG_HANDLES_SPN_UPDATE)));
   63174        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_BACKOFFICE", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_BACKOFFICE)));
   63175        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_BLADE", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_BLADE)));
   63176        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_COMPUTE_SERVER", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_COMPUTE_SERVER)));
   63177        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_DATACENTER", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_DATACENTER)));
   63178        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_ENTERPRISE", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_ENTERPRISE)));
   63179        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_EMBEDDEDNT", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_EMBEDDEDNT)));
   63180        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_PERSONAL", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_PERSONAL)));
   63181        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_SINGLEUSERTS", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_SINGLEUSERTS)));
   63182        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_SMALLBUSINESS", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_SMALLBUSINESS)));
   63183        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED)));
   63184        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_STORAGE_SERVER", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_STORAGE_SERVER)));
   63185        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_TERMINAL", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_TERMINAL)));
   63186        4256 :         PyModule_AddObject(m, "NETR_VER_SUITE_WH_SERVER", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_WH_SERVER)));
   63187        4256 :         PyModule_AddObject(m, "NETR_VER_NT_DOMAIN_CONTROLLER", PyLong_FromLong((uint16_t)(NETR_VER_NT_DOMAIN_CONTROLLER)));
   63188        4256 :         PyModule_AddObject(m, "NETR_VER_NT_SERVER", PyLong_FromLong((uint16_t)(NETR_VER_NT_SERVER)));
   63189        4256 :         PyModule_AddObject(m, "NETR_VER_NT_WORKSTATION", PyLong_FromLong((uint16_t)(NETR_VER_NT_WORKSTATION)));
   63190        4256 :         PyModule_AddObject(m, "SendToSamUpdatePassword", PyLong_FromLong((uint16_t)(SendToSamUpdatePassword)));
   63191        4256 :         PyModule_AddObject(m, "SendToSamResetBadPasswordCount", PyLong_FromLong((uint16_t)(SendToSamResetBadPasswordCount)));
   63192        4256 :         PyModule_AddObject(m, "SendToSamUpdatePasswordForward", PyLong_FromLong((uint16_t)(SendToSamUpdatePasswordForward)));
   63193        4256 :         PyModule_AddObject(m, "SendToSamUpdateLastLogonTimestamp", PyLong_FromLong((uint16_t)(SendToSamUpdateLastLogonTimestamp)));
   63194        4256 :         PyModule_AddObject(m, "SendToSamResetSmartCardPassword", PyLong_FromLong((uint16_t)(SendToSamResetSmartCardPassword)));
   63195        4256 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT)));
   63196        4256 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP)));
   63197        4256 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN)));
   63198        4256 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST)));
   63199        4256 :         PyModule_AddObject(m, "NlDnsLdapAtSite", PyLong_FromLong((uint16_t)(NlDnsLdapAtSite)));
   63200        4256 :         PyModule_AddObject(m, "NlDnsGcAtSite", PyLong_FromLong((uint16_t)(NlDnsGcAtSite)));
   63201        4256 :         PyModule_AddObject(m, "NlDnsDsaCname", PyLong_FromLong((uint16_t)(NlDnsDsaCname)));
   63202        4256 :         PyModule_AddObject(m, "NlDnsKdcAtSite", PyLong_FromLong((uint16_t)(NlDnsKdcAtSite)));
   63203        4256 :         PyModule_AddObject(m, "NlDnsDcAtSite", PyLong_FromLong((uint16_t)(NlDnsDcAtSite)));
   63204        4256 :         PyModule_AddObject(m, "NlDnsRfc1510KdcAtSite", PyLong_FromLong((uint16_t)(NlDnsRfc1510KdcAtSite)));
   63205        4256 :         PyModule_AddObject(m, "NlDnsGenericGcAtSite", PyLong_FromLong((uint16_t)(NlDnsGenericGcAtSite)));
   63206        4256 :         PyModule_AddObject(m, "NlDnsInfoTypeNone", PyLong_FromLong((uint16_t)(NlDnsInfoTypeNone)));
   63207        4256 :         PyModule_AddObject(m, "NlDnsDomainName", PyLong_FromLong((uint16_t)(NlDnsDomainName)));
   63208        4256 :         PyModule_AddObject(m, "NlDnsDomainNameAlias", PyLong_FromLong((uint16_t)(NlDnsDomainNameAlias)));
   63209        4256 :         PyModule_AddObject(m, "NlDnsForestName", PyLong_FromLong((uint16_t)(NlDnsForestName)));
   63210        4256 :         PyModule_AddObject(m, "NlDnsForestNameAlias", PyLong_FromLong((uint16_t)(NlDnsForestNameAlias)));
   63211        4256 :         PyModule_AddObject(m, "NlDnsNdncDomainName", PyLong_FromLong((uint16_t)(NlDnsNdncDomainName)));
   63212        4256 :         PyModule_AddObject(m, "NlDnsRecordName", PyLong_FromLong((uint16_t)(NlDnsRecordName)));
   63213        3158 :         Py_INCREF((PyObject *)(void *)&netr_UasInfo_Type);
   63214        4256 :         PyModule_AddObject(m, "netr_UasInfo", (PyObject *)(void *)&netr_UasInfo_Type);
   63215        3158 :         Py_INCREF((PyObject *)(void *)&netr_UasLogoffInfo_Type);
   63216        4256 :         PyModule_AddObject(m, "netr_UasLogoffInfo", (PyObject *)(void *)&netr_UasLogoffInfo_Type);
   63217        3158 :         Py_INCREF((PyObject *)(void *)&netr_AcctLockStr_Type);
   63218        4256 :         PyModule_AddObject(m, "netr_AcctLockStr", (PyObject *)(void *)&netr_AcctLockStr_Type);
   63219        3158 :         Py_INCREF((PyObject *)(void *)&netr_IdentityInfo_Type);
   63220        4256 :         PyModule_AddObject(m, "netr_IdentityInfo", (PyObject *)(void *)&netr_IdentityInfo_Type);
   63221        3158 :         Py_INCREF((PyObject *)(void *)&netr_PasswordInfo_Type);
   63222        4256 :         PyModule_AddObject(m, "netr_PasswordInfo", (PyObject *)(void *)&netr_PasswordInfo_Type);
   63223        3158 :         Py_INCREF((PyObject *)(void *)&netr_ChallengeResponse_Type);
   63224        4256 :         PyModule_AddObject(m, "netr_ChallengeResponse", (PyObject *)(void *)&netr_ChallengeResponse_Type);
   63225        3158 :         Py_INCREF((PyObject *)(void *)&netr_NetworkInfo_Type);
   63226        4256 :         PyModule_AddObject(m, "netr_NetworkInfo", (PyObject *)(void *)&netr_NetworkInfo_Type);
   63227        3158 :         Py_INCREF((PyObject *)(void *)&netr_GenericInfo_Type);
   63228        4256 :         PyModule_AddObject(m, "netr_GenericInfo", (PyObject *)(void *)&netr_GenericInfo_Type);
   63229        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonLevel_Type);
   63230        4256 :         PyModule_AddObject(m, "netr_LogonLevel", (PyObject *)(void *)&netr_LogonLevel_Type);
   63231        3158 :         Py_INCREF((PyObject *)(void *)&netr_UserSessionKey_Type);
   63232        4256 :         PyModule_AddObject(m, "netr_UserSessionKey", (PyObject *)(void *)&netr_UserSessionKey_Type);
   63233        3158 :         Py_INCREF((PyObject *)(void *)&netr_LMSessionKey_Type);
   63234        4256 :         PyModule_AddObject(m, "netr_LMSessionKey", (PyObject *)(void *)&netr_LMSessionKey_Type);
   63235        3158 :         Py_INCREF((PyObject *)(void *)&netr_SamBaseInfo_Type);
   63236        4256 :         PyModule_AddObject(m, "netr_SamBaseInfo", (PyObject *)(void *)&netr_SamBaseInfo_Type);
   63237        3158 :         Py_INCREF((PyObject *)(void *)&netr_SamInfo2_Type);
   63238        4256 :         PyModule_AddObject(m, "netr_SamInfo2", (PyObject *)(void *)&netr_SamInfo2_Type);
   63239        3158 :         Py_INCREF((PyObject *)(void *)&netr_SidAttr_Type);
   63240        4256 :         PyModule_AddObject(m, "netr_SidAttr", (PyObject *)(void *)&netr_SidAttr_Type);
   63241        3158 :         Py_INCREF((PyObject *)(void *)&netr_SamInfo3_Type);
   63242        4256 :         PyModule_AddObject(m, "netr_SamInfo3", (PyObject *)(void *)&netr_SamInfo3_Type);
   63243        3158 :         Py_INCREF((PyObject *)(void *)&netr_SamInfo6_Type);
   63244        4256 :         PyModule_AddObject(m, "netr_SamInfo6", (PyObject *)(void *)&netr_SamInfo6_Type);
   63245        3158 :         Py_INCREF((PyObject *)(void *)&netr_PacInfo_Type);
   63246        4256 :         PyModule_AddObject(m, "netr_PacInfo", (PyObject *)(void *)&netr_PacInfo_Type);
   63247        3158 :         Py_INCREF((PyObject *)(void *)&netr_GenericInfo2_Type);
   63248        4256 :         PyModule_AddObject(m, "netr_GenericInfo2", (PyObject *)(void *)&netr_GenericInfo2_Type);
   63249        3158 :         Py_INCREF((PyObject *)(void *)&netr_Validation_Type);
   63250        4256 :         PyModule_AddObject(m, "netr_Validation", (PyObject *)(void *)&netr_Validation_Type);
   63251        3158 :         Py_INCREF((PyObject *)(void *)&netr_Credential_Type);
   63252        4256 :         PyModule_AddObject(m, "netr_Credential", (PyObject *)(void *)&netr_Credential_Type);
   63253        3158 :         Py_INCREF((PyObject *)(void *)&netlogon_server_pipe_state_Type);
   63254        4256 :         PyModule_AddObject(m, "server_pipe_state", (PyObject *)(void *)&netlogon_server_pipe_state_Type);
   63255        3158 :         Py_INCREF((PyObject *)(void *)&netr_Authenticator_Type);
   63256        4256 :         PyModule_AddObject(m, "netr_Authenticator", (PyObject *)(void *)&netr_Authenticator_Type);
   63257        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_DELETE_USER_Type);
   63258        4256 :         PyModule_AddObject(m, "netr_DELTA_DELETE_USER", (PyObject *)(void *)&netr_DELTA_DELETE_USER_Type);
   63259        3158 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEY16_Type);
   63260        4256 :         PyModule_AddObject(m, "netr_USER_KEY16", (PyObject *)(void *)&netr_USER_KEY16_Type);
   63261        3158 :         Py_INCREF((PyObject *)(void *)&netr_PasswordHistory_Type);
   63262        4256 :         PyModule_AddObject(m, "netr_PasswordHistory", (PyObject *)(void *)&netr_PasswordHistory_Type);
   63263        3158 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEYS2_Type);
   63264        4256 :         PyModule_AddObject(m, "netr_USER_KEYS2", (PyObject *)(void *)&netr_USER_KEYS2_Type);
   63265        3158 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEY_UNION_Type);
   63266        4256 :         PyModule_AddObject(m, "netr_USER_KEY_UNION", (PyObject *)(void *)&netr_USER_KEY_UNION_Type);
   63267        3158 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEYS_Type);
   63268        4256 :         PyModule_AddObject(m, "netr_USER_KEYS", (PyObject *)(void *)&netr_USER_KEYS_Type);
   63269        3158 :         Py_INCREF((PyObject *)(void *)&netr_USER_PRIVATE_INFO_Type);
   63270        4256 :         PyModule_AddObject(m, "netr_USER_PRIVATE_INFO", (PyObject *)(void *)&netr_USER_PRIVATE_INFO_Type);
   63271        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_USER_Type);
   63272        4256 :         PyModule_AddObject(m, "netr_DELTA_USER", (PyObject *)(void *)&netr_DELTA_USER_Type);
   63273        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_DOMAIN_Type);
   63274        4256 :         PyModule_AddObject(m, "netr_DELTA_DOMAIN", (PyObject *)(void *)&netr_DELTA_DOMAIN_Type);
   63275        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_GROUP_Type);
   63276        4256 :         PyModule_AddObject(m, "netr_DELTA_GROUP", (PyObject *)(void *)&netr_DELTA_GROUP_Type);
   63277        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_RENAME_Type);
   63278        4256 :         PyModule_AddObject(m, "netr_DELTA_RENAME", (PyObject *)(void *)&netr_DELTA_RENAME_Type);
   63279        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_GROUP_MEMBER_Type);
   63280        4256 :         PyModule_AddObject(m, "netr_DELTA_GROUP_MEMBER", (PyObject *)(void *)&netr_DELTA_GROUP_MEMBER_Type);
   63281        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ALIAS_Type);
   63282        4256 :         PyModule_AddObject(m, "netr_DELTA_ALIAS", (PyObject *)(void *)&netr_DELTA_ALIAS_Type);
   63283        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ALIAS_MEMBER_Type);
   63284        4256 :         PyModule_AddObject(m, "netr_DELTA_ALIAS_MEMBER", (PyObject *)(void *)&netr_DELTA_ALIAS_MEMBER_Type);
   63285        3158 :         Py_INCREF((PyObject *)(void *)&netr_QUOTA_LIMITS_Type);
   63286        4256 :         PyModule_AddObject(m, "netr_QUOTA_LIMITS", (PyObject *)(void *)&netr_QUOTA_LIMITS_Type);
   63287        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_POLICY_Type);
   63288        4256 :         PyModule_AddObject(m, "netr_DELTA_POLICY", (PyObject *)(void *)&netr_DELTA_POLICY_Type);
   63289        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_TRUSTED_DOMAIN_Type);
   63290        4256 :         PyModule_AddObject(m, "netr_DELTA_TRUSTED_DOMAIN", (PyObject *)(void *)&netr_DELTA_TRUSTED_DOMAIN_Type);
   63291        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ACCOUNT_Type);
   63292        4256 :         PyModule_AddObject(m, "netr_DELTA_ACCOUNT", (PyObject *)(void *)&netr_DELTA_ACCOUNT_Type);
   63293        3158 :         Py_INCREF((PyObject *)(void *)&netr_CIPHER_VALUE_Type);
   63294        4256 :         PyModule_AddObject(m, "netr_CIPHER_VALUE", (PyObject *)(void *)&netr_CIPHER_VALUE_Type);
   63295        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_SECRET_Type);
   63296        4256 :         PyModule_AddObject(m, "netr_DELTA_SECRET", (PyObject *)(void *)&netr_DELTA_SECRET_Type);
   63297        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_UNION_Type);
   63298        4256 :         PyModule_AddObject(m, "netr_DELTA_UNION", (PyObject *)(void *)&netr_DELTA_UNION_Type);
   63299        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ID_UNION_Type);
   63300        4256 :         PyModule_AddObject(m, "netr_DELTA_ID_UNION", (PyObject *)(void *)&netr_DELTA_ID_UNION_Type);
   63301        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ENUM_Type);
   63302        4256 :         PyModule_AddObject(m, "netr_DELTA_ENUM", (PyObject *)(void *)&netr_DELTA_ENUM_Type);
   63303        3158 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ENUM_ARRAY_Type);
   63304        4256 :         PyModule_AddObject(m, "netr_DELTA_ENUM_ARRAY", (PyObject *)(void *)&netr_DELTA_ENUM_ARRAY_Type);
   63305        3158 :         Py_INCREF((PyObject *)(void *)&netr_UAS_INFO_0_Type);
   63306        4256 :         PyModule_AddObject(m, "netr_UAS_INFO_0", (PyObject *)(void *)&netr_UAS_INFO_0_Type);
   63307        3158 :         Py_INCREF((PyObject *)(void *)&netr_AccountBuffer_Type);
   63308        4256 :         PyModule_AddObject(m, "netr_AccountBuffer", (PyObject *)(void *)&netr_AccountBuffer_Type);
   63309        3158 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_1_Type);
   63310        4256 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_1", (PyObject *)(void *)&netr_NETLOGON_INFO_1_Type);
   63311        3158 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_2_Type);
   63312        4256 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_2", (PyObject *)(void *)&netr_NETLOGON_INFO_2_Type);
   63313        3158 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_3_Type);
   63314        4256 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_3", (PyObject *)(void *)&netr_NETLOGON_INFO_3_Type);
   63315        3158 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_4_Type);
   63316        4256 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_4", (PyObject *)(void *)&netr_NETLOGON_INFO_4_Type);
   63317        3158 :         Py_INCREF((PyObject *)(void *)&netr_CONTROL_QUERY_INFORMATION_Type);
   63318        4256 :         PyModule_AddObject(m, "netr_CONTROL_QUERY_INFORMATION", (PyObject *)(void *)&netr_CONTROL_QUERY_INFORMATION_Type);
   63319        3158 :         Py_INCREF((PyObject *)(void *)&netr_CONTROL_DATA_INFORMATION_Type);
   63320        4256 :         PyModule_AddObject(m, "netr_CONTROL_DATA_INFORMATION", (PyObject *)(void *)&netr_CONTROL_DATA_INFORMATION_Type);
   63321        3158 :         Py_INCREF((PyObject *)(void *)&netr_ChangeLogObject_Type);
   63322        4256 :         PyModule_AddObject(m, "netr_ChangeLogObject", (PyObject *)(void *)&netr_ChangeLogObject_Type);
   63323        3158 :         Py_INCREF((PyObject *)(void *)&netr_ChangeLogEntry_Type);
   63324        4256 :         PyModule_AddObject(m, "netr_ChangeLogEntry", (PyObject *)(void *)&netr_ChangeLogEntry_Type);
   63325        3158 :         Py_INCREF((PyObject *)(void *)&netr_Blob_Type);
   63326        4256 :         PyModule_AddObject(m, "netr_Blob", (PyObject *)(void *)&netr_Blob_Type);
   63327        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameInfo_Type);
   63328        4256 :         PyModule_AddObject(m, "netr_DsRGetDCNameInfo", (PyObject *)(void *)&netr_DsRGetDCNameInfo_Type);
   63329        3158 :         Py_INCREF((PyObject *)(void *)&netr_Capabilities_Type);
   63330        4256 :         PyModule_AddObject(m, "netr_Capabilities", (PyObject *)(void *)&netr_Capabilities_Type);
   63331        3158 :         Py_INCREF((PyObject *)(void *)&netr_LsaPolicyInformation_Type);
   63332        4256 :         PyModule_AddObject(m, "netr_LsaPolicyInformation", (PyObject *)(void *)&netr_LsaPolicyInformation_Type);
   63333        3158 :         Py_INCREF((PyObject *)(void *)&netr_OsVersionInfoEx_Type);
   63334        4256 :         PyModule_AddObject(m, "netr_OsVersionInfoEx", (PyObject *)(void *)&netr_OsVersionInfoEx_Type);
   63335        3158 :         Py_INCREF((PyObject *)(void *)&netr_OsVersion_Type);
   63336        4256 :         PyModule_AddObject(m, "netr_OsVersion", (PyObject *)(void *)&netr_OsVersion_Type);
   63337        3158 :         Py_INCREF((PyObject *)(void *)&netr_OsVersionContainer_Type);
   63338        4256 :         PyModule_AddObject(m, "netr_OsVersionContainer", (PyObject *)(void *)&netr_OsVersionContainer_Type);
   63339        3158 :         Py_INCREF((PyObject *)(void *)&netr_WorkstationInformation_Type);
   63340        4256 :         PyModule_AddObject(m, "netr_WorkstationInformation", (PyObject *)(void *)&netr_WorkstationInformation_Type);
   63341        3158 :         Py_INCREF((PyObject *)(void *)&netr_WorkstationInfo_Type);
   63342        4256 :         PyModule_AddObject(m, "netr_WorkstationInfo", (PyObject *)(void *)&netr_WorkstationInfo_Type);
   63343        3158 :         Py_INCREF((PyObject *)(void *)&netr_trust_extension_info_Type);
   63344        4256 :         PyModule_AddObject(m, "netr_trust_extension_info", (PyObject *)(void *)&netr_trust_extension_info_Type);
   63345        3158 :         Py_INCREF((PyObject *)(void *)&netr_trust_extension_Type);
   63346        4256 :         PyModule_AddObject(m, "netr_trust_extension", (PyObject *)(void *)&netr_trust_extension_Type);
   63347        3158 :         Py_INCREF((PyObject *)(void *)&netr_trust_extension_container_Type);
   63348        4256 :         PyModule_AddObject(m, "netr_trust_extension_container", (PyObject *)(void *)&netr_trust_extension_container_Type);
   63349        3158 :         Py_INCREF((PyObject *)(void *)&netr_OneDomainInfo_Type);
   63350        4256 :         PyModule_AddObject(m, "netr_OneDomainInfo", (PyObject *)(void *)&netr_OneDomainInfo_Type);
   63351        3158 :         Py_INCREF((PyObject *)(void *)&netr_DomainInformation_Type);
   63352        4256 :         PyModule_AddObject(m, "netr_DomainInformation", (PyObject *)(void *)&netr_DomainInformation_Type);
   63353        3158 :         Py_INCREF((PyObject *)(void *)&netr_DomainInfo_Type);
   63354        4256 :         PyModule_AddObject(m, "netr_DomainInfo", (PyObject *)(void *)&netr_DomainInfo_Type);
   63355        3158 :         Py_INCREF((PyObject *)(void *)&NL_PASSWORD_VERSION_Type);
   63356        4256 :         PyModule_AddObject(m, "NL_PASSWORD_VERSION", (PyObject *)(void *)&NL_PASSWORD_VERSION_Type);
   63357        3158 :         Py_INCREF((PyObject *)(void *)&netr_CryptPassword_Type);
   63358        4256 :         PyModule_AddObject(m, "netr_CryptPassword", (PyObject *)(void *)&netr_CryptPassword_Type);
   63359        3158 :         Py_INCREF((PyObject *)(void *)&netr_SendToSamResetBadPasswordCount_Type);
   63360        4256 :         PyModule_AddObject(m, "netr_SendToSamResetBadPasswordCount", (PyObject *)(void *)&netr_SendToSamResetBadPasswordCount_Type);
   63361        3158 :         Py_INCREF((PyObject *)(void *)&netr_SendToSamMessage_Type);
   63362        4256 :         PyModule_AddObject(m, "netr_SendToSamMessage", (PyObject *)(void *)&netr_SendToSamMessage_Type);
   63363        3158 :         Py_INCREF((PyObject *)(void *)&netr_SendToSamBase_Type);
   63364        4256 :         PyModule_AddObject(m, "netr_SendToSamBase", (PyObject *)(void *)&netr_SendToSamBase_Type);
   63365        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesWCtr_Type);
   63366        4256 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesWCtr", (PyObject *)(void *)&netr_DsRAddressToSitenamesWCtr_Type);
   63367        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddress_Type);
   63368        4256 :         PyModule_AddObject(m, "netr_DsRAddress", (PyObject *)(void *)&netr_DsRAddress_Type);
   63369        3158 :         Py_INCREF((PyObject *)(void *)&netr_DomainTrust_Type);
   63370        4256 :         PyModule_AddObject(m, "netr_DomainTrust", (PyObject *)(void *)&netr_DomainTrust_Type);
   63371        3158 :         Py_INCREF((PyObject *)(void *)&netr_DomainTrustList_Type);
   63372        4256 :         PyModule_AddObject(m, "netr_DomainTrustList", (PyObject *)(void *)&netr_DomainTrustList_Type);
   63373        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesExWCtr_Type);
   63374        4256 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesExWCtr", (PyObject *)(void *)&netr_DsRAddressToSitenamesExWCtr_Type);
   63375        3158 :         Py_INCREF((PyObject *)(void *)&DcSitesCtr_Type);
   63376        4256 :         PyModule_AddObject(m, "DcSitesCtr", (PyObject *)(void *)&DcSitesCtr_Type);
   63377        3158 :         Py_INCREF((PyObject *)(void *)&netr_TrustInfo_Type);
   63378        4256 :         PyModule_AddObject(m, "netr_TrustInfo", (PyObject *)(void *)&netr_TrustInfo_Type);
   63379        3158 :         Py_INCREF((PyObject *)(void *)&NL_DNS_NAME_INFO_Type);
   63380        4256 :         PyModule_AddObject(m, "NL_DNS_NAME_INFO", (PyObject *)(void *)&NL_DNS_NAME_INFO_Type);
   63381        3158 :         Py_INCREF((PyObject *)(void *)&NL_DNS_NAME_INFO_ARRAY_Type);
   63382        4256 :         PyModule_AddObject(m, "NL_DNS_NAME_INFO_ARRAY", (PyObject *)(void *)&NL_DNS_NAME_INFO_ARRAY_Type);
   63383        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonUasLogon_Type);
   63384        4256 :         PyModule_AddObject(m, "netr_LogonUasLogon", (PyObject *)(void *)&netr_LogonUasLogon_Type);
   63385        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonUasLogoff_Type);
   63386        4256 :         PyModule_AddObject(m, "netr_LogonUasLogoff", (PyObject *)(void *)&netr_LogonUasLogoff_Type);
   63387        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogon_Type);
   63388        4256 :         PyModule_AddObject(m, "netr_LogonSamLogon", (PyObject *)(void *)&netr_LogonSamLogon_Type);
   63389        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogoff_Type);
   63390        4256 :         PyModule_AddObject(m, "netr_LogonSamLogoff", (PyObject *)(void *)&netr_LogonSamLogoff_Type);
   63391        3158 :         Py_INCREF((PyObject *)(void *)&netr_ServerReqChallenge_Type);
   63392        4256 :         PyModule_AddObject(m, "netr_ServerReqChallenge", (PyObject *)(void *)&netr_ServerReqChallenge_Type);
   63393        3158 :         Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate_Type);
   63394        4256 :         PyModule_AddObject(m, "netr_ServerAuthenticate", (PyObject *)(void *)&netr_ServerAuthenticate_Type);
   63395        3158 :         Py_INCREF((PyObject *)(void *)&netr_ServerPasswordSet_Type);
   63396        4256 :         PyModule_AddObject(m, "netr_ServerPasswordSet", (PyObject *)(void *)&netr_ServerPasswordSet_Type);
   63397        3158 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseDeltas_Type);
   63398        4256 :         PyModule_AddObject(m, "netr_DatabaseDeltas", (PyObject *)(void *)&netr_DatabaseDeltas_Type);
   63399        3158 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseSync_Type);
   63400        4256 :         PyModule_AddObject(m, "netr_DatabaseSync", (PyObject *)(void *)&netr_DatabaseSync_Type);
   63401        3158 :         Py_INCREF((PyObject *)(void *)&netr_AccountDeltas_Type);
   63402        4256 :         PyModule_AddObject(m, "netr_AccountDeltas", (PyObject *)(void *)&netr_AccountDeltas_Type);
   63403        3158 :         Py_INCREF((PyObject *)(void *)&netr_AccountSync_Type);
   63404        4256 :         PyModule_AddObject(m, "netr_AccountSync", (PyObject *)(void *)&netr_AccountSync_Type);
   63405        3158 :         Py_INCREF((PyObject *)(void *)&netr_GetDcName_Type);
   63406        4256 :         PyModule_AddObject(m, "netr_GetDcName", (PyObject *)(void *)&netr_GetDcName_Type);
   63407        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonControl_Type);
   63408        4256 :         PyModule_AddObject(m, "netr_LogonControl", (PyObject *)(void *)&netr_LogonControl_Type);
   63409        3158 :         Py_INCREF((PyObject *)(void *)&netr_GetAnyDCName_Type);
   63410        4256 :         PyModule_AddObject(m, "netr_GetAnyDCName", (PyObject *)(void *)&netr_GetAnyDCName_Type);
   63411        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonControl2_Type);
   63412        4256 :         PyModule_AddObject(m, "netr_LogonControl2", (PyObject *)(void *)&netr_LogonControl2_Type);
   63413        3158 :         Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate2_Type);
   63414        4256 :         PyModule_AddObject(m, "netr_ServerAuthenticate2", (PyObject *)(void *)&netr_ServerAuthenticate2_Type);
   63415        3158 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseSync2_Type);
   63416        4256 :         PyModule_AddObject(m, "netr_DatabaseSync2", (PyObject *)(void *)&netr_DatabaseSync2_Type);
   63417        3158 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseRedo_Type);
   63418        4256 :         PyModule_AddObject(m, "netr_DatabaseRedo", (PyObject *)(void *)&netr_DatabaseRedo_Type);
   63419        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonControl2Ex_Type);
   63420        4256 :         PyModule_AddObject(m, "netr_LogonControl2Ex", (PyObject *)(void *)&netr_LogonControl2Ex_Type);
   63421        3158 :         Py_INCREF((PyObject *)(void *)&netr_NetrEnumerateTrustedDomains_Type);
   63422        4256 :         PyModule_AddObject(m, "netr_NetrEnumerateTrustedDomains", (PyObject *)(void *)&netr_NetrEnumerateTrustedDomains_Type);
   63423        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCName_Type);
   63424        4256 :         PyModule_AddObject(m, "netr_DsRGetDCName", (PyObject *)(void *)&netr_DsRGetDCName_Type);
   63425        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonGetCapabilities_Type);
   63426        4256 :         PyModule_AddObject(m, "netr_LogonGetCapabilities", (PyObject *)(void *)&netr_LogonGetCapabilities_Type);
   63427        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonGetTrustRid_Type);
   63428        4256 :         PyModule_AddObject(m, "netr_LogonGetTrustRid", (PyObject *)(void *)&netr_LogonGetTrustRid_Type);
   63429        3158 :         Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate3_Type);
   63430        4256 :         PyModule_AddObject(m, "netr_ServerAuthenticate3", (PyObject *)(void *)&netr_ServerAuthenticate3_Type);
   63431        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameEx_Type);
   63432        4256 :         PyModule_AddObject(m, "netr_DsRGetDCNameEx", (PyObject *)(void *)&netr_DsRGetDCNameEx_Type);
   63433        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetSiteName_Type);
   63434        4256 :         PyModule_AddObject(m, "netr_DsRGetSiteName", (PyObject *)(void *)&netr_DsRGetSiteName_Type);
   63435        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonGetDomainInfo_Type);
   63436        4256 :         PyModule_AddObject(m, "netr_LogonGetDomainInfo", (PyObject *)(void *)&netr_LogonGetDomainInfo_Type);
   63437        3158 :         Py_INCREF((PyObject *)(void *)&netr_ServerPasswordSet2_Type);
   63438        4256 :         PyModule_AddObject(m, "netr_ServerPasswordSet2", (PyObject *)(void *)&netr_ServerPasswordSet2_Type);
   63439        3158 :         Py_INCREF((PyObject *)(void *)&netr_ServerPasswordGet_Type);
   63440        4256 :         PyModule_AddObject(m, "netr_ServerPasswordGet", (PyObject *)(void *)&netr_ServerPasswordGet_Type);
   63441        3158 :         Py_INCREF((PyObject *)(void *)&netr_NetrLogonSendToSam_Type);
   63442        4256 :         PyModule_AddObject(m, "netr_NetrLogonSendToSam", (PyObject *)(void *)&netr_NetrLogonSendToSam_Type);
   63443        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesW_Type);
   63444        4256 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesW", (PyObject *)(void *)&netr_DsRAddressToSitenamesW_Type);
   63445        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameEx2_Type);
   63446        4256 :         PyModule_AddObject(m, "netr_DsRGetDCNameEx2", (PyObject *)(void *)&netr_DsRGetDCNameEx2_Type);
   63447        3158 :         Py_INCREF((PyObject *)(void *)&netr_NetrEnumerateTrustedDomainsEx_Type);
   63448        4256 :         PyModule_AddObject(m, "netr_NetrEnumerateTrustedDomainsEx", (PyObject *)(void *)&netr_NetrEnumerateTrustedDomainsEx_Type);
   63449        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesExW_Type);
   63450        4256 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesExW", (PyObject *)(void *)&netr_DsRAddressToSitenamesExW_Type);
   63451        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsrGetDcSiteCoverageW_Type);
   63452        4256 :         PyModule_AddObject(m, "netr_DsrGetDcSiteCoverageW", (PyObject *)(void *)&netr_DsrGetDcSiteCoverageW_Type);
   63453        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogonEx_Type);
   63454        4256 :         PyModule_AddObject(m, "netr_LogonSamLogonEx", (PyObject *)(void *)&netr_LogonSamLogonEx_Type);
   63455        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsrEnumerateDomainTrusts_Type);
   63456        4256 :         PyModule_AddObject(m, "netr_DsrEnumerateDomainTrusts", (PyObject *)(void *)&netr_DsrEnumerateDomainTrusts_Type);
   63457        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsrDeregisterDNSHostRecords_Type);
   63458        4256 :         PyModule_AddObject(m, "netr_DsrDeregisterDNSHostRecords", (PyObject *)(void *)&netr_DsrDeregisterDNSHostRecords_Type);
   63459        3158 :         Py_INCREF((PyObject *)(void *)&netr_ServerTrustPasswordsGet_Type);
   63460        4256 :         PyModule_AddObject(m, "netr_ServerTrustPasswordsGet", (PyObject *)(void *)&netr_ServerTrustPasswordsGet_Type);
   63461        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetForestTrustInformation_Type);
   63462        4256 :         PyModule_AddObject(m, "netr_DsRGetForestTrustInformation", (PyObject *)(void *)&netr_DsRGetForestTrustInformation_Type);
   63463        3158 :         Py_INCREF((PyObject *)(void *)&netr_GetForestTrustInformation_Type);
   63464        4256 :         PyModule_AddObject(m, "netr_GetForestTrustInformation", (PyObject *)(void *)&netr_GetForestTrustInformation_Type);
   63465        3158 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogonWithFlags_Type);
   63466        4256 :         PyModule_AddObject(m, "netr_LogonSamLogonWithFlags", (PyObject *)(void *)&netr_LogonSamLogonWithFlags_Type);
   63467        3158 :         Py_INCREF((PyObject *)(void *)&netr_ServerGetTrustInfo_Type);
   63468        4256 :         PyModule_AddObject(m, "netr_ServerGetTrustInfo", (PyObject *)(void *)&netr_ServerGetTrustInfo_Type);
   63469        3158 :         Py_INCREF((PyObject *)(void *)&netr_Unused47_Type);
   63470        4256 :         PyModule_AddObject(m, "netr_Unused47", (PyObject *)(void *)&netr_Unused47_Type);
   63471        3158 :         Py_INCREF((PyObject *)(void *)&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
   63472        4256 :         PyModule_AddObject(m, "netr_DsrUpdateReadOnlyServerDnsRecords", (PyObject *)(void *)&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
   63473        3158 :         Py_INCREF((PyObject *)(void *)&netlogon_InterfaceType);
   63474        4256 :         PyModule_AddObject(m, "netlogon", (PyObject *)(void *)&netlogon_InterfaceType);
   63475        3158 :         Py_INCREF((PyObject *)(void *)&netlogon_SyntaxType);
   63476        4256 :         PyModule_AddObject(m, "netlogon_abstract_syntax", (PyObject *)(void *)&netlogon_SyntaxType);
   63477        3158 :         Py_INCREF((PyObject *)(void *)&netlogon_SyntaxType);
   63478        4256 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&netlogon_SyntaxType);
   63479             : #ifdef PY_MOD_NETLOGON_PATCH
   63480             :         PY_MOD_NETLOGON_PATCH(m);
   63481             : #endif
   63482        4256 :         out:
   63483        4256 :         Py_XDECREF(dep_samba_dcerpc_misc);
   63484        4256 :         Py_XDECREF(dep_samba_dcerpc_lsa);
   63485        4256 :         Py_XDECREF(dep_samba_dcerpc_samr);
   63486        4256 :         Py_XDECREF(dep_samba_dcerpc_security);
   63487        4256 :         Py_XDECREF(dep_samba_dcerpc_nbt);
   63488        4256 :         Py_XDECREF(dep_talloc);
   63489        4256 :         Py_XDECREF(dep_samba_dcerpc_base);
   63490        4126 :         return m;
   63491             : 
   63492             : }

Generated by: LCOV version 1.14