LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - py_samr.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 2073 26481 7.8 %
Date: 2021-09-23 10:06:22 Functions: 109 2108 5.2 %

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